summaryrefslogtreecommitdiff
path: root/src/ngspicetoModelica/NgspicetoModelica.py
diff options
context:
space:
mode:
authorfahim-oscad2016-04-26 11:45:03 +0530
committerfahim-oscad2016-04-26 11:45:03 +0530
commit7439467316fad7746d6ecc8335f7c294a254f869 (patch)
tree19868a2b3db6e1f3f5f2961f51723d682fc4e6a8 /src/ngspicetoModelica/NgspicetoModelica.py
parent7981bce4c6391e585d07011c0a3b122c847ab32a (diff)
downloadeSim-7439467316fad7746d6ecc8335f7c294a254f869.tar.gz
eSim-7439467316fad7746d6ecc8335f7c294a254f869.tar.bz2
eSim-7439467316fad7746d6ecc8335f7c294a254f869.zip
Table voltage unit (PWL) resolved
Diffstat (limited to 'src/ngspicetoModelica/NgspicetoModelica.py')
-rw-r--r--src/ngspicetoModelica/NgspicetoModelica.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py
index ad60a46a..5735db4b 100644
--- a/src/ngspicetoModelica/NgspicetoModelica.py
+++ b/src/ngspicetoModelica/NgspicetoModelica.py
@@ -306,9 +306,9 @@ class NgMoConverter:
for i in range(6,length,2):
if i == length-2:
w = words[i].split(')')
- stat = stat + words[i-1] + ',' + w[0]
+ stat = stat + self.getUnitVal(words[i-1]) + ',' + self.getUnitVal(w[0])
else:
- stat = stat + words[i-1] + ',' + words[i] + ';'
+ stat = stat + self.getUnitVal(words[i-1]) + ',' + self.getUnitVal(words[i]) + ';'
stat = stat + ']);'
modelicaCompInit.append(stat)
if typ[0] == words[3] and typ[0] != "dc":
@@ -321,7 +321,6 @@ class NgMoConverter:
modelicaCompInit.append(stat)
elif sourceType=='i':
- print "Word---------------->",words[3]
stat = self.mappingData["Sources"][sourceType]["dc"]+' '+compName+'(I='+self.getUnitVal(words[3])+');'
modelicaCompInit.append(stat)