diff options
author | GauravSupal | 2015-06-30 14:43:38 +0530 |
---|---|---|
committer | GauravSupal | 2015-06-30 14:43:38 +0530 |
commit | f2201054f1602c2252228adcbc9335d8aa18dbac (patch) | |
tree | 25611e8878b6c0131128eede5916661c71d4aaf9 /src/kicadtoNgspice/Processing.py | |
parent | f7cf0e9a67627ed6ce73892a75445ba84e6b9b21 (diff) | |
parent | 0dfbb704aa843baeb75b1f20acbe72fc57ee7707 (diff) | |
download | eSim-f2201054f1602c2252228adcbc9335d8aa18dbac.tar.gz eSim-f2201054f1602c2252228adcbc9335d8aa18dbac.tar.bz2 eSim-f2201054f1602c2252228adcbc9335d8aa18dbac.zip |
Merge pull request #1 from FOSSEE/master
Update
Diffstat (limited to 'src/kicadtoNgspice/Processing.py')
-rw-r--r-- | src/kicadtoNgspice/Processing.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py index fa75320f..67e7dc9d 100644 --- a/src/kicadtoNgspice/Processing.py +++ b/src/kicadtoNgspice/Processing.py @@ -159,8 +159,10 @@ class PrcocessNetlist: for compline in schematicInfo: words = compline.split() compName = words[0] + print "Compline----------------->",compline + print "compName-------------->",compName # Find the IC from schematic - if compName[0]=='u': + if compName[0]=='u' or compName[0] == 'U': # Find the component from the circuit index=schematicInfo.index(compline) compType=words[len(words)-1]; @@ -174,7 +176,7 @@ class PrcocessNetlist: print "Words",words print "compName",compName #Looking if model file is present - if compType != "port": + if compType != "port" and compType != "ic": xmlfile = compType+".xml" #XML Model File count = 0 #Check if model of same name is present modelPath = [] @@ -281,11 +283,22 @@ class PrcocessNetlist: 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: + except Exception as e: print "Unable to parse the model, Please check your your XML file" + print "Exception Message : ",str(e) sys.exit(2) + elif compType == "ic": + schematicInfo.insert(index,"* "+compline) + modelname = "ic" + comment = "* "+compline + title = "Initial Condition for "+compName + type = "NA" #Its is not model + text = "Enter initial voltage at node for "+compline + paramDict[title] = text + modelList.append([index,compline,modelname,compName,comment,title,type,paramDict]) else: schematicInfo.insert(index,"* "+compline) + #print "Count",count #print "UnknownModelList",unknownModelList #print "MultipleModelList",multipleModelList |