Vasileios Rizeakos
10/14/2024, 11:34 AMStefan Schippers
10/14/2024, 12:20 PMlevel=3
.
It does not work in Xyce unless you remove the level=3 model parameter.
* Test showing Xyce inability to load a standard diode model if
* level=3 is present in model.
.subckt diode_subckt a b
D1 a b D1N4007
.model D1N4007 D level=3
+ IS=7.02767n RS=0.0341512 N=1.80803 EG=1.05743 XTI=5
+ BV=1000 IBV=5e-08 CJO=1e-11 VJ=0.7 M=0.5 FC=0.5 TT=1e-07
.ends diode_subckt
va a 0 0.7
vb b 0 0
X1 a b diode_subckt
**** ngspice
* .options savecurrents
* .control
* save all
* op
* .endc
**** Xyce
.op
.print dc i(va)
.end
***** Reading and parsing netlist...
Netlist error in file test.spice at or near line 5
Model is required for device D1 and no valid model card found.
Simulation aborted due to error. There are 0 MSG_FATAL errors and 1 MSG_ERROR
errors
*** Xyce Abort ***
By removing the level=3 parameter Xyce and ngspice give the same I/V characteristics.Stefan Schippers
10/14/2024, 1:56 PMsky130_fd_pr__diode_pw2nd_05v5
diode subcircuit by removing the level=3
in the inner ndiode
model.
in this case both ngspice and Xyce work, but give different results.
Even ngspice gives very different results with / without level=3.
As of today i trust ngspice results (with models unchanged) a little more for these diodes than Xyce (without the level parameter)
* diode test ngspice vs Xyce
**** change paths according to your PDK installation.
.lib /home/schippes/share/pdk/sky130A/libs.tech/combined/sky130.lib.spice tt
.include /home/schippes/share/pdk/sky130A/libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice
VVCC VCC 0 1.8
VA A 0 dc 1.8
X1 A GND GND VCC VCC sky130_fd_sc_hd__diode_2
**** ngspice
* .option savecurrents
* .control
* save all
* op
* print i(VA)
* .endc
**** Xyce. Works only if level=3 is removed in ndiode model
**** inside sky130_fd_pr__diode_pw2nd_05v5 subcircuit in file
**** .../share/pdk/sky130A/libs.tech/combined/continuous/models_diodes.spice
VGND GND 0 0
.op
.print dc i(VA)
.end
Vasileios Rizeakos
10/14/2024, 3:29 PMStefan Schippers
10/14/2024, 3:34 PMTim Edwards
10/15/2024, 1:08 AM