From 7439467316fad7746d6ecc8335f7c294a254f869 Mon Sep 17 00:00:00 2001 From: fahim-oscad Date: Tue, 26 Apr 2016 11:45:03 +0530 Subject: Table voltage unit (PWL) resolved --- src/ngspicetoModelica/Mapping.json | 7 ++++--- src/ngspicetoModelica/NgspicetoModelica.py | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ngspicetoModelica/Mapping.json b/src/ngspicetoModelica/Mapping.json index 22a10f43..0387f303 100644 --- a/src/ngspicetoModelica/Mapping.json +++ b/src/ngspicetoModelica/Mapping.json @@ -161,8 +161,9 @@ "meg":"e6", "n":"e-9", "f":"e-15", - "ma":"e-3" - + "ma":"e-3", + "v":"", + "V":"" } -} \ No newline at end of file +} 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) -- cgit