diff options
Diffstat (limited to 'src/ngspicetoModelica/NgspicetoModelica.py')
-rw-r--r-- | src/ngspicetoModelica/NgspicetoModelica.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py index df165fa0..e9855e03 100644 --- a/src/ngspicetoModelica/NgspicetoModelica.py +++ b/src/ngspicetoModelica/NgspicetoModelica.py @@ -513,6 +513,7 @@ class NgMoConverter: elif deviceName=='j': trans = transInfo[words[4]] + """ if trans == 'njf': start = self.mappingData["Devices"][deviceName]["import"]+".J_NJFJFET" elif trans == 'pjf': @@ -520,8 +521,10 @@ class NgMoConverter: else: print "JFET "+str(trans)+" Not found" sys.exit(1) + """ + start = self.mappingData["Devices"][deviceName]["import"] - stat = start+" "+words[0]+"(" + stat = start+" "+words[0]+"(modelcard(" tempstatList=[] userDeviceParamList=[] refName = words[4] @@ -541,7 +544,7 @@ class NgMoConverter: defaultValue = self.mappingData["Devices"][deviceName]["default"][default] tempstatList.append(default+"="+self.getUnitVal(defaultValue)+" ") - stat += ",".join(str(item) for item in tempstatList)+");" + stat += ",".join(str(item) for item in tempstatList)+"));" modelicaCompInit.append(stat) @@ -786,6 +789,13 @@ class NgMoConverter: connInfo.append(conn) conn = 'connect(' + words[0] + '.E,' + nodeDic[words[3]] + ');' connInfo.append(conn) + elif eachline[0]=='j' or eachline[0]=='J': + conn = 'connect('+words[0]+'.D,' + nodeDic[words[1]]+');' + connInfo.append(conn) + conn = 'connect('+words[0]+'.G,' + nodeDic[words[2]]+');' + connInfo.append(conn) + conn = 'connect('+words[0]+'.S,' + nodeDic[words[3]]+');' + connInfo.append(conn) elif eachline[0]=='m' or eachline[0]=='M': conn = 'connect(' + words[0] + '.D,' + nodeDic[words[1]] + ');' connInfo.append(conn) |