summaryrefslogtreecommitdiff
path: root/src/ngspicetoModelica/NgspicetoModelica.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngspicetoModelica/NgspicetoModelica.py')
-rw-r--r--src/ngspicetoModelica/NgspicetoModelica.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py
index af926cdb..b512cfef 100644
--- a/src/ngspicetoModelica/NgspicetoModelica.py
+++ b/src/ngspicetoModelica/NgspicetoModelica.py
@@ -241,7 +241,7 @@ class NgMoConverter:
if str(valAfterDecimal)=='None':
pass
else:
- modifiedcompValue += valAfterDecimal
+ modifiedcompValue += '.'+valAfterDecimal
if str(unitValue)=='None':
pass
@@ -342,6 +342,10 @@ class NgMoConverter:
stat = self.mappingData["Sources"][sourceType]["dc"]+' '+compName+'(I='+self.getUnitVal(words[3])+');'
modelicaCompInit.append(stat)
+ #Now empty the source list as it may be used by subcircuit
+ self.sourceDetail[:] = []
+
+ print "Source Detail after processing-------->",self.sourceDetail
#Lets start for device
for eachline in self.deviceDetail:
@@ -508,6 +512,9 @@ class NgMoConverter:
stat += ",".join(str(item) for item in tempstatList)+");"
modelicaCompInit.append(stat)
+ #Empty device details as well
+ self.deviceDetail[:]=[]
+
#Lets start for inbuilt model of ngspice
for eachline in self.inbuiltModelDetail:
words=eachline.split()
@@ -539,6 +546,8 @@ class NgMoConverter:
stat += ",".join(str(item) for item in tempstatList)+");"
modelicaCompInit.append(stat)
+ #Empty inbuilt Model
+ self.inbuiltModelDetail[:] = []
#Lets start for Subcircuit
for eachline in self.subCktDetail: