From aa75ea9814d9893fc02564dc25e5444ce5ea3439 Mon Sep 17 00:00:00 2001
From: rahulp13
Date: Mon, 13 Apr 2020 16:55:31 +0530
Subject: merged PR #131

---
 library/ngspicetoModelica/Mapping.json | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'library')

diff --git a/library/ngspicetoModelica/Mapping.json b/library/ngspicetoModelica/Mapping.json
index e254d66a..b7c8df5d 100644
--- a/library/ngspicetoModelica/Mapping.json
+++ b/library/ngspicetoModelica/Mapping.json
@@ -13,10 +13,11 @@
 		},
 	"Sources":{
 		"v":{
-			"pulse":"Analog.Sources.TrapezoidVoltage",
-			"sine":"Analog.Sources.SineVoltage",
+			"pulse" : "Analog.Sources.TrapezoidVoltage",
+			"sine" : "Analog.Sources.SineVoltage",
 			"pwl" : "Analog.Sources.TableVoltage",
-			"dc" : "Analog.Sources.ConstantVoltage"
+			"dc" : "Analog.Sources.ConstantVoltage",
+			"ac" : "Analog.Sources.ConstantVoltage"
 		},
 
 		"i":{
-- 
cgit 


From 29074935e8ae45bd8008cbc477be1f71baf0b857 Mon Sep 17 00:00:00 2001
From: rahulp13
Date: Mon, 20 Apr 2020 11:47:10 +0530
Subject: update to Diode model, resolves issue with duplicate nodes

---
 library/ngspicetoModelica/Mapping.json | 65 ++++++++++++++++++++++++++--------
 1 file changed, 50 insertions(+), 15 deletions(-)

(limited to 'library')

diff --git a/library/ngspicetoModelica/Mapping.json b/library/ngspicetoModelica/Mapping.json
index b7c8df5d..d0c4fb1c 100644
--- a/library/ngspicetoModelica/Mapping.json
+++ b/library/ngspicetoModelica/Mapping.json
@@ -27,22 +27,55 @@
 		},
 	"Devices":{
 		"d":{
-			"import":"Analog.Semiconductors.Diode",
+			"import":"Spice3.Internal.DIODE",
+			"modelcard":"Spice3.Semiconductors.ModelcardDIODE",
 			"mapping":{
 
-				"is":"Ids"
+				"is":"IS",
+				"rs":"RS",
+				"n":"N",
+				"tt":"TT",
+				"cjo":"CJO",
+				"vj":"VJ",
+				"m":"M",
+				"eg":"EG",
+				"xti":"XTI",
+				"fc":"FC",
+				"bv":"BV",
+				"ibv":"IBV",
+				"tnom":"TNOM",
+				"kf":"KF",
+				"af":"AF",
+				"g":"G"
+
 			},
+			
 			"default":{
-				"Ids":"880.5e-18",
-				"Vt":"0.025",
-				"R":"1e12"
-			}
 
+				"IS":"1e-14",
+				"RS":"0.0",
+				"N":"1.0",
+				"TT":"0.0",
+				"CJO":"0.0",
+				"VJ":"1.0",
+				"M":"0.5",
+				"EG":"1.11",
+				"XTI":"3.0",
+				"FC":"0.5",
+				"BV":"-1e40",
+				"IBV":"1e-3",
+				"TNOM":"27",
+				"KF":"0.0",
+				"AF":"1.0",
+				"G":"0"
+
+			}
 		},
 
 		"m":{
 			"import":"BondLib.Electrical.Analog.Spice",
 			"mapping":{
+			
 				"tnom":"Tnom",
 				"vto":"VT0",
 				"gamma":"GAMMA",
@@ -61,8 +94,8 @@
 				"cgbo":"CGB0",
 				"cgso":"CGS0"
 				
-			
 			},
+			
 			"default":{
 				"Tnom":"300",
 				"VT0":"0",
@@ -82,13 +115,13 @@
 				"CGB0":"0",
 				"CGS0":"0"
 
-
 			}
-
 		},	
+
 		"q":{
 			"import":"Analog.Semiconductors",
 			"mapping":{
+		
 				"bf":"Bf",
 				"br":"Br",
 				"is":"Is",
@@ -102,8 +135,11 @@
 				"mje":"Me",
 				"vjc":"Phic",
 				"mjc":"Mc"
+		
 			},
+		
 			"default":{
+		
 				"Bf":"50",
 				"Br":"0.1",
 				"Is":"1e-16",
@@ -119,12 +155,13 @@
 				"Mc":"0.333"
 
 			}
-
 		},
 
-		 "j":{
+		"j":{
+			
 			"import":"Spice3.Internal.JFET",
 			"mapping":{
+			
 				"kf":"KF",
 				"rs":"RS",
 				"is":"IS",
@@ -142,6 +179,7 @@
 			},
 
 			"default":{
+			
 				"KF":"0",
 				"RS":"0",
 				"IS":"1e-14",
@@ -156,13 +194,10 @@
 				"LAMBDA":"0",
 				"B":"1"
 
-
 			}
 		}
-
-		},
+	},
 	
-
 	"Models":{
 		"zener":{
 			"import":"Analog.Semiconductors.ZDiode",
-- 
cgit 


From 5c7db6b7cd0c6069f121e1684f336feb42b40c37 Mon Sep 17 00:00:00 2001
From: rahulp13
Date: Mon, 20 Apr 2020 14:56:35 +0530
Subject: update library files

---
 library/SubcircuitLibrary/74LS04/74LS04.pro   | 7 ++-----
 library/deviceModelLibrary/Diode/D.lib        | 2 +-
 library/deviceModelLibrary/Transistor/NPN.lib | 6 +++---
 3 files changed, 6 insertions(+), 9 deletions(-)

(limited to 'library')

diff --git a/library/SubcircuitLibrary/74LS04/74LS04.pro b/library/SubcircuitLibrary/74LS04/74LS04.pro
index 38d194c6..f63b751e 100644
--- a/library/SubcircuitLibrary/74LS04/74LS04.pro
+++ b/library/SubcircuitLibrary/74LS04/74LS04.pro
@@ -52,10 +52,10 @@ LibName18=opto
 LibName19=atmel
 LibName20=contrib
 LibName21=power
-LibName22=device
+LibName22=eSim_Plot
 LibName23=transistors
 LibName24=conn
-LibName25=linear
+LibName25=eSim_User
 LibName26=regul
 LibName27=74xx
 LibName28=cmos4000
@@ -67,6 +67,3 @@ LibName33=eSim_Miscellaneous
 LibName34=eSim_Power
 LibName35=eSim_Sources
 LibName36=eSim_Subckt
-LibName37=eSim_User
-LibName38=eSim_Plot
-LibName39=eSim_PSpice
diff --git a/library/deviceModelLibrary/Diode/D.lib b/library/deviceModelLibrary/Diode/D.lib
index 8a7fb4da..f53bf3e0 100644
--- a/library/deviceModelLibrary/Diode/D.lib
+++ b/library/deviceModelLibrary/Diode/D.lib
@@ -1,2 +1,2 @@
-.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)
+.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/library/deviceModelLibrary/Transistor/NPN.lib b/library/deviceModelLibrary/Transistor/NPN.lib
index 6509fe7a..be5f3073 100644
--- a/library/deviceModelLibrary/Transistor/NPN.lib
+++ b/library/deviceModelLibrary/Transistor/NPN.lib
@@ -1,4 +1,4 @@
 .model Q2N2222  NPN( Is=14.34f Xti=3 Eg=1.11 Vaf=74.03 Bf=400 Ne=1.307 
-+ Ise=14.34f Ikf=.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=7.306p 
-+ Mjc=.3416 Vjc=.75 Fc=.5 Cje=22.01p Mje=.377 Vje=.75 Tr=46.91n Tf=411.1p 
-+ Itf=.6 Vtf=1.7 Xtf=3 Rb=10) 
++ Ise=14.34f Ikf=0.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=7.306p 
++ Mjc=0.3416 Vjc=0.75 Fc=0.5 Cje=22.01p Mje=0.377 Vje=0.75 Tr=46.91n Tf=411.1p 
++ Itf=0.6 Vtf=1.7 Xtf=3 Rb=10)
-- 
cgit