summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/deviceModelLibrary/Diode/D.lib22
-rw-r--r--src/deviceModelLibrary/Diode/D.xml15
-rwxr-xr-xsrc/deviceModelLibrary/Diode/ZenerD1N750.lib3
-rw-r--r--src/deviceModelLibrary/Diode/ZenerD1N750.xml24
-rwxr-xr-xsrc/deviceModelLibrary/Templates/D.lib5
-rw-r--r--src/deviceModelLibrary/Templates/D.xml29
-rw-r--r--src/ngspicetoModelica/NgspicetoModelica.py3
7 files changed, 57 insertions, 44 deletions
diff --git a/src/deviceModelLibrary/Diode/D.lib b/src/deviceModelLibrary/Diode/D.lib
index ef18bb50..8a7fb4da 100755
--- a/src/deviceModelLibrary/Diode/D.lib
+++ b/src/deviceModelLibrary/Diode/D.lib
@@ -1,20 +1,2 @@
-.MODEL D1N750 D(
-+ Vj=.75
-+ Nbvl=14.976
-+ Cjo=175p
-+ Rs=.25
-+ Isr=1.859n
-+ Eg=1.11
-+ M=.5516
-+ Nbv=1.6989
-+ N=1
-+ Tbv1=-21.277u
-+ Bv=8.1
-+ Fc=.5
-+ Ikf=0
-+ Nr=2
-+ Ibv=20.245m
-+ Is=880.5E-18
-+ Xti=3
-+ Ibvl=1.9556m
-) \ No newline at end of file
+.model 1n4148 D(is=2.495E-09 rs=4.755E-01 n=1.679E+00 tt=3.030E-09 cjo=1.700E-12 vj=1 m=1.959E-01 bv=1.000E+02 ibv=1.000E-04)
+
diff --git a/src/deviceModelLibrary/Diode/D.xml b/src/deviceModelLibrary/Diode/D.xml
index 8b806d17..8b6b14c8 100644
--- a/src/deviceModelLibrary/Diode/D.xml
+++ b/src/deviceModelLibrary/Diode/D.xml
@@ -1,4 +1,15 @@
<library>
<model_name>D</model_name>
-<ref_model>D1N750</ref_model>
-<param><Vj>.75</Vj><Nbvl>14.976</Nbvl><Cjo>175p</Cjo><Rs>.25</Rs><Isr>1.859n</Isr><Eg>1.11</Eg><M>.5516</M><Nbv>1.6989</Nbv><N>1</N><Tbv1>-21.277u</Tbv1><Bv>8.1</Bv><Fc>.5</Fc><Ikf>0</Ikf><Nr>2</Nr><Ibv>20.245m</Ibv><Is>880.5E-18</Is><Xti>3</Xti><Ibvl>1.9556m</Ibvl></param></library> \ No newline at end of file
+<ref_model>1N4148</ref_model>
+<param>
+ <Is>2.495E-09</Is>
+ <Rs>4.755E-01</Rs>
+ <N>1.679E+00</N>
+ <tt>3.030E-09</tt>
+ <Cjo>1.700E-12</Cjo>
+ <M>1.959E-01</M>
+ <Vj>1</Vj>
+ <Bv>1.000E+02</Bv>
+ <Ibv>1.000E-04</Ibv>
+</param>
+</library>
diff --git a/src/deviceModelLibrary/Diode/ZenerD1N750.lib b/src/deviceModelLibrary/Diode/ZenerD1N750.lib
new file mode 100755
index 00000000..890c37fe
--- /dev/null
+++ b/src/deviceModelLibrary/Diode/ZenerD1N750.lib
@@ -0,0 +1,3 @@
+.model D1N750 D( Is=880.5E-18 Rs=.25 Ikf=0 N=1 Xti=3 Eg=1.11 Cjo=175p M=.5516
++ Vj=.75 Fc=.5 Isr=1.859n Nr=2 Bv=8.1 Ibv=20.245m Nbv=1.6989 Ibvl=1.9556m
++ Nbvl=14.976 Tbv1=-21.277u)
diff --git a/src/deviceModelLibrary/Diode/ZenerD1N750.xml b/src/deviceModelLibrary/Diode/ZenerD1N750.xml
new file mode 100644
index 00000000..546d1156
--- /dev/null
+++ b/src/deviceModelLibrary/Diode/ZenerD1N750.xml
@@ -0,0 +1,24 @@
+<library>
+<model_name>D</model_name>
+<ref_model>D1N750</ref_model>
+<param>
+ <Is>880.5E-18</Is>
+ <Rs>.25</Rs>
+ <Ikf>0</Ikf>
+ <N>1</N>
+ <Xti>3</Xti>
+ <Eg>1.11</Eg>
+ <Cjo>175p</Cjo>
+ <M>.5516</M>
+ <Vj>.75</Vj>
+ <Fc>.5</Fc>
+ <Isr>1.859n</Isr>
+ <Nr>2</Nr>
+ <Bv>8.1</Bv>
+ <Ibv>20.245m</Ibv>
+ <Nbv>1.6989</Nbv>
+ <Ibvl>1.9556m</Ibvl>
+ <Nbvl>14.976</Nbvl>
+ <Tbv1>-21.277u</Tbv1>
+</param>
+</library>
diff --git a/src/deviceModelLibrary/Templates/D.lib b/src/deviceModelLibrary/Templates/D.lib
index 890c37fe..8a7fb4da 100755
--- a/src/deviceModelLibrary/Templates/D.lib
+++ b/src/deviceModelLibrary/Templates/D.lib
@@ -1,3 +1,2 @@
-.model D1N750 D( Is=880.5E-18 Rs=.25 Ikf=0 N=1 Xti=3 Eg=1.11 Cjo=175p M=.5516
-+ Vj=.75 Fc=.5 Isr=1.859n Nr=2 Bv=8.1 Ibv=20.245m Nbv=1.6989 Ibvl=1.9556m
-+ Nbvl=14.976 Tbv1=-21.277u)
+.model 1n4148 D(is=2.495E-09 rs=4.755E-01 n=1.679E+00 tt=3.030E-09 cjo=1.700E-12 vj=1 m=1.959E-01 bv=1.000E+02 ibv=1.000E-04)
+
diff --git a/src/deviceModelLibrary/Templates/D.xml b/src/deviceModelLibrary/Templates/D.xml
index 546d1156..8b6b14c8 100644
--- a/src/deviceModelLibrary/Templates/D.xml
+++ b/src/deviceModelLibrary/Templates/D.xml
@@ -1,24 +1,15 @@
<library>
<model_name>D</model_name>
-<ref_model>D1N750</ref_model>
+<ref_model>1N4148</ref_model>
<param>
- <Is>880.5E-18</Is>
- <Rs>.25</Rs>
- <Ikf>0</Ikf>
- <N>1</N>
- <Xti>3</Xti>
- <Eg>1.11</Eg>
- <Cjo>175p</Cjo>
- <M>.5516</M>
- <Vj>.75</Vj>
- <Fc>.5</Fc>
- <Isr>1.859n</Isr>
- <Nr>2</Nr>
- <Bv>8.1</Bv>
- <Ibv>20.245m</Ibv>
- <Nbv>1.6989</Nbv>
- <Ibvl>1.9556m</Ibvl>
- <Nbvl>14.976</Nbvl>
- <Tbv1>-21.277u</Tbv1>
+ <Is>2.495E-09</Is>
+ <Rs>4.755E-01</Rs>
+ <N>1.679E+00</N>
+ <tt>3.030E-09</tt>
+ <Cjo>1.700E-12</Cjo>
+ <M>1.959E-01</M>
+ <Vj>1</Vj>
+ <Bv>1.000E+02</Bv>
+ <Ibv>1.000E-04</Ibv>
</param>
</library>
diff --git a/src/ngspicetoModelica/NgspicetoModelica.py b/src/ngspicetoModelica/NgspicetoModelica.py
index 3b1752d3..95f991bd 100644
--- a/src/ngspicetoModelica/NgspicetoModelica.py
+++ b/src/ngspicetoModelica/NgspicetoModelica.py
@@ -166,9 +166,12 @@ class NgMoConverter:
"""
Split the number k,u,p,t,g etc into powers e3,e-6 etc
"""
+ print "Val------------->",val
for i in range(0,len(val),1):
+ print "Val[i]----------------->",val[i]
if val[i] in ['k','u','p','t','g','m','n','f']:
newval = val.split(val[i])
+ print "new Value------------>",newval
if val[i] == 'k':
value = newval[0] + 'e3'
if val[i] == 'u':