From 68d86baddc4c6680e96acf93e479d63137e78764 Mon Sep 17 00:00:00 2001
From: Fahim
Date: Tue, 27 Oct 2015 11:17:38 +0530
Subject: Subject: Added Zener Diode Library and Modified normal Diode
Description: Added Zener Diode Library and Modified normal Diode
---
src/deviceModelLibrary/Diode/D.lib | 22 ++-------------------
src/deviceModelLibrary/Diode/D.xml | 15 ++++++++++++--
src/deviceModelLibrary/Diode/ZenerD1N750.lib | 3 +++
src/deviceModelLibrary/Diode/ZenerD1N750.xml | 24 +++++++++++++++++++++++
src/deviceModelLibrary/Templates/D.lib | 5 ++---
src/deviceModelLibrary/Templates/D.xml | 29 ++++++++++------------------
src/ngspicetoModelica/NgspicetoModelica.py | 3 +++
7 files changed, 57 insertions(+), 44 deletions(-)
create mode 100755 src/deviceModelLibrary/Diode/ZenerD1N750.lib
create mode 100644 src/deviceModelLibrary/Diode/ZenerD1N750.xml
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 @@
D
-D1N750
-.7514.976175p.251.859n1.11.55161.69891-21.277u8.1.50220.245m880.5E-1831.9556m
\ No newline at end of file
+1N4148
+
+ 2.495E-09
+ 4.755E-01
+ 1.679E+00
+ 3.030E-09
+ 1.700E-12
+ 1.959E-01
+ 1
+ 1.000E+02
+ 1.000E-04
+
+
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 @@
+
+D
+D1N750
+
+ 880.5E-18
+ .25
+ 0
+ 1
+ 3
+ 1.11
+ 175p
+ .5516
+ .75
+ .5
+ 1.859n
+ 2
+ 8.1
+ 20.245m
+ 1.6989
+ 1.9556m
+ 14.976
+ -21.277u
+
+
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 @@
D
-D1N750
+1N4148
- 880.5E-18
- .25
- 0
- 1
- 3
- 1.11
- 175p
- .5516
- .75
- .5
- 1.859n
- 2
- 8.1
- 20.245m
- 1.6989
- 1.9556m
- 14.976
- -21.277u
+ 2.495E-09
+ 4.755E-01
+ 1.679E+00
+ 3.030E-09
+ 1.700E-12
+ 1.959E-01
+ 1
+ 1.000E+02
+ 1.000E-04
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':
--
cgit