diff options
author | fahim | 2015-04-23 12:06:56 +0530 |
---|---|---|
committer | fahim | 2015-04-23 12:06:56 +0530 |
commit | 2c623deaf46848b02efc31a44c5d3fb2d97885e7 (patch) | |
tree | a8603c22371ed7379c63bd3055d8c330f38b21bd /src | |
parent | 342730ed59f75ebe1b5df0f886ae9e6bcd787ee6 (diff) | |
download | eSim-2c623deaf46848b02efc31a44c5d3fb2d97885e7.tar.gz eSim-2c623deaf46848b02efc31a44c5d3fb2d97885e7.tar.bz2 eSim-2c623deaf46848b02efc31a44c5d3fb2d97885e7.zip |
Subject: Changes in Processing of XML file
Description: Change the compType which is taken from .cir file to
modelname which is taken from xml file for more generic pattern
Diffstat (limited to 'src')
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.py | 15 | ||||
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.pyc | bin | 7415 -> 7254 bytes | |||
-rw-r--r-- | src/kicadtoNgspice/Model.py | 2 | ||||
-rw-r--r-- | src/kicadtoNgspice/Model.pyc | bin | 1945 -> 1945 bytes | |||
-rw-r--r-- | src/kicadtoNgspice/Processing.py | 15 | ||||
-rw-r--r-- | src/kicadtoNgspice/Processing.pyc | bin | 8441 -> 8485 bytes | |||
-rw-r--r-- | src/modelParamXML/Analog/temp.xml | 7 |
7 files changed, 20 insertions, 19 deletions
diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py index f8faa997..9452e364 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.py +++ b/src/kicadtoNgspice/KicadtoNgspice.py @@ -183,8 +183,8 @@ class MainWindow(QtGui.QWidget): analysisOption = [] initialCondOption=[] simulatorOption =[] - includeOption=[] #Don't know why to use it - model = [] #Don't know why to use it + #includeOption=[] #Don't know why to use it + #model = [] #Don't know why to use it for eachline in optionInfo: words=eachline.split() @@ -201,10 +201,10 @@ class MainWindow(QtGui.QWidget): initialCondOption.append(eachline+'\n') elif option=='.option': simulatorOption.append(eachline+'\n') - elif (option=='.include' or option=='.lib'): - includeOption.append(eachline+'\n') - elif (option=='.model'): - model.append(eachline+'\n') + #elif (option=='.include' or option=='.lib'): + # includeOption.append(eachline+'\n') + #elif (option=='.model'): + # model.append(eachline+'\n') elif option=='.end': continue; @@ -239,7 +239,7 @@ class MainWindow(QtGui.QWidget): - +#Main Function def main(args): print "==================================" @@ -313,7 +313,6 @@ def main(args): kingWindow.show() sys.exit(app.exec_()) - if __name__ == '__main__': diff --git a/src/kicadtoNgspice/KicadtoNgspice.pyc b/src/kicadtoNgspice/KicadtoNgspice.pyc Binary files differindex de20b98b..58008146 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.pyc +++ b/src/kicadtoNgspice/KicadtoNgspice.pyc diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py index f450cf56..fff27707 100644 --- a/src/kicadtoNgspice/Model.py +++ b/src/kicadtoNgspice/Model.py @@ -70,7 +70,7 @@ class Model(QtGui.QWidget): Listing all line[0] = index line[1] = compLine - line[2] = compType + line[2] = modelname #Change from compType to modelname line[3] = compName line[4] = comment line[5] = title diff --git a/src/kicadtoNgspice/Model.pyc b/src/kicadtoNgspice/Model.pyc Binary files differindex 72aaef1b..e9c5fc3d 100644 --- a/src/kicadtoNgspice/Model.pyc +++ b/src/kicadtoNgspice/Model.pyc diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py index 6fb79921..9295a058 100644 --- a/src/kicadtoNgspice/Processing.py +++ b/src/kicadtoNgspice/Processing.py @@ -166,6 +166,9 @@ class PrcocessNetlist: compType=words[len(words)-1]; schematicInfo.remove(compline) paramDict = {} + #e.g compLine : u1 1 2 gain + #compType : gain + #compName : u1 print "Compline",compline print "CompType",compType print "Words",words @@ -205,9 +208,6 @@ class PrcocessNetlist: elif child.tag == 'split': splitDetail = child.text - #print "Child Item",child - #print "Tag",child.tag - #print "Tag Value",child.text for param in tree.findall('param'): for item in param: @@ -274,13 +274,14 @@ class PrcocessNetlist: k=k+1 except Exception as e: print "Error while appending ModelLine ",modelLine - print "Excpetion Message : ",str(e) + print "Exception Message : ",str(e) #Insert comment at remove line schematicInfo.insert(index,"* "+compline) - comment = "* "+modelname+" "+compType - modelList.append([index,compline,compType,compName,comment,title,type,paramDict]) + comment = "* Schematic Name: "+compType+", NgSpice Name: "+modelname + #Here instead of adding compType(use for XML), added modelName(Unique Model Name) + modelList.append([index,compline,modelname,compName,comment,title,type,paramDict]) except: - print "Unable to parse the model, Please check your your xml file" + print "Unable to parse the model, Please check your your XML file" sys.exit(2) #print "Count",count diff --git a/src/kicadtoNgspice/Processing.pyc b/src/kicadtoNgspice/Processing.pyc Binary files differindex efd69b68..08b83116 100644 --- a/src/kicadtoNgspice/Processing.pyc +++ b/src/kicadtoNgspice/Processing.pyc diff --git a/src/modelParamXML/Analog/temp.xml b/src/modelParamXML/Analog/temp.xml index 2bce2a66..20f00004 100644 --- a/src/modelParamXML/Analog/temp.xml +++ b/src/modelParamXML/Analog/temp.xml @@ -3,9 +3,10 @@ <type>Analog</type> <node_number>2</node_number> <title>Add Parameter for model gain</title> +<split>None</split> <param> - <in_offset>Enter offset for input (default=0.0):</in_offset> - <gain>Enter gain (default=1.0):</gain> - <out_offset>Enter offset for output (default=0.0):</out_offset> + <in_offset default="0.0">Enter offset for input (default=0.0)</in_offset> + <gain vector="2" default="1.0">Enter gain (default=1.0)</gain> + <out_offset default="0.0">Enter offset for output (default=0.0)</out_offset> </param> </model>
\ No newline at end of file |