committed by
Holger Vogt
97 changed files with 0 additions and 217492 deletions
-
46test_cases/ECL/ECL-RO-5.cir
-
25test_cases/ECL/ECL-RO.cir
-
303test_cases/ECL/ECL-RO.kicad_pro
-
1473test_cases/ECL/ECL-RO.kicad_sch
-
107test_cases/ECL/ECL_Bip.kicad_sym
-
24471test_cases/ECL/Transistor_BJT.kicad_sym
-
40test_cases/ECL/model-card-hicumL0V1p11_mod.lib
-
3test_cases/ECL/sym-lib-table
-
0test_cases/capacitor/.empty.txt
-
374test_cases/capacitor/capacitor.c
-
43test_cases/capacitor/netlist.sp
-
160test_cases/capacitor/test_capacitor.py
-
0test_cases/cccs/.empty.txt
-
0test_cases/ccvs/.empty.txt
-
913test_cases/diode/diode.c
-
46test_cases/diode/netlist.sp
-
162test_cases/diode/test_diode.py
-
BINtest_cases/diode/test_osdi.zip
-
46test_cases/diode_mod/netlist.sp
-
58test_cases/diode_mod/netlist_mod.sp
-
43test_cases/hicuml0/DFF_Y_ECL_HICUM.sp
-
59test_cases/hicuml0/DFF_Y_ECL_VBIC.sp
-
1233test_cases/hicuml0/HICUML0-2.va
-
254test_cases/hicuml0/Modelcards/model-card-hicumL0V1p11.lib
-
40test_cases/hicuml0/Modelcards/model-card-hicumL0V1p11_mod.lib
-
23test_cases/hicuml0/bip_subsmod.sp
-
19test_cases/hicuml0/hic0_gum.sp
-
20test_cases/hicuml0/hic0_out.sp
-
35test_cases/hicuml0/vbic_out.sp
-
0test_cases/hicuml2/.empty.txt
-
0test_cases/inductor/.empty.txt
-
0test_cases/multiple_devices/.empty.txt
-
374test_cases/multiple_devices/capacitor.c
-
49test_cases/multiple_devices/netlist.sp
-
364test_cases/multiple_devices/resistor.c
-
172test_cases/multiple_devices/test_multiple.py
-
0test_cases/node_collapsing/.empty.txt
-
831test_cases/node_collapsing/diode.c
-
46test_cases/node_collapsing/netlist.sp
-
148test_cases/node_collapsing/test_diode.py
-
0test_cases/resistor/.empty.txt
-
44test_cases/resistor/netlist.sp
-
364test_cases/resistor/resistor.c
-
180test_cases/resistor/test_resistor.py
-
641test_cases/test-bsimbulk/Modelcards/model.l
-
29test_cases/test-bsimbulk/netlist_mod.sp
-
30test_cases/test-bsimbulk/netlist_mod_pmos.sp
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/10nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/10pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/14nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/14pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/16nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/16pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/20nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/20pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/7nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/hp/7pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/10nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/10pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/14nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/14pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/16nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/16pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/20nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/20pfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/7nfet.pm
-
146test_cases/test-bsimcmg/Modelcards/PTM-MG/modelfiles/lstp/7pfet.pm
-
191test_cases/test-bsimcmg/Modelcards/PTM-MG/models
-
41test_cases/test-bsimcmg/Modelcards/PTM-MG/param.inc
-
137test_cases/test-bsimcmg/Modelcards/modelcard.nmos
-
138test_cases/test-bsimcmg/Modelcards/modelcard.pmos
-
38test_cases/test-bsimcmg/inverter_ro.sp
-
36test_cases/test-bsimcmg/inverter_transient.sp
-
28test_cases/test-bsimcmg/netlist_nmos.sp
-
28test_cases/test-bsimcmg/netlist_pmos.sp
-
47test_cases/test-bsimcmg/noise.sp
-
54test_cases/test-bsimcmg/ringosc_17stg.sp
-
27test_cases/test-bsimcmg/simple_inverter_dc.sp
-
253test_cases/test-psp102/Modelcards/psp102_nmos.mod
-
253test_cases/test-psp102/Modelcards/psp102_pmos.mod
-
89237test_cases/test-psp102/c7552_ann_psp.net
-
39test_cases/test-psp102/psp_inverter.sp
-
33test_cases/test-psp102/psp_out_nmos_nm.sp
-
33test_cases/test-psp102/psp_out_pmos_nm.sp
-
41test_cases/test-psp102/psp_ro.sp
-
30test_cases/test-psp102/psp_transfer.sp
-
283test_cases/test-psp103/Modelcards/psp103_nmos-2.mod
-
283test_cases/test-psp103/Modelcards/psp103_pmos-2.mod
-
89240test_cases/test-psp103/c7552_ann_psp.net
-
65test_cases/test-psp103/psp_inverter.sp
-
33test_cases/test-psp103/psp_out_nmos_nm.sp
-
33test_cases/test-psp103/psp_out_pmos_nm.sp
-
66test_cases/test-psp103/psp_ro.sp
-
31test_cases/test-psp103/psp_transfer.sp
-
586test_cases/testing.py
-
0test_cases/vccs/.empty.txt
-
0test_cases/vcvs/.empty.txt
@ -1,46 +0,0 @@ |
|||
.title ECL nor gate ring oscillator, 9 stages, 734 MHz |
|||
.include "model-card-hicumL0V1p11_mod.lib" |
|||
|
|||
.subckt nor in1 in2 a1 a2 vee GND |
|||
XQ1 Net-_R1-Pad2_ IN1 Net-_Q1-Pad3_ VEE DT1 hicumL0V1p1_c_sbt |
|||
XQ2 Net-_R1-Pad2_ IN2 Net-_Q1-Pad3_ VEE DT1 hicumL0V1p1_c_sbt |
|||
XQ3 Net-_R2-Pad2_ Net-_R3-Pad2_ Net-_Q1-Pad3_ VEE DT1 hicumL0V1p1_c_sbt |
|||
XQ4 GND Net-_R2-Pad2_ A1 VEE DT1 hicumL0V1p1_c_sbt |
|||
XQ5 GND Net-_R1-Pad2_ A2 VEE DT1 hicumL0V1p1_c_sbt |
|||
|
|||
Rt1 DT1 0 1G |
|||
|
|||
R1 GND Net-_R1-Pad2_ 220 |
|||
R2 GND Net-_R2-Pad2_ 220 |
|||
R3 GND Net-_R3-Pad2_ 575 |
|||
R4 Net-_R3-Pad2_ VEE 1.92k |
|||
R5 Net-_Q1-Pad3_ VEE 780 |
|||
|
|||
Ra1 A1 VEE 510 |
|||
Ra2 A2 VEE 510 |
|||
.ends |
|||
|
|||
X1 out9 out9 a1 out1 vee gnd nor |
|||
X2 out1 out1 a2 out2 vee gnd nor |
|||
X3 out2 out2 a3 out3 vee gnd nor |
|||
X4 out3 out3 a4 out4 vee gnd nor |
|||
X5 out4 out4 a5 out5 vee gnd nor |
|||
X6 out5 out5 a2 out6 vee gnd nor |
|||
X7 out6 out6 a3 out7 vee gnd nor |
|||
X8 out7 out7 a4 out8 vee gnd nor |
|||
X9 out8 out8 a5 out9 vee gnd nor |
|||
|
|||
V1 VEE GND -5.2 |
|||
|
|||
.tran 0.02n 200n |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/HICUML0-2.osdi |
|||
run |
|||
rusage |
|||
plot out9 |
|||
linearize out9 |
|||
fft out9 |
|||
plot mag(out9) xlimit 0 2G ylimit 0 0.5 |
|||
.endc |
|||
.end |
|||
@ -1,25 +0,0 @@ |
|||
.title KiCad schematic |
|||
.include "model-card-hicumL0V1p11_mod.lib" |
|||
V2 IN1 GND dc -1.75 pulse(-1.75 -0.9 0 1n 1n 5u 10u) |
|||
V1 VEE GND -5.2 |
|||
Ra1 A1 VEE 510 |
|||
XQ5 GND Net-_Q1-Pad1_ A2 VEE DT hicumL0V1p1_c_sbt |
|||
XQ4 GND Net-_Q3-Pad1_ A1 VEE DT hicumL0V1p1_c_sbt |
|||
R4 Net-_Q3-Pad2_ VEE 1.92k |
|||
XQ2 Net-_Q1-Pad1_ IN2 Net-_Q1-Pad3_ VEE DT hicumL0V1p1_c_sbt |
|||
XQ1 Net-_Q1-Pad1_ IN1 Net-_Q1-Pad3_ VEE DT hicumL0V1p1_c_sbt |
|||
R5 Net-_Q1-Pad3_ VEE 780 |
|||
XQ3 Net-_Q3-Pad1_ Net-_Q3-Pad2_ Net-_Q1-Pad3_ VEE DT hicumL0V1p1_c_sbt |
|||
R2 GND Net-_Q3-Pad1_ 220 |
|||
R1 GND Net-_Q1-Pad1_ 220 |
|||
R3 GND Net-_Q3-Pad2_ 575 |
|||
Ra2 A2 VEE 510 |
|||
V3 In2 GND dc -1.75 pulse(-1.75 -0.9 0 1n 1n 2.5u 5u) |
|||
Rt1 DT GND 1G |
|||
.tran 0.1n 100u |
|||
.control |
|||
pre_osdi test_osdi_win/HICUML0-2.osdi |
|||
run |
|||
plot a1 a2+2 in1+4 in2+6 |
|||
.endc |
|||
.end |
|||
@ -1,303 +0,0 @@ |
|||
{ |
|||
"board": { |
|||
"layer_presets": [] |
|||
}, |
|||
"boards": [], |
|||
"cvpcb": { |
|||
"equivalence_files": [] |
|||
}, |
|||
"erc": { |
|||
"erc_exclusions": [], |
|||
"meta": { |
|||
"version": 0 |
|||
}, |
|||
"pin_map": [ |
|||
[ |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
2, |
|||
0, |
|||
1, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
2, |
|||
2, |
|||
2, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
1, |
|||
0, |
|||
1, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
1, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
1, |
|||
1, |
|||
2, |
|||
1, |
|||
1, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
2 |
|||
], |
|||
[ |
|||
1, |
|||
1, |
|||
1, |
|||
1, |
|||
1, |
|||
0, |
|||
1, |
|||
1, |
|||
1, |
|||
1, |
|||
1, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
0, |
|||
0, |
|||
0, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
2, |
|||
1, |
|||
2, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
2, |
|||
2, |
|||
2, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
2, |
|||
0, |
|||
1, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
2, |
|||
0, |
|||
0, |
|||
2 |
|||
], |
|||
[ |
|||
0, |
|||
2, |
|||
1, |
|||
1, |
|||
0, |
|||
0, |
|||
1, |
|||
0, |
|||
2, |
|||
0, |
|||
0, |
|||
2 |
|||
], |
|||
[ |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2, |
|||
2 |
|||
] |
|||
], |
|||
"rule_severities": { |
|||
"bus_definition_conflict": "error", |
|||
"bus_entry_needed": "error", |
|||
"bus_label_syntax": "error", |
|||
"bus_to_bus_conflict": "error", |
|||
"bus_to_net_conflict": "error", |
|||
"different_unit_footprint": "error", |
|||
"different_unit_net": "error", |
|||
"duplicate_reference": "error", |
|||
"duplicate_sheet_names": "error", |
|||
"extra_units": "error", |
|||
"global_label_dangling": "warning", |
|||
"hier_label_mismatch": "error", |
|||
"label_dangling": "error", |
|||
"lib_symbol_issues": "warning", |
|||
"multiple_net_names": "warning", |
|||
"net_not_bus_member": "warning", |
|||
"no_connect_connected": "warning", |
|||
"no_connect_dangling": "warning", |
|||
"pin_not_connected": "error", |
|||
"pin_not_driven": "error", |
|||
"pin_to_pin": "warning", |
|||
"power_pin_not_driven": "error", |
|||
"similar_labels": "warning", |
|||
"unannotated": "error", |
|||
"unit_value_mismatch": "error", |
|||
"unresolved_variable": "error", |
|||
"wire_dangling": "error" |
|||
} |
|||
}, |
|||
"libraries": { |
|||
"pinned_footprint_libs": [], |
|||
"pinned_symbol_libs": [] |
|||
}, |
|||
"meta": { |
|||
"filename": "ECL-RO.kicad_pro", |
|||
"version": 1 |
|||
}, |
|||
"net_settings": { |
|||
"classes": [ |
|||
{ |
|||
"bus_width": 12.0, |
|||
"clearance": 0.2, |
|||
"diff_pair_gap": 0.25, |
|||
"diff_pair_via_gap": 0.25, |
|||
"diff_pair_width": 0.2, |
|||
"line_style": 0, |
|||
"microvia_diameter": 0.3, |
|||
"microvia_drill": 0.1, |
|||
"name": "Default", |
|||
"pcb_color": "rgba(0, 0, 0, 0.000)", |
|||
"schematic_color": "rgba(0, 0, 0, 0.000)", |
|||
"track_width": 0.25, |
|||
"via_diameter": 0.8, |
|||
"via_drill": 0.4, |
|||
"wire_width": 6.0 |
|||
} |
|||
], |
|||
"meta": { |
|||
"version": 2 |
|||
}, |
|||
"net_colors": null |
|||
}, |
|||
"pcbnew": { |
|||
"last_paths": { |
|||
"gencad": "", |
|||
"idf": "", |
|||
"netlist": "", |
|||
"specctra_dsn": "", |
|||
"step": "", |
|||
"vrml": "" |
|||
}, |
|||
"page_layout_descr_file": "" |
|||
}, |
|||
"schematic": { |
|||
"annotate_start_num": 0, |
|||
"drawing": { |
|||
"default_line_thickness": 6.0, |
|||
"default_text_size": 50.0, |
|||
"field_names": [], |
|||
"intersheets_ref_own_page": false, |
|||
"intersheets_ref_prefix": "", |
|||
"intersheets_ref_short": false, |
|||
"intersheets_ref_show": false, |
|||
"intersheets_ref_suffix": "", |
|||
"junction_size_choice": 3, |
|||
"label_size_ratio": 0.375, |
|||
"pin_symbol_size": 25.0, |
|||
"text_offset_ratio": 0.15 |
|||
}, |
|||
"legacy_lib_dir": "", |
|||
"legacy_lib_list": [], |
|||
"meta": { |
|||
"version": 1 |
|||
}, |
|||
"net_format_name": "Spice", |
|||
"ngspice": { |
|||
"fix_include_paths": true, |
|||
"fix_passive_vals": false, |
|||
"meta": { |
|||
"version": 0 |
|||
}, |
|||
"model_mode": 4, |
|||
"workbook_filename": "555bip.wbk" |
|||
}, |
|||
"page_layout_descr_file": "", |
|||
"plot_directory": "", |
|||
"spice_adjust_passive_values": false, |
|||
"spice_external_command": "C:\\Spice64\\bin\\ngspice-2022-osdi.exe \"%I\"", |
|||
"subpart_first_id": 65, |
|||
"subpart_id_separator": 0 |
|||
}, |
|||
"sheets": [ |
|||
[ |
|||
"35461762-06be-4c9e-bf12-e38db35c4dcf", |
|||
"" |
|||
] |
|||
], |
|||
"text_variables": {} |
|||
} |
|||
1473
test_cases/ECL/ECL-RO.kicad_sch
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,107 +0,0 @@ |
|||
(kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor) |
|||
(symbol "npn" (pin_numbers hide) (pin_names (offset 0) hide) (in_bom yes) (on_board yes) |
|||
(property "Reference" "Q1" (id 0) (at 6.096 1.6511 0) |
|||
(effects (font (size 1.27 1.27)) (justify left)) |
|||
) |
|||
(property "Value" "npn" (id 1) (at 6.096 -0.8889 0) |
|||
(effects (font (size 1.27 1.27)) (justify left)) |
|||
) |
|||
(property "Footprint" "" (id 2) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27) italic) hide) |
|||
) |
|||
(property "Datasheet" "" (id 3) (at -2.54 0 0) |
|||
(effects (font (size 1.27 1.27)) (justify left) hide) |
|||
) |
|||
(property "Spice_Primitive" "Q" (id 4) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27)) hide) |
|||
) |
|||
(property "Spice_Model" "NP" (id 5) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27)) hide) |
|||
) |
|||
(property "Spice_Netlist_Enabled" "Y" (id 6) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27)) hide) |
|||
) |
|||
(property "Spice_Lib_File" "bipmod.lib" (id 7) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27)) hide) |
|||
) |
|||
(property "ki_keywords" "Transistor Double NPN" (id 8) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27)) hide) |
|||
) |
|||
(property "ki_description" "100mA IC, 30V Vce, Double NPN Transistors, Current mirror configuration, SOT-143" (id 9) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27)) hide) |
|||
) |
|||
(property "ki_fp_filters" "SOT?143*" (id 10) (at 0 0 0) |
|||
(effects (font (size 1.27 1.27)) hide) |
|||
) |
|||
(symbol "npn_0_0" |
|||
(pin passive line (at 6.604 -5.08 90) (length 2.54) |
|||
(name "S" (effects (font (size 1.27 1.27)))) |
|||
(number "4" (effects (font (size 1.27 1.27)))) |
|||
) |
|||
(pin passive line (at 8.128 -5.08 90) (length 2.54) |
|||
(name "DT" (effects (font (size 1.27 1.27)))) |
|||
(number "5" (effects (font (size 1.27 1.27)))) |
|||
) |
|||
) |
|||
(symbol "npn_0_1" |
|||
(polyline |
|||
(pts |
|||
(xy 2.54 0) |
|||
(xy 3.302 0) |
|||
) |
|||
(stroke (width 0.1524) (type default) (color 0 0 0 0)) |
|||
(fill (type none)) |
|||
) |
|||
(polyline |
|||
(pts |
|||
(xy 5.08 -2.54) |
|||
(xy 3.175 -0.635) |
|||
) |
|||
(stroke (width 0) (type default) (color 0 0 0 0)) |
|||
(fill (type none)) |
|||
) |
|||
(polyline |
|||
(pts |
|||
(xy 5.08 2.54) |
|||
(xy 3.175 0.635) |
|||
) |
|||
(stroke (width 0) (type default) (color 0 0 0 0)) |
|||
(fill (type none)) |
|||
) |
|||
(polyline |
|||
(pts |
|||
(xy 3.175 -1.905) |
|||
(xy 3.175 1.905) |
|||
(xy 3.175 1.905) |
|||
) |
|||
(stroke (width 0.508) (type default) (color 0 0 0 0)) |
|||
(fill (type outline)) |
|||
) |
|||
(polyline |
|||
(pts |
|||
(xy 3.81 -1.778) |
|||
(xy 4.318 -1.27) |
|||
(xy 4.826 -2.286) |
|||
(xy 3.81 -1.778) |
|||
(xy 3.81 -1.778) |
|||
) |
|||
(stroke (width 0) (type default) (color 0 0 0 0)) |
|||
(fill (type outline)) |
|||
) |
|||
) |
|||
(symbol "npn_1_1" |
|||
(pin passive line (at 5.08 5.08 270) (length 2.54) |
|||
(name "C" (effects (font (size 1.27 1.27)))) |
|||
(number "1" (effects (font (size 1.27 1.27)))) |
|||
) |
|||
(pin passive line (at 0 0 0) (length 2.54) |
|||
(name "B" (effects (font (size 1.27 1.27)))) |
|||
(number "2" (effects (font (size 1.27 1.27)))) |
|||
) |
|||
(pin passive line (at 5.08 -5.08 90) (length 2.54) |
|||
(name "E" (effects (font (size 1.27 1.27)))) |
|||
(number "3" (effects (font (size 1.27 1.27)))) |
|||
) |
|||
) |
|||
) |
|||
) |
|||
24471
test_cases/ECL/Transistor_BJT.kicad_sym
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,40 +0,0 @@ |
|||
******************************************************************************** |
|||
******************************************************************************** |
|||
* HICUM Level0 Version 1.1 model cards for testing |
|||
******************************************************************************** |
|||
******************************************************************************** |
|||
* 1D transistor: Isothermal Simulation and Temperature dependence |
|||
******************************************************************************** |
|||
|
|||
******************************************************************************** |
|||
* Complete transistor: Isothermal Simulation with substrate diode |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c_sbt c b e s dt |
|||
*qhcm0 c b e s dt hic0_full |
|||
nqhcm0 c b e s dt hic0_full |
|||
*.model hic0_full npn |
|||
.ends |
|||
.model hic0_full hicumL0va |
|||
+ level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=1.0e-17 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=3.64e-14 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 type=1 ; npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
******************************************************************************** |
|||
* Complete test transistor: default |
|||
******************************************************************************** |
|||
.subckt hicumL0V11_default c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.ends hicumL0V11_default |
|||
******************************************************************************** |
|||
|
|||
|
|||
@ -1,3 +0,0 @@ |
|||
(sym_lib_table |
|||
(lib (name "ECL_Bip")(type "KiCad")(uri "${KIPRJMOD}/ECL_Bip.kicad_sym")(options "")(descr "")) |
|||
) |
|||
@ -1,374 +0,0 @@ |
|||
/* |
|||
* This file is part of the OSDI component of NGSPICE. |
|||
* Copyright© 2022 SemiMod GmbH. |
|||
* |
|||
* This Source Code Form is subject to the terms of the Mozilla Public |
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. |
|||
* |
|||
* Author: Pascal Kuthe <pascal.kuthe@semimod.de> |
|||
* |
|||
* This is an exemplary implementation of the OSDI interface for the Verilog-A |
|||
* model specified in diode.va. In the future, the OpenVAF compiler shall |
|||
* generate an comparable object file. Primary purpose of this is example to |
|||
* have a concrete example for the OSDI interface, OpenVAF will generate a more |
|||
* optimized implementation. |
|||
* |
|||
*/ |
|||
|
|||
#include "osdi.h" |
|||
#include "string.h" |
|||
#include <math.h> |
|||
#include <stdbool.h> |
|||
#include <stddef.h> |
|||
#include <stdint.h> |
|||
#include <stdio.h> |
|||
|
|||
// public interface |
|||
extern uint32_t OSDI_VERSION_MAJOR; |
|||
extern uint32_t OSDI_VERSION_MINOR; |
|||
extern uint32_t OSDI_NUM_DESCRIPTORS; |
|||
extern OsdiDescriptor OSDI_DESCRIPTORS[1]; |
|||
|
|||
// number of nodes and definitions of node ids for nicer syntax in this file |
|||
// note: order should be same as "nodes" list defined later |
|||
#define NUM_NODES 3 |
|||
#define P 0 |
|||
#define M 1 |
|||
|
|||
// number of matrix entries and definitions for Jacobian entries for nicer |
|||
// syntax in this file |
|||
#define NUM_MATRIX 4 |
|||
#define P_P 0 |
|||
#define P_M 1 |
|||
#define M_P 2 |
|||
#define M_M 3 |
|||
|
|||
// The model structure for the diode |
|||
typedef struct CapacitorModel |
|||
{ |
|||
double C; |
|||
bool C_given; |
|||
} CapacitorModel; |
|||
|
|||
// The instace structure for the diode |
|||
typedef struct CapacitorInstance |
|||
{ |
|||
double temperature; |
|||
double rhs_resist[NUM_NODES]; |
|||
double rhs_react[NUM_NODES]; |
|||
double jacobian_resist[NUM_MATRIX]; |
|||
double jacobian_react[NUM_MATRIX]; |
|||
double *jacobian_ptr_resist[NUM_MATRIX]; |
|||
double *jacobian_ptr_react[NUM_MATRIX]; |
|||
uint32_t node_off[NUM_NODES]; |
|||
} CapacitorInstance; |
|||
|
|||
// implementation of the access function as defined by the OSDI spec |
|||
void *osdi_access(void *inst_, void *model_, uint32_t id, uint32_t flags) |
|||
{ |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
bool *given; |
|||
void *value; |
|||
|
|||
switch (id) // id of params defined in param_opvar array |
|||
{ |
|||
case 0: |
|||
value = (void *)&model->C; |
|||
given = &model->C_given; |
|||
break; |
|||
default: |
|||
return NULL; |
|||
} |
|||
|
|||
if (flags & ACCESS_FLAG_SET) |
|||
{ |
|||
*given = true; |
|||
} |
|||
|
|||
return value; |
|||
} |
|||
|
|||
// implementation of the setup_model function as defined in the OSDI spec |
|||
OsdiInitInfo setup_model(void *_handle, void *model_) |
|||
{ |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
|
|||
// set parameters and check bounds |
|||
if (!model->C_given) |
|||
{ |
|||
model->C = 1e-15; |
|||
} |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the setup_instace function as defined in the OSDI spec |
|||
OsdiInitInfo setup_instance(void *_handle, void *inst_, void *model_, |
|||
double temperature, uint32_t _num_terminals) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
|
|||
inst->temperature = temperature; |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the eval function as defined in the OSDI spec |
|||
uint32_t eval(void *handle, void *inst_, void *model_, uint32_t flags, |
|||
double *prev_solve, OsdiSimParas *sim_params) |
|||
{ |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
// get voltages |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
double vpm = vp - vm; |
|||
|
|||
double gmin = 1e-12; |
|||
for (int i = 0; sim_params->names[i] != NULL; i++) |
|||
{ |
|||
if (strcmp(sim_params->names[i], "gmin") == 0) |
|||
{ |
|||
gmin = sim_params->vals[i]; |
|||
} |
|||
} |
|||
|
|||
double qc_vpm = model->C; |
|||
double qc = model->C * vpm; |
|||
|
|||
//////////////////////////////// |
|||
// evaluate model equations |
|||
//////////////////////////////// |
|||
|
|||
if (flags & CALC_REACT_RESIDUAL) |
|||
{ |
|||
// write react rhs |
|||
inst->rhs_react[P] = qc; |
|||
inst->rhs_react[M] = -qc; |
|||
} |
|||
|
|||
////////////////// |
|||
// write Jacobian |
|||
////////////////// |
|||
|
|||
if (flags & CALC_REACT_JACOBIAN) |
|||
{ |
|||
// write react matrix |
|||
// stamp Qd between nodes A and Ci depending also on dT |
|||
inst->jacobian_react[P_P] = qc_vpm; |
|||
inst->jacobian_react[P_M] = -qc_vpm; |
|||
inst->jacobian_react[M_P] = -qc_vpm; |
|||
inst->jacobian_react[M_M] = qc_vpm; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
// TODO implementation of the load_noise function as defined in the OSDI spec |
|||
void load_noise(void *inst, void *model, double freq, double *noise_dens, |
|||
double *ln_noise_dens) |
|||
{ |
|||
// TODO add noise to example |
|||
} |
|||
|
|||
#define LOAD_RHS_RESIST(name) \ |
|||
dst[inst->node_off[name]] += inst->rhs_resist[name]; |
|||
|
|||
// implementation of the load_rhs_resist function as defined in the OSDI spec |
|||
void load_residual_resist(void *inst_, double *dst) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
LOAD_RHS_RESIST(P) |
|||
LOAD_RHS_RESIST(M) |
|||
} |
|||
|
|||
#define LOAD_RHS_REACT(name) dst[inst->node_off[name]] += inst->rhs_react[name]; |
|||
|
|||
// implementation of the load_rhs_react function as defined in the OSDI spec |
|||
void load_residual_react(void *inst_, double *dst) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
LOAD_RHS_REACT(P) |
|||
LOAD_RHS_REACT(M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_RESIST(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_resist[name]; |
|||
|
|||
// implementation of the load_matrix_resist function as defined in the OSDI spec |
|||
void load_jacobian_resist(void *inst_) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
LOAD_MATRIX_RESIST(P_P) |
|||
LOAD_MATRIX_RESIST(P_M) |
|||
LOAD_MATRIX_RESIST(M_P) |
|||
LOAD_MATRIX_RESIST(M_M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_REACT(name) \ |
|||
*inst->jacobian_ptr_react[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_react function as defined in the OSDI spec |
|||
void load_jacobian_react(void *inst_, double alpha) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
LOAD_MATRIX_REACT(P_P) |
|||
LOAD_MATRIX_REACT(M_M) |
|||
LOAD_MATRIX_REACT(P_M) |
|||
LOAD_MATRIX_REACT(M_P) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_TRAN(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_tran function as defined in the OSDI spec |
|||
void load_jacobian_tran(void *inst_, double alpha) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
// set dc stamps |
|||
load_jacobian_resist(inst_); |
|||
|
|||
// add reactive contributions |
|||
LOAD_MATRIX_TRAN(P_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
LOAD_MATRIX_TRAN(M_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_dc function as defined in the OSDI spec |
|||
void load_spice_rhs_dc(void *inst_, double *dst, double *prev_solve) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
dst[inst->node_off[P]] += inst->jacobian_resist[P_M] * vm + |
|||
inst->jacobian_resist[P_P] * vp - |
|||
inst->rhs_resist[P]; |
|||
|
|||
dst[inst->node_off[M]] += inst->jacobian_resist[M_P] * vp + |
|||
inst->jacobian_resist[M_M] * vm - |
|||
inst->rhs_resist[M]; |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_tran function as defined in the OSDI |
|||
// spec |
|||
void load_spice_rhs_tran(void *inst_, double *dst, double *prev_solve, |
|||
double alpha) |
|||
{ |
|||
|
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
// set DC rhs |
|||
load_spice_rhs_dc(inst_, dst, prev_solve); |
|||
|
|||
// add contributions due to reactive elements |
|||
dst[inst->node_off[P]] += |
|||
alpha * (inst->jacobian_react[P_P] * vp + |
|||
inst->jacobian_react[P_M] * vm); |
|||
|
|||
dst[inst->node_off[M]] += alpha * (inst->jacobian_react[M_M] * vm + |
|||
inst->jacobian_react[M_P] * vp); |
|||
} |
|||
|
|||
// structure that provides information of all nodes of the model |
|||
OsdiNode nodes[NUM_NODES] = { |
|||
{.name = "P", .units = "V", .is_reactive = true}, |
|||
{.name = "M", .units = "V", .is_reactive = true}, |
|||
}; |
|||
|
|||
// boolean array that tells which Jacobian entries are constant. Nothing is |
|||
// constant with selfheating, though. |
|||
bool const_jacobian_entries[NUM_MATRIX] = {}; |
|||
// these node pairs specify which entries in the Jacobian must be accounted for |
|||
OsdiNodePair jacobian_entries[NUM_MATRIX] = { |
|||
{P, P}, |
|||
{P, M}, |
|||
{M, P}, |
|||
{M, M}, |
|||
}; |
|||
|
|||
#define NUM_PARAMS 1 |
|||
// the model parameters as defined in Verilog-A, bounds and default values are |
|||
// stored elsewhere as they may depend on model parameters etc. |
|||
OsdiParamOpvar params[NUM_PARAMS] = { |
|||
{ |
|||
.name = (char *[]){"C"}, |
|||
.num_alias = 0, |
|||
.description = "Capacitance", |
|||
.units = "Farad", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
}; |
|||
|
|||
// fill exported data |
|||
uint32_t OSDI_VERSION_MAJOR = OSDI_VERSION_MAJOR_CURR; |
|||
uint32_t OSDI_VERSION_MINOR = OSDI_VERSION_MINOR_CURR; |
|||
uint32_t OSDI_NUM_DESCRIPTORS = 1; |
|||
// this is the main structure used by simulators, it gives access to all |
|||
// information in a model |
|||
OsdiDescriptor OSDI_DESCRIPTORS[1] = {{ |
|||
// metadata |
|||
.name = "capacitor_va", |
|||
|
|||
// nodes |
|||
.num_nodes = NUM_NODES, |
|||
.num_terminals = 2, |
|||
.nodes = (OsdiNode *)&nodes, |
|||
|
|||
// matrix entries |
|||
.num_jacobian_entries = NUM_MATRIX, |
|||
.jacobian_entries = (OsdiNodePair *)&jacobian_entries, |
|||
.const_jacobian_entries = (bool *)&const_jacobian_entries, |
|||
|
|||
// memory |
|||
.instance_size = sizeof(CapacitorInstance), |
|||
.model_size = sizeof(CapacitorModel), |
|||
.residual_resist_offset = offsetof(CapacitorInstance, rhs_resist), |
|||
.residual_react_offset = offsetof(CapacitorInstance, rhs_react), |
|||
.node_mapping_offset = offsetof(CapacitorInstance, node_off), |
|||
.jacobian_resist_offset = offsetof(CapacitorInstance, jacobian_resist), |
|||
.jacobian_react_offset = offsetof(CapacitorInstance, jacobian_react), |
|||
.jacobian_ptr_resist_offset = offsetof(CapacitorInstance, jacobian_ptr_resist), |
|||
.jacobian_ptr_react_offset = offsetof(CapacitorInstance, jacobian_ptr_react), |
|||
|
|||
// TODO add node collapsing to example |
|||
// node collapsing |
|||
.num_collapsible = 0, |
|||
.collapsible = NULL, |
|||
.is_collapsible_offset = 0, |
|||
|
|||
// noise |
|||
.noise_sources = NULL, |
|||
.num_noise_src = 0, |
|||
|
|||
// parameters and op vars |
|||
.num_params = NUM_PARAMS, |
|||
.num_instance_params = 0, |
|||
.num_opvars = 0, |
|||
.param_opvar = (OsdiParamOpvar *)¶ms, |
|||
|
|||
// setup |
|||
.access = &osdi_access, |
|||
.setup_model = &setup_model, |
|||
.setup_instance = &setup_instance, |
|||
.eval = &eval, |
|||
.load_noise = &load_noise, |
|||
.load_residual_resist = &load_residual_resist, |
|||
.load_residual_react = &load_residual_react, |
|||
.load_spice_rhs_dc = &load_spice_rhs_dc, |
|||
.load_spice_rhs_tran = &load_spice_rhs_tran, |
|||
.load_jacobian_resist = &load_jacobian_resist, |
|||
.load_jacobian_react = &load_jacobian_react, |
|||
.load_jacobian_tran = &load_jacobian_tran, |
|||
}}; |
|||
@ -1,43 +0,0 @@ |
|||
OSDI Capacitor Test |
|||
.options abstol=1e-15 |
|||
|
|||
|
|||
* one voltage source for sweeping, one for sensing: |
|||
VD Dx 0 DC 0 AC 1 SIN (0.5 0.2 1M) |
|||
Vsense Dx D DC 0 |
|||
|
|||
* model definitions: |
|||
.model cmod_osdi capacitor_va c=5e-12 |
|||
|
|||
*OSDI Capacitor: |
|||
*OSDI_ACTIVATE*A1 D 0 cmod_osdi |
|||
|
|||
*Built-in Capacitor: |
|||
*BUILT_IN_ACTIVATE*C1 D 0 5e-12 |
|||
|
|||
|
|||
.control |
|||
pre_osdi capacitor.osdi |
|||
set filetype=ascii |
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
|
|||
* a DC sweep from 0.3V to 1V |
|||
dc Vd 0.3 1.0 0.01 |
|||
wrdata dc_sim.ngspice v(d) i(vsense) |
|||
|
|||
* an AC sweep at Vd=0.5V |
|||
alter VD=0.5 |
|||
ac dec 10 .01 10 |
|||
wrdata ac_sim.ngspice v(d) i(vsense) |
|||
|
|||
* a transient analysis |
|||
tran 100ms 500000ms |
|||
wrdata tr_sim.ngspice v(d) i(vsense) |
|||
|
|||
* print number of iterations |
|||
rusage totiter |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,160 +0,0 @@ |
|||
""" test OSDI simulation of capacitor |
|||
""" |
|||
import os, shutil |
|||
import numpy as np |
|||
import pandas as pd |
|||
import sys |
|||
sys.path.append( |
|||
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) |
|||
|
|||
from testing import prepare_test |
|||
|
|||
# This test runs a DC, AC and Transient Simulation of a simple capacitor. |
|||
# The capacitor is available as a C file and needs to be compiled to a shared object |
|||
# and then bet put into /usr/local/share/ngspice/osdi: |
|||
# |
|||
# > make osdi_capacitor |
|||
# > cp capacitor_osdi.so /usr/local/share/ngspice/osdi/capacitor_osdi.so |
|||
# |
|||
# The integration test proves the functioning of the OSDI interface. |
|||
# Future tests will target Verilog-A models like HICUM/L2 that should yield exactly the same results as the Ngspice implementation. |
|||
|
|||
directory = os.path.dirname(__file__) |
|||
|
|||
|
|||
def test_ngspice(): |
|||
dir_osdi, dir_built_in = prepare_test(directory) |
|||
|
|||
# read DC simulation results |
|||
dc_data_osdi = pd.read_csv(os.path.join(dir_osdi, "dc_sim.ngspice"), sep="\\s+") |
|||
dc_data_built_in = pd.read_csv(os.path.join(dir_osdi, "dc_sim.ngspice"), sep="\\s+") |
|||
# dc_data_built_in = pd.read_csv( |
|||
# os.path.join(dir_built_in, "dc_sim.ngspice"), sep="\\s+" |
|||
# ) |
|||
|
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_osdi["i(vsense)"].to_numpy() |
|||
# id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
|
|||
# read AC simulation results |
|||
ac_data_osdi = pd.read_csv(os.path.join(dir_osdi, "ac_sim.ngspice"), sep="\\s+") |
|||
ac_data_built_in = pd.read_csv(os.path.join(dir_osdi, "ac_sim.ngspice"), sep="\\s+") |
|||
# ac_data_built_in = pd.read_csv( |
|||
# os.path.join(dir_built_in, "ac_sim.ngspice"), sep="\\s+" |
|||
# ) |
|||
|
|||
# read TR simulation results |
|||
tr_data_osdi = pd.read_csv(os.path.join(dir_osdi, "tr_sim.ngspice"), sep="\\s+") |
|||
tr_data_built_in = pd.read_csv(os.path.join(dir_osdi, "tr_sim.ngspice"), sep="\\s+") |
|||
# tr_data_built_in = pd.read_csv( |
|||
# os.path.join(dir_built_in, "tr_sim.ngspice"), sep="\\s+" |
|||
# ) |
|||
|
|||
# test simulation results |
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
np.testing.assert_allclose(id_osdi[0:20], id_built_in[0:20], rtol=0.01) |
|||
|
|||
return ( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) = test_ngspice() |
|||
|
|||
import matplotlib.pyplot as plt |
|||
|
|||
# DC Plot |
|||
pd_built_in = dc_data_built_in["v(d)"] * dc_data_built_in["i(vsense)"] |
|||
pd_osdi = dc_data_osdi["v(d)"] * dc_data_osdi["i(vsense)"] |
|||
fig, ax1 = plt.subplots() |
|||
ax1.plot( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
ax1.plot( |
|||
dc_data_osdi["v(d)"], |
|||
dc_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
ax1.set_ylabel(r"$I_{\mathrm{P}} (\mathrm{mA})$") |
|||
ax1.set_xlabel(r"$V_{\mathrm{PM}}(\mathrm{V})$") |
|||
plt.legend() |
|||
|
|||
# AC Plot |
|||
omega = 2 * np.pi * ac_data_osdi["frequency"] |
|||
z_analytical = 5e-12 * omega |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], ac_data_osdi["i(vsense)"] * 1e3, label="OSDI" |
|||
) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Re \\left\{ Y_{11} \\right\} (\\mathrm{mS})$") |
|||
plt.legend() |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense).1"] * 1e12 / omega, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], |
|||
ac_data_osdi["i(vsense).1"] * 1e12 / omega, |
|||
label="OSDI", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], |
|||
np.ones_like(ac_data_osdi["frequency"]) * z_analytical * 1e12 / omega, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
plt.ylim(1, 9) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Im\\left\{Y_{11}\\right\}/(\\omega) (\\mathrm{pF})$") |
|||
plt.legend() |
|||
|
|||
# TR plot |
|||
fig = plt.figure() |
|||
plt.plot( |
|||
tr_data_built_in["time"] * 1e9, |
|||
tr_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.plot( |
|||
tr_data_osdi["time"] * 1e9, |
|||
tr_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
plt.xlabel(r"$t(\mathrm{nS})$") |
|||
plt.ylabel(r"$I_{\mathrm{D}}(\mathrm{mA})$") |
|||
plt.legend() |
|||
|
|||
plt.show() |
|||
@ -1,913 +0,0 @@ |
|||
/* |
|||
* This file is part of the OSDI component of NGSPICE. |
|||
* Copyright© 2022 SemiMod GmbH. |
|||
* |
|||
* This Source Code Form is subject to the terms of the Mozilla Public |
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. |
|||
* |
|||
* Author: Pascal Kuthe <pascal.kuthe@semimod.de> |
|||
* |
|||
* This is an exemplary implementation of the OSDI interface for the Verilog-A |
|||
* model specified in diode.va. In the future, the OpenVAF compiler shall |
|||
* generate an comparable object file. Primary purpose of this is example to |
|||
* have a concrete example for the OSDI interface, OpenVAF will generate a more |
|||
* optimized implementation. |
|||
* |
|||
*/ |
|||
|
|||
#include "osdi.h" |
|||
#include "string.h" |
|||
#include <math.h> |
|||
#include <stdbool.h> |
|||
#include <stddef.h> |
|||
#include <stdint.h> |
|||
#include <stdio.h> |
|||
|
|||
// public interface |
|||
extern uint32_t OSDI_VERSION_MAJOR; |
|||
extern uint32_t OSDI_VERSION_MINOR; |
|||
extern uint32_t OSDI_NUM_DESCRIPTORS; |
|||
extern OsdiDescriptor OSDI_DESCRIPTORS[1]; |
|||
extern OsdiLimFunction OSDI_LIM_TABLE[1]; |
|||
extern uint32_t OSDI_LIM_TABLE_LEN; |
|||
|
|||
#define sqrt2 1.4142135623730950488016887242097 |
|||
|
|||
#define IGNORE(x) (void)x |
|||
|
|||
// number of nodes and definitions of node ids for nicer syntax in this file |
|||
// note: order should be same as "nodes" list defined later |
|||
#define NUM_NODES 4 |
|||
#define A 0 |
|||
#define C 1 |
|||
#define TNODE 2 |
|||
#define CI 3 |
|||
|
|||
#define NUM_COLLAPSIBLE 2 |
|||
|
|||
// number of matrix entries and definitions for Jacobian entries for nicer |
|||
// syntax in this file |
|||
#define NUM_MATRIX 14 |
|||
#define CI_CI 0 |
|||
#define CI_C 1 |
|||
#define C_CI 2 |
|||
#define C_C 3 |
|||
#define A_A 4 |
|||
#define A_CI 5 |
|||
#define CI_A 6 |
|||
#define A_TNODE 7 |
|||
#define C_TNODE 8 |
|||
#define CI_TNODE 9 |
|||
#define TNODE_TNODE 10 |
|||
#define TNODE_A 11 |
|||
#define TNODE_C 12 |
|||
#define TNODE_CI 13 |
|||
|
|||
// The model structure for the diode |
|||
typedef struct DiodeModel { |
|||
double Rs; |
|||
bool Rs_given; |
|||
double Is; |
|||
bool Is_given; |
|||
double zetars; |
|||
bool zetars_given; |
|||
double N; |
|||
bool N_given; |
|||
double Cj0; |
|||
bool Cj0_given; |
|||
double Vj; |
|||
bool Vj_given; |
|||
double M; |
|||
bool M_given; |
|||
double Rth; |
|||
bool Rth_given; |
|||
double zetarth; |
|||
bool zetarth_given; |
|||
double zetais; |
|||
bool zetais_given; |
|||
double Tnom; |
|||
bool Tnom_given; |
|||
double mfactor; // multiplication factor for parallel devices |
|||
bool mfactor_given; |
|||
// InitError errors[MAX_ERROR_NUM], |
|||
} DiodeModel; |
|||
|
|||
// The instace structure for the diode |
|||
typedef struct DiodeInstace { |
|||
double mfactor; // multiplication factor for parallel devices |
|||
bool mfactor_given; |
|||
double temperature; |
|||
double residual_resist[NUM_NODES]; |
|||
double lim_rhs_resist_A; |
|||
double lim_rhs_resist_CI; |
|||
double lim_rhs_react_A; |
|||
double lim_rhs_react_CI; |
|||
double residual_react_A; |
|||
double residual_react_CI; |
|||
double jacobian_resist[NUM_MATRIX]; |
|||
double jacobian_react[NUM_MATRIX]; |
|||
bool collapsed[NUM_COLLAPSIBLE]; |
|||
double *jacobian_ptr_resist[NUM_MATRIX]; |
|||
double *jacobian_ptr_react[NUM_MATRIX]; |
|||
uint32_t node_off[NUM_NODES]; |
|||
uint32_t state_idx; |
|||
} DiodeInstace; |
|||
|
|||
#define EXP_LIM 80.0 |
|||
|
|||
static double limexp(double x) { |
|||
if (x < EXP_LIM) { |
|||
return exp(x); |
|||
} else { |
|||
return exp(EXP_LIM) * (x + 1 - EXP_LIM); |
|||
} |
|||
} |
|||
|
|||
static double dlimexp(double x) { |
|||
if (x < EXP_LIM) { |
|||
return exp(x); |
|||
} else { |
|||
return exp(EXP_LIM); |
|||
} |
|||
} |
|||
|
|||
// implementation of the access function as defined by the OSDI spec |
|||
static void *osdi_access(void *inst_, void *model_, uint32_t id, |
|||
uint32_t flags) { |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
bool *given; |
|||
void *value; |
|||
|
|||
switch (id) // id of params defined in param_opvar array |
|||
{ |
|||
case 0: |
|||
if (flags & ACCESS_FLAG_INSTANCE) { |
|||
value = (void *)&inst->mfactor; |
|||
given = &inst->mfactor_given; |
|||
} else { |
|||
value = (void *)&model->mfactor; |
|||
given = &model->mfactor_given; |
|||
} |
|||
break; |
|||
case 1: |
|||
value = (void *)&model->Rs; |
|||
given = &model->Rs_given; |
|||
break; |
|||
case 2: |
|||
value = (void *)&model->Is; |
|||
given = &model->Is_given; |
|||
break; |
|||
case 3: |
|||
value = (void *)&model->zetars; |
|||
given = &model->zetars_given; |
|||
break; |
|||
case 4: |
|||
value = (void *)&model->N; |
|||
given = &model->N_given; |
|||
break; |
|||
case 5: |
|||
value = (void *)&model->Cj0; |
|||
given = &model->Cj0_given; |
|||
break; |
|||
case 6: |
|||
value = (void *)&model->Vj; |
|||
given = &model->Vj_given; |
|||
break; |
|||
case 7: |
|||
value = (void *)&model->M; |
|||
given = &model->M_given; |
|||
break; |
|||
case 8: |
|||
value = &model->Rth; |
|||
given = &model->Rth_given; |
|||
break; |
|||
case 9: |
|||
value = (void *)&model->zetarth; |
|||
given = &model->zetarth_given; |
|||
break; |
|||
case 10: |
|||
value = (void *)&model->zetais; |
|||
given = &model->zetais_given; |
|||
break; |
|||
case 11: |
|||
value = (void *)&model->Tnom; |
|||
given = &model->Tnom_given; |
|||
break; |
|||
default: |
|||
return NULL; |
|||
} |
|||
|
|||
if (flags & ACCESS_FLAG_SET) { |
|||
*given = true; |
|||
} |
|||
|
|||
return value; |
|||
} |
|||
|
|||
// implementation of the setup_model function as defined in the OSDI spec |
|||
static void setup_model(void *handle, void *model_, OsdiSimParas *sim_params, |
|||
OsdiInitInfo *res) { |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
|
|||
IGNORE(handle); |
|||
IGNORE(sim_params); |
|||
|
|||
// set parameters and check bounds |
|||
if (!model->mfactor_given) { |
|||
model->mfactor = 1.0; |
|||
} |
|||
if (!model->Rs_given) { |
|||
model->Rs = 1e-9; |
|||
} |
|||
if (!model->Is_given) { |
|||
model->Is = 1e-14; |
|||
} |
|||
if (!model->zetars_given) { |
|||
model->zetars = 0; |
|||
} |
|||
if (!model->N_given) { |
|||
model->N = 1; |
|||
} |
|||
if (!model->Cj0_given) { |
|||
model->Cj0 = 0; |
|||
} |
|||
if (!model->Vj_given) { |
|||
model->Vj = 1.0; |
|||
} |
|||
if (!model->M_given) { |
|||
model->M = 0.5; |
|||
} |
|||
if (!model->Rth_given) { |
|||
model->Rth = 0; |
|||
} |
|||
if (!model->zetarth_given) { |
|||
model->zetarth = 0; |
|||
} |
|||
if (!model->zetais_given) { |
|||
model->zetais = 0; |
|||
} |
|||
if (!model->Tnom_given) { |
|||
model->Tnom = 300; |
|||
} |
|||
|
|||
*res = (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the setup_instace function as defined in the OSDI spec |
|||
static void setup_instance(void *handle, void *inst_, void *model_, |
|||
double temperature, uint32_t num_terminals, |
|||
OsdiSimParas *sim_params, OsdiInitInfo *res) { |
|||
|
|||
IGNORE(handle); |
|||
IGNORE(num_terminals); |
|||
IGNORE(sim_params); |
|||
|
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
|
|||
// Here the logic for node collapsing ist implemented. The indices in this |
|||
// list must adhere to the "collapsible" List of node pairs. |
|||
if (model->Rs < 1e-9) { // Rs between Ci C |
|||
inst->collapsed[0] = true; |
|||
} |
|||
if (model->Rth < 1e-9) { // Rs between Ci C |
|||
inst->collapsed[1] = true; |
|||
} |
|||
|
|||
if (!inst->mfactor_given) { |
|||
if (model->mfactor_given) { |
|||
inst->mfactor = model->mfactor; |
|||
} else { |
|||
inst->mfactor = 1; |
|||
} |
|||
} |
|||
|
|||
inst->temperature = temperature; |
|||
*res = (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
#define CONSTsqrt2 1.4142135623730950488016887242097 |
|||
typedef double (*pnjlim_t)(bool, bool *, double, double, double, double); |
|||
|
|||
// implementation of the eval function as defined in the OSDI spec |
|||
static uint32_t eval(void *handle, void *inst_, void *model_, |
|||
OsdiSimInfo *info) { |
|||
IGNORE(handle); |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
// get voltages |
|||
double *prev_solve = info->prev_solve; |
|||
double va = prev_solve[inst->node_off[A]]; |
|||
double vc = prev_solve[inst->node_off[C]]; |
|||
double vci = prev_solve[inst->node_off[CI]]; |
|||
double vdtj = prev_solve[inst->node_off[TNODE]]; |
|||
|
|||
double vcic = vci - vc; |
|||
double vaci = va - vci; |
|||
|
|||
double gmin = 1e-12; |
|||
for (int i = 0; info->paras.names[i] != NULL; i++) { |
|||
if (strcmp(info->paras.names[i], "gmin") == 0) { |
|||
gmin = info->paras.vals[i]; |
|||
} |
|||
} |
|||
|
|||
uint32_t ret_flags = 0; |
|||
//////////////////////////////// |
|||
// evaluate model equations |
|||
//////////////////////////////// |
|||
|
|||
// temperature update |
|||
double pk = 1.3806503e-23; |
|||
double pq = 1.602176462e-19; |
|||
double t_dev = inst->temperature + vdtj; |
|||
double tdev_tnom = t_dev / model->Tnom; |
|||
double rs_t = model->Rs * pow(tdev_tnom, model->zetars); |
|||
double rth_t = model->Rth * pow(tdev_tnom, model->zetarth); |
|||
double is_t = model->Is * pow(tdev_tnom, model->zetais); |
|||
double vt = t_dev * pk / pq; |
|||
|
|||
double delvaci = 0.0; |
|||
if (info->flags & ENABLE_LIM && OSDI_LIM_TABLE[0].func_ptr) { |
|||
double vte = inst->temperature * pk / pq; |
|||
bool icheck = false; |
|||
double vaci_old = info->prev_state[inst->state_idx]; |
|||
pnjlim_t pnjlim = OSDI_LIM_TABLE[0].func_ptr; |
|||
double vaci_new = pnjlim(info->flags & INIT_LIM, &icheck, vaci, vaci_old, |
|||
vte, vte * log(vte / (sqrt2 * model->Is))); |
|||
printf("%g %g\n", vaci, vaci_new); |
|||
delvaci = vaci_new - vaci; |
|||
vaci = vaci_new; |
|||
info->prev_state[inst->state_idx] = vaci; |
|||
} else { |
|||
printf("ok?"); |
|||
} |
|||
|
|||
// derivatives w.r.t. temperature |
|||
double rs_dt = model->zetars * model->Rs * |
|||
pow(tdev_tnom, model->zetars - 1.0) / model->Tnom; |
|||
double rth_dt = model->zetarth * model->Rth * |
|||
pow(tdev_tnom, model->zetarth - 1.0) / model->Tnom; |
|||
double is_dt = model->zetais * model->Is * |
|||
pow(tdev_tnom, model->zetais - 1.0) / model->Tnom; |
|||
double vt_tj = pk / pq; |
|||
|
|||
// evaluate model equations and calculate all derivatives |
|||
// diode current |
|||
double id = is_t * (limexp(vaci / (model->N * vt)) - 1.0); |
|||
double gd = is_t / vt * dlimexp(vaci / (model->N * vt)); |
|||
double gdt = -is_t * dlimexp(vaci / (model->N * vt)) * vaci / model->N / vt / |
|||
vt * vt_tj + |
|||
1.0 * exp((vaci / (model->N * vt)) - 1.0) * is_dt; |
|||
|
|||
// resistor |
|||
double irs = 0; |
|||
double g = 0; |
|||
double grt = 0; |
|||
if (!inst->collapsed[0]) { |
|||
irs = vcic / rs_t; |
|||
g = 1.0 / rs_t; |
|||
grt = -irs / rs_t * rs_dt; |
|||
} |
|||
|
|||
// thermal resistance |
|||
double irth = 0; |
|||
double gt = 0; |
|||
if (!inst->collapsed[1]) { |
|||
irth = vdtj / rth_t; |
|||
gt = 1.0 / rth_t - irth / rth_t * rth_dt; |
|||
} |
|||
|
|||
// charge |
|||
double vf = model->Vj * (1.0 - pow(3.04, -1.0 / model->M)); |
|||
double x = (vf - vaci) / vt; |
|||
double x_vt = -x / vt; |
|||
double x_dtj = x_vt * vt_tj; |
|||
double x_vaci = -1.0 / vt; |
|||
double y = sqrt(x * x + 1.92); |
|||
double y_x = 0.5 / y * 2.0 * x; |
|||
double y_vaci = y_x * x_vaci; |
|||
double y_dtj = y_x * x_dtj; |
|||
double vd = vf - vt * (x + y) / (2.0); |
|||
double vd_x = -vt / 2.0; |
|||
double vd_y = -vt / 2.0; |
|||
double vd_vt = -(x + y) / (2.0); |
|||
double vd_dtj = vd_x * x_dtj + vd_y * y_dtj + vd_vt * vt_tj; |
|||
double vd_vaci = vd_x * x_vaci + vd_y * y_vaci; |
|||
double qd = model->Cj0 * vaci * model->Vj * |
|||
(1.0 - pow(1.0 - vd / model->Vj, 1.0 - model->M)) / |
|||
(1.0 - model->M); |
|||
double qd_vd = model->Cj0 * model->Vj / (1.0 - model->M) * (1.0 - model->M) * |
|||
pow(1.0 - vd / model->Vj, 1.0 - model->M - 1.0) / model->Vj; |
|||
double qd_dtj = qd_vd * vd_dtj; |
|||
double qd_vaci = qd_vd * vd_vaci; |
|||
|
|||
// thermal power source = current source |
|||
double ith = id * vaci; |
|||
double ith_vtj = gdt * vaci; |
|||
double ith_vcic = 0; |
|||
double ith_vaci = gd * vaci + id; |
|||
if (!inst->collapsed[0]) { |
|||
ith_vcic = 2.0 * vcic / rs_t; |
|||
ith += pow(vcic, 2.0) / rs_t; |
|||
ith_vtj -= -pow(vcic, 2.0) / rs_t / rs_t * rs_dt; |
|||
} |
|||
|
|||
id += gmin * vaci; |
|||
gd += gmin; |
|||
|
|||
double mfactor = inst->mfactor; |
|||
|
|||
//////////////// |
|||
// write rhs |
|||
//////////////// |
|||
|
|||
if (info->flags & CALC_RESIST_RESIDUAL) { |
|||
// write resist rhs |
|||
inst->residual_resist[A] = id * mfactor; |
|||
inst->residual_resist[CI] = -id * mfactor + irs * mfactor; |
|||
inst->residual_resist[C] = -irs * mfactor; |
|||
inst->residual_resist[TNODE] = -ith * mfactor + irth * mfactor; |
|||
} |
|||
|
|||
if (info->flags & CALC_RESIST_LIM_RHS) { |
|||
// write resist rhs |
|||
inst->lim_rhs_resist_A = gd * mfactor * delvaci; |
|||
inst->lim_rhs_resist_CI = -gd * mfactor * delvaci; |
|||
} |
|||
|
|||
if (info->flags & CALC_REACT_RESIDUAL) { |
|||
// write react rhs |
|||
inst->residual_react_A = qd * mfactor; |
|||
inst->residual_react_CI = -qd * mfactor; |
|||
} |
|||
|
|||
if (info->flags & CALC_REACT_LIM_RHS) { |
|||
// write resist rhs |
|||
inst->lim_rhs_react_A = qd_vaci * mfactor * delvaci; |
|||
inst->lim_rhs_react_CI = -qd_vaci * mfactor * delvaci; |
|||
} |
|||
|
|||
////////////////// |
|||
// write Jacobian |
|||
////////////////// |
|||
|
|||
if (info->flags & CALC_RESIST_JACOBIAN) { |
|||
// stamp diode (current flowing from Ci into A) |
|||
inst->jacobian_resist[A_A] = gd * mfactor; |
|||
inst->jacobian_resist[A_CI] = -gd * mfactor; |
|||
inst->jacobian_resist[CI_A] = -gd * mfactor; |
|||
inst->jacobian_resist[CI_CI] = gd * mfactor; |
|||
// diode thermal |
|||
inst->jacobian_resist[A_TNODE] = gdt * mfactor; |
|||
inst->jacobian_resist[CI_TNODE] = -gdt * mfactor; |
|||
|
|||
// stamp resistor (current flowing from C into CI) |
|||
inst->jacobian_resist[CI_CI] += g * mfactor; |
|||
inst->jacobian_resist[CI_C] = -g * mfactor; |
|||
inst->jacobian_resist[C_CI] = -g * mfactor; |
|||
inst->jacobian_resist[C_C] = g * mfactor; |
|||
// resistor thermal |
|||
inst->jacobian_resist[CI_TNODE] = grt * mfactor; |
|||
inst->jacobian_resist[C_TNODE] = -grt * mfactor; |
|||
|
|||
// stamp rth flowing into node dTj |
|||
inst->jacobian_resist[TNODE_TNODE] = gt * mfactor; |
|||
|
|||
// stamp ith flowing out of T node |
|||
inst->jacobian_resist[TNODE_TNODE] -= ith_vtj * mfactor; |
|||
inst->jacobian_resist[TNODE_CI] = (ith_vcic - ith_vaci) * mfactor; |
|||
inst->jacobian_resist[TNODE_C] = -ith_vcic * mfactor; |
|||
inst->jacobian_resist[TNODE_A] = ith_vaci * mfactor; |
|||
} |
|||
|
|||
if (info->flags & CALC_REACT_JACOBIAN) { |
|||
// write react matrix |
|||
// stamp Qd between nodes A and Ci depending also on dT |
|||
inst->jacobian_react[A_A] = qd_vaci * mfactor; |
|||
inst->jacobian_react[A_CI] = -qd_vaci * mfactor; |
|||
inst->jacobian_react[CI_A] = -qd_vaci * mfactor; |
|||
inst->jacobian_react[CI_CI] = qd_vaci * mfactor; |
|||
|
|||
inst->jacobian_react[A_TNODE] = qd_dtj * mfactor; |
|||
inst->jacobian_react[CI_TNODE] = -qd_dtj * mfactor; |
|||
} |
|||
|
|||
return ret_flags; |
|||
} |
|||
|
|||
// TODO implementation of the load_noise function as defined in the OSDI spec |
|||
static void load_noise(void *inst, void *model, double freq, double *noise_dens, |
|||
double *ln_noise_dens) { |
|||
IGNORE(inst); |
|||
IGNORE(model); |
|||
IGNORE(freq); |
|||
IGNORE(noise_dens); |
|||
IGNORE(ln_noise_dens); |
|||
// TODO add noise to example |
|||
} |
|||
|
|||
#define LOAD_RESIDUAL_RESIST(name) \ |
|||
dst[inst->node_off[name]] += inst->residual_resist[name]; |
|||
|
|||
// implementation of the load_rhs_resist function as defined in the OSDI spec |
|||
static void load_residual_resist(void *inst_, void *model, double *dst) { |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
IGNORE(model); |
|||
LOAD_RESIDUAL_RESIST(A) |
|||
LOAD_RESIDUAL_RESIST(CI) |
|||
LOAD_RESIDUAL_RESIST(C) |
|||
LOAD_RESIDUAL_RESIST(TNODE) |
|||
} |
|||
|
|||
// implementation of the load_rhs_react function as defined in the OSDI spec |
|||
static void load_residual_react(void *inst_, void *model, double *dst) { |
|||
IGNORE(model); |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
dst[inst->node_off[A]] += inst->residual_react_A; |
|||
dst[inst->node_off[CI]] += inst->residual_react_CI; |
|||
} |
|||
|
|||
// implementation of the load_lim_rhs_resist function as defined in the OSDI |
|||
// spec |
|||
static void load_lim_rhs_resist(void *inst_, void *model, double *dst) { |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
IGNORE(model); |
|||
dst[inst->node_off[A]] += inst->lim_rhs_resist_A; |
|||
dst[inst->node_off[CI]] += inst->lim_rhs_resist_CI; |
|||
} |
|||
|
|||
// implementation of the load_lim_rhs_react function as defined in the OSDI spec |
|||
static void load_lim_rhs_react(void *inst_, void *model, double *dst) { |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
IGNORE(model); |
|||
dst[inst->node_off[A]] += inst->lim_rhs_react_A; |
|||
dst[inst->node_off[CI]] += inst->lim_rhs_react_CI; |
|||
} |
|||
|
|||
#define LOAD_MATRIX_RESIST(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_resist[name]; |
|||
|
|||
// implementation of the load_matrix_resist function as defined in the OSDI spec |
|||
static void load_jacobian_resist(void *inst_, void *model) { |
|||
IGNORE(model); |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
LOAD_MATRIX_RESIST(A_A) |
|||
LOAD_MATRIX_RESIST(A_CI) |
|||
LOAD_MATRIX_RESIST(A_TNODE) |
|||
|
|||
LOAD_MATRIX_RESIST(CI_A) |
|||
LOAD_MATRIX_RESIST(CI_CI) |
|||
LOAD_MATRIX_RESIST(CI_C) |
|||
LOAD_MATRIX_RESIST(CI_TNODE) |
|||
|
|||
LOAD_MATRIX_RESIST(C_CI) |
|||
LOAD_MATRIX_RESIST(C_C) |
|||
LOAD_MATRIX_RESIST(C_TNODE) |
|||
|
|||
LOAD_MATRIX_RESIST(TNODE_TNODE) |
|||
LOAD_MATRIX_RESIST(TNODE_A) |
|||
LOAD_MATRIX_RESIST(TNODE_C) |
|||
LOAD_MATRIX_RESIST(TNODE_CI) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_REACT(name) \ |
|||
*inst->jacobian_ptr_react[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_react function as defined in the OSDI spec |
|||
static void load_jacobian_react(void *inst_, void *model, double alpha) { |
|||
IGNORE(model); |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
LOAD_MATRIX_REACT(A_A) |
|||
LOAD_MATRIX_REACT(A_CI) |
|||
LOAD_MATRIX_REACT(CI_A) |
|||
LOAD_MATRIX_REACT(CI_CI) |
|||
|
|||
LOAD_MATRIX_REACT(A_TNODE) |
|||
LOAD_MATRIX_REACT(CI_TNODE) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_TRAN(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_tran function as defined in the OSDI spec |
|||
static void load_jacobian_tran(void *inst_, void *model, double alpha) { |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
// set dc stamps |
|||
load_jacobian_resist(inst_, model); |
|||
|
|||
// add reactive contributions |
|||
LOAD_MATRIX_TRAN(A_A) |
|||
LOAD_MATRIX_TRAN(A_CI) |
|||
LOAD_MATRIX_TRAN(CI_A) |
|||
LOAD_MATRIX_TRAN(CI_CI) |
|||
|
|||
LOAD_MATRIX_TRAN(A_TNODE) |
|||
LOAD_MATRIX_TRAN(CI_TNODE) |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_dc function as defined in the OSDI spec |
|||
static void load_spice_rhs_dc(void *inst_, void *model, double *dst, |
|||
double *prev_solve) { |
|||
IGNORE(model); |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
double va = prev_solve[inst->node_off[A]]; |
|||
double vci = prev_solve[inst->node_off[CI]]; |
|||
double vc = prev_solve[inst->node_off[C]]; |
|||
double vdtj = prev_solve[inst->node_off[TNODE]]; |
|||
|
|||
dst[inst->node_off[A]] += inst->jacobian_resist[A_A] * va + |
|||
inst->jacobian_resist[A_TNODE] * vdtj + |
|||
inst->jacobian_resist[A_CI] * vci + |
|||
inst->lim_rhs_resist_A - inst->residual_resist[A]; |
|||
|
|||
dst[inst->node_off[CI]] += inst->jacobian_resist[CI_A] * va + |
|||
inst->jacobian_resist[CI_TNODE] * vdtj + |
|||
inst->jacobian_resist[CI_CI] * vci + |
|||
inst->lim_rhs_resist_CI - |
|||
inst->residual_resist[CI]; |
|||
|
|||
dst[inst->node_off[C]] += |
|||
inst->jacobian_resist[C_C] * vc + inst->jacobian_resist[C_CI] * vci + |
|||
inst->jacobian_resist[C_TNODE] * vdtj - inst->residual_resist[C]; |
|||
|
|||
dst[inst->node_off[TNODE]] += inst->jacobian_resist[TNODE_A] * va + |
|||
inst->jacobian_resist[TNODE_C] * vc + |
|||
inst->jacobian_resist[TNODE_CI] * vci + |
|||
inst->jacobian_resist[TNODE_TNODE] * vdtj - |
|||
inst->residual_resist[TNODE]; |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_tran function as defined in the OSDI |
|||
// spec |
|||
static void load_spice_rhs_tran(void *inst_, void *model, double *dst, |
|||
double *prev_solve, double alpha) { |
|||
|
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
double va = prev_solve[inst->node_off[A]]; |
|||
double vci = prev_solve[inst->node_off[CI]]; |
|||
double vdtj = prev_solve[inst->node_off[TNODE]]; |
|||
|
|||
// set DC rhs |
|||
load_spice_rhs_dc(inst_, model, dst, prev_solve); |
|||
|
|||
// add contributions due to reactive elements |
|||
dst[inst->node_off[A]] += |
|||
alpha * |
|||
(inst->jacobian_react[A_A] * va + inst->jacobian_react[A_CI] * vci + |
|||
inst->jacobian_react[A_TNODE] * vdtj + inst->lim_rhs_react_A); |
|||
|
|||
dst[inst->node_off[CI]] += |
|||
alpha * |
|||
(inst->jacobian_react[CI_CI] * vci + inst->jacobian_react[CI_A] * va + |
|||
inst->jacobian_react[CI_TNODE] * vdtj + inst->lim_rhs_react_CI); |
|||
} |
|||
|
|||
#define RESIST_RESIDUAL_OFF(NODE) \ |
|||
(offsetof(DiodeInstace, residual_resist) + sizeof(uint32_t) * NODE) |
|||
|
|||
// structure that provides information of all nodes of the model |
|||
const OsdiNode nodes[NUM_NODES] = { |
|||
{ |
|||
.name = "A", |
|||
.units = "V", |
|||
.residual_units = "A", |
|||
.resist_residual_off = RESIST_RESIDUAL_OFF(A), |
|||
.react_residual_off = offsetof(DiodeInstace, residual_react_A), |
|||
}, |
|||
{ |
|||
.name = "C", |
|||
.units = "V", |
|||
.residual_units = "A", |
|||
.resist_residual_off = RESIST_RESIDUAL_OFF(C), |
|||
.react_residual_off = UINT32_MAX, // no reactive residual |
|||
|
|||
}, |
|||
{ |
|||
.name = "dT", |
|||
.units = "K", |
|||
.residual_units = "W", |
|||
.resist_residual_off = RESIST_RESIDUAL_OFF(TNODE), |
|||
.react_residual_off = UINT32_MAX, // no reactive residual |
|||
}, |
|||
{ |
|||
.name = "CI", |
|||
.units = "V", |
|||
.residual_units = "A", |
|||
.resist_residual_off = RESIST_RESIDUAL_OFF(TNODE), |
|||
.react_residual_off = offsetof(DiodeInstace, residual_react_CI), |
|||
|
|||
}, |
|||
}; |
|||
#define JACOBI_ENTRY(N1, N2) \ |
|||
{ \ |
|||
.nodes = {N1, N2}, .flags = JACOBIAN_ENTRY_RESIST | JACOBIAN_ENTRY_REACT, \ |
|||
.react_ptr_off = offsetof(DiodeInstace, jacobian_ptr_react) + \ |
|||
sizeof(double *) * N1##_##N2 \ |
|||
} |
|||
|
|||
#define RESIST_JACOBI_ENTRY(N1, N2) \ |
|||
{ \ |
|||
.nodes = {N1, N2}, .flags = JACOBIAN_ENTRY_RESIST, \ |
|||
.react_ptr_off = UINT32_MAX \ |
|||
} |
|||
|
|||
// these node pairs specify which entries in the Jacobian must be accounted for |
|||
OsdiJacobianEntry jacobian_entries[NUM_MATRIX] = { |
|||
JACOBI_ENTRY(CI, CI), |
|||
RESIST_JACOBI_ENTRY(CI, C), |
|||
RESIST_JACOBI_ENTRY(C, CI), |
|||
RESIST_JACOBI_ENTRY(C, C), |
|||
JACOBI_ENTRY(A, A), |
|||
JACOBI_ENTRY(A, CI), |
|||
JACOBI_ENTRY(CI, A), |
|||
JACOBI_ENTRY(A, TNODE), |
|||
RESIST_JACOBI_ENTRY(C, TNODE), |
|||
JACOBI_ENTRY(CI, TNODE), |
|||
RESIST_JACOBI_ENTRY(TNODE, TNODE), |
|||
RESIST_JACOBI_ENTRY(TNODE, A), |
|||
RESIST_JACOBI_ENTRY(TNODE, C), |
|||
RESIST_JACOBI_ENTRY(TNODE, CI), |
|||
}; |
|||
OsdiNodePair collapsible[NUM_COLLAPSIBLE] = { |
|||
{CI, C}, |
|||
{TNODE, NUM_NODES}, |
|||
}; |
|||
|
|||
#define NUM_PARAMS 12 |
|||
// the model parameters as defined in Verilog-A, bounds and default values are |
|||
// stored elsewhere as they may depend on model parameters etc. |
|||
OsdiParamOpvar params[NUM_PARAMS] = { |
|||
{ |
|||
.name = (char *[]){"$mfactor"}, |
|||
.num_alias = 0, |
|||
.description = "Verilog-A multiplication factor for parallel devices", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_INST, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Rs"}, |
|||
.num_alias = 0, |
|||
.description = "Ohmic res", |
|||
.units = "Ohm", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Is"}, |
|||
.num_alias = 0, |
|||
.description = "Saturation current", |
|||
.units = "A", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"zetars"}, |
|||
.num_alias = 0, |
|||
.description = "Temperature coefficient of ohmic res", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"N"}, |
|||
.num_alias = 0, |
|||
.description = "Emission coefficient", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Cj0"}, |
|||
.num_alias = 0, |
|||
.description = "Junction capacitance", |
|||
.units = "F", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Vj"}, |
|||
.num_alias = 0, |
|||
.description = "Junction potential", |
|||
.units = "V", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"M"}, |
|||
.num_alias = 0, |
|||
.description = "Grading coefficient", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Rth"}, |
|||
.num_alias = 0, |
|||
.description = "Thermal resistance", |
|||
.units = "K/W", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"zetarth"}, |
|||
.num_alias = 0, |
|||
.description = "Temperature coefficient of thermal res", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"zetais"}, |
|||
.num_alias = 0, |
|||
.description = "Temperature coefficient of Is", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Tnom"}, |
|||
.num_alias = 0, |
|||
.description = "Reference temperature", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
}; |
|||
|
|||
// fill exported data |
|||
uint32_t OSDI_VERSION_MAJOR = OSDI_VERSION_MAJOR_CURR; |
|||
uint32_t OSDI_VERSION_MINOR = OSDI_VERSION_MINOR_CURR; |
|||
uint32_t OSDI_NUM_DESCRIPTORS = 1; |
|||
// this is the main structure used by simulators, it gives access to all |
|||
// information in a model |
|||
OsdiDescriptor OSDI_DESCRIPTORS[1] = {{ |
|||
// metadata |
|||
.name = "diode_va", |
|||
|
|||
// nodes |
|||
.num_nodes = NUM_NODES, |
|||
.num_terminals = 3, |
|||
.nodes = (OsdiNode *)&nodes, |
|||
.node_mapping_offset = offsetof(DiodeInstace, node_off), |
|||
|
|||
// matrix entries |
|||
.num_jacobian_entries = NUM_MATRIX, |
|||
.jacobian_entries = (OsdiJacobianEntry *)&jacobian_entries, |
|||
.jacobian_ptr_resist_offset = offsetof(DiodeInstace, jacobian_ptr_resist), |
|||
|
|||
// node collapsing |
|||
.num_collapsible = NUM_COLLAPSIBLE, |
|||
.collapsible = collapsible, |
|||
.collapsed_offset = offsetof(DiodeInstace, collapsed), |
|||
|
|||
// noise |
|||
.noise_sources = NULL, |
|||
.num_noise_src = 0, |
|||
|
|||
// parameters and op vars |
|||
.num_params = NUM_PARAMS, |
|||
.num_instance_params = 1, |
|||
.num_opvars = 0, |
|||
.param_opvar = (OsdiParamOpvar *)¶ms, |
|||
|
|||
// step size bound |
|||
.bound_step_offset = UINT32_MAX, |
|||
|
|||
.num_states = 1, |
|||
.state_idx_off = offsetof(DiodeInstace, state_idx), |
|||
|
|||
// memory |
|||
.instance_size = sizeof(DiodeInstace), |
|||
.model_size = sizeof(DiodeModel), |
|||
|
|||
// setup |
|||
.access = osdi_access, |
|||
.setup_model = setup_model, |
|||
.setup_instance = setup_instance, |
|||
.eval = eval, |
|||
.load_noise = load_noise, |
|||
.load_residual_resist = load_residual_resist, |
|||
.load_residual_react = load_residual_react, |
|||
.load_spice_rhs_dc = load_spice_rhs_dc, |
|||
.load_spice_rhs_tran = load_spice_rhs_tran, |
|||
.load_jacobian_resist = load_jacobian_resist, |
|||
.load_jacobian_react = load_jacobian_react, |
|||
.load_jacobian_tran = load_jacobian_tran, |
|||
.load_limit_rhs_react = load_lim_rhs_react, |
|||
.load_limit_rhs_resist = load_lim_rhs_resist, |
|||
}}; |
|||
|
|||
OsdiLimFunction OSDI_LIM_TABLE[1] = {{.name = "pnjlim", .num_args = 2}}; |
|||
|
|||
uint32_t OSDI_LIM_TABLE_LEN = 1; |
|||
@ -1,46 +0,0 @@ |
|||
OSDI Diode Test |
|||
.options abstol=1e-15 |
|||
|
|||
|
|||
* one voltage source for sweeping, one for sensing: |
|||
VD Dx 0 DC 0 AC 1 SIN (0.5 0.2 1M) |
|||
Vsense Dx D DC 0 |
|||
* Rt T 0 1e10 *not supported Pascal? |
|||
|
|||
* model definitions: |
|||
.model dmod_built_in d( bv=5.0000000000e+01 is=1e-13 n=1.05 thermal=1 tnom=27 rth0=100 rs=5 cj0=1e-15 vj=0.5 m=0.6 ) |
|||
.model dmod_osdi diode_va rs=5 is=1e-13 n=1.05 Rth=100 cj0=1e-15 vj=0.5 m=0.6 |
|||
|
|||
*OSDI Diode: |
|||
*OSDI_ACTIVATE*A1 D 0 T dmod_osdi |
|||
|
|||
*Built-in Diode: |
|||
*BUILT_IN_ACTIVATE*D1 D 0 T dmod_built_in |
|||
|
|||
|
|||
.control |
|||
pre_osdi diode.osdi |
|||
|
|||
set filetype=ascii |
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
|
|||
* a DC sweep from 0.3V to 1V |
|||
dc Vd 0.3 1.0 0.01 |
|||
wrdata dc_sim.ngspice v(d) i(vsense) v(t) |
|||
|
|||
* an AC sweep at Vd=0.5V |
|||
alter VD=0.5 |
|||
ac dec 10 .01 10 |
|||
wrdata ac_sim.ngspice v(d) i(vsense) |
|||
|
|||
* a transient analysis |
|||
tran 100ms 500000ms |
|||
wrdata tr_sim.ngspice v(d) i(vsense) |
|||
|
|||
* print number of iterations |
|||
rusage totiter |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,162 +0,0 @@ |
|||
""" test OSDI simulation of diode |
|||
""" |
|||
import os, shutil |
|||
import numpy as np |
|||
import pandas as pd |
|||
import sys |
|||
sys.path.append( |
|||
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) |
|||
|
|||
from testing import prepare_test |
|||
|
|||
# This test runs a DC, AC and Transient Simulation of a simple diode. |
|||
# The diode is available in the "OSDI" Git project and needs to be compiled to a shared object |
|||
# and then bet put into /usr/local/share/ngspice/osdi: |
|||
# |
|||
# > make osdi_diode |
|||
# > cp diode_osdi.osdi /usr/local/share/ngspice/osdi/diode_osdi.osdi |
|||
# |
|||
# The integration test proves the functioning of the OSDI interface. The Ngspice diode is quite |
|||
# complicated and the results are therefore not exactly the same. |
|||
# Future tests will target Verilog-A models like HICUM/L2 that should yield exactly the same results as the Ngspice implementation. |
|||
|
|||
directory = os.path.dirname(__file__) |
|||
|
|||
|
|||
def test_ngspice(): |
|||
dir_osdi, dir_built_in = prepare_test(directory) |
|||
|
|||
# read DC simulation results |
|||
dc_data_osdi = pd.read_csv(os.path.join(dir_osdi, "dc_sim.ngspice"), sep="\\s+") |
|||
dc_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "dc_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
|
|||
# read AC simulation results |
|||
ac_data_osdi = pd.read_csv(os.path.join(dir_osdi, "ac_sim.ngspice"), sep="\\s+") |
|||
ac_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "ac_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# read TR simulation results |
|||
tr_data_osdi = pd.read_csv(os.path.join(dir_osdi, "tr_sim.ngspice"), sep="\\s+") |
|||
tr_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "tr_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# test simulation results |
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
np.testing.assert_allclose(id_osdi[20:40], id_built_in[20:40], rtol=0.03) |
|||
|
|||
return ( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) = test_ngspice() |
|||
|
|||
import matplotlib.pyplot as plt |
|||
|
|||
# DC Plot |
|||
pd_built_in = dc_data_built_in["v(d)"] * dc_data_built_in["i(vsense)"] |
|||
pd_osdi = dc_data_osdi["v(d)"] * dc_data_osdi["i(vsense)"] |
|||
fig, ax1 = plt.subplots() |
|||
ax2 = ax1.twinx() |
|||
ax1.semilogy( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
ax1.semilogy( |
|||
dc_data_osdi["v(d)"], |
|||
dc_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
ax2.plot( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["v(t)"], |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
ax2.plot( |
|||
dc_data_osdi["v(d)"], |
|||
dc_data_osdi["v(t)"], |
|||
label="OSDI", |
|||
) |
|||
ax1.set_ylabel(r"$I_{\mathrm{D}} (\mathrm{mA})$") |
|||
ax2.set_ylabel(r"$\Delta T_{\mathrm{j}}(\mathrm{K})$") |
|||
ax1.set_xlabel(r"$V_{\mathrm{D}}(\mathrm{V})$") |
|||
plt.legend() |
|||
|
|||
# AC Plot |
|||
omega = 2 * np.pi * ac_data_osdi["frequency"] |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], ac_data_osdi["i(vsense)"] * 1e3, label="OSDI" |
|||
) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Re \\left\{ Y_{11} \\right\} (\\mathrm{mS})$") |
|||
plt.legend() |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense).1"] * 1e3 / omega, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], |
|||
ac_data_osdi["i(vsense).1"] * 1e3 / omega, |
|||
label="OSDI", |
|||
) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Im\\left\{Y_{11}\\right\}/(\\omega) (\\mathrm{mF})$") |
|||
plt.legend() |
|||
|
|||
# TR plot |
|||
fig = plt.figure() |
|||
plt.plot( |
|||
tr_data_built_in["time"] * 1e9, |
|||
tr_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.plot( |
|||
tr_data_osdi["time"] * 1e9, |
|||
tr_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
plt.xlabel(r"$t(\mathrm{nS})$") |
|||
plt.ylabel(r"$I_{\mathrm{D}}(\mathrm{mA})$") |
|||
plt.legend() |
|||
|
|||
plt.show() |
|||
@ -1,46 +0,0 @@ |
|||
OSDI Diode Test |
|||
.options abstol=1e-15 |
|||
|
|||
|
|||
* one voltage source for sweeping, one for sensing: |
|||
VD Dx 0 DC 0 AC 1 SIN (0.5 0.2 1M) |
|||
Vsense Dx D DC 0 |
|||
* Rt T 0 1e10 *not supported Pascal? |
|||
|
|||
* model definitions: |
|||
.model dmod_built_in d( bv=5.0000000000e+01 is=1e-13 n=1.05 thermal=1 tnom=27 rth0=100 rs=5 cj0=1e-15 vj=0.5 m=0.6 ) |
|||
.model dmod_osdi diode_va rs=5 is=1e-13 n=1.05 Rth=100 cj0=1e-15 vj=0.5 m=0.6 |
|||
|
|||
*OSDI Diode: |
|||
*OSDI_ACTIVATE*A1 D 0 T dmod_osdi |
|||
|
|||
*Built-in Diode: |
|||
*BUILT_IN_ACTIVATE*D1 D 0 T dmod_built_in |
|||
|
|||
|
|||
.control |
|||
pre_osdi diode.osdi |
|||
|
|||
set filetype=ascii |
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
|
|||
* a DC sweep from 0.3V to 1V |
|||
dc Vd 0.3 1.0 0.01 |
|||
wrdata dc_sim.ngspice v(d) i(vsense) v(t) |
|||
|
|||
* an AC sweep at Vd=0.5V |
|||
alter VD=0.5 |
|||
ac dec 10 .01 10 |
|||
wrdata ac_sim.ngspice v(d) i(vsense) |
|||
|
|||
* a transient analysis |
|||
tran 100ms 500000ms |
|||
wrdata tr_sim.ngspice v(d) i(vsense) |
|||
|
|||
* print number of iterations |
|||
rusage totiter |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,58 +0,0 @@ |
|||
OSDI Diode Test |
|||
.options abstol=1e-15 |
|||
|
|||
|
|||
* one voltage source for sweeping, one for sensing: |
|||
VD Dx 0 DC 0 AC 1 SIN (0.5 0.2 1M) |
|||
V_osdi_sense Dx D DC 0 |
|||
V_builtin_sense Dx D2 DC 0 |
|||
Rt1 T1 0 100 ; not supported Pascal? |
|||
Rt2 T2 0 100 |
|||
|
|||
* model definitions: |
|||
.model dmod_built_in d( bv=5.0000000000e+01 is=1e-13 n=1.05 thermal=1 tnom=27 rth0=100 rs=5 cj0=1e-15 vj=0.5 m=0.6 ) |
|||
.model dmod_osdi diode_va rs=5 is=1e-13 n=1.05 Rth=100 cj0=1e-15 vj=0.5 m=0.6 |
|||
|
|||
*OSDI Diode: |
|||
*OSDI_ACTIVATE* |
|||
A1 D 0 dmod_osdi |
|||
|
|||
*Built-in Diode: |
|||
*BUILT_IN_ACTIVATE* |
|||
D1 D2 0 T2 dmod_built_in |
|||
|
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/diode.osdi |
|||
|
|||
set filetype=ascii |
|||
|
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
set xbrushwidth=3 |
|||
|
|||
* a DC sweep from 0.3V to 1V |
|||
dc Vd 0.3 1.0 0.01 |
|||
wrdata dc_sim.ngspice v(d) i(V_osdi_sense) i(V_builtin_sense) v(t1) v(t2) |
|||
plot v(d) v(t1) v(t2) |
|||
plot i(V_osdi_sense) i(V_builtin_sense) |
|||
|
|||
* an AC sweep at Vd=0.5V |
|||
alter VD=0.5 |
|||
ac dec 10 .01 10 |
|||
wrdata ac_sim.ngspice v(d) i(V_osdi_sense) i(V_builtin_sense) |
|||
plot v(d) |
|||
plot i(V_osdi_sense) i(V_builtin_sense) |
|||
|
|||
* a transient analysis |
|||
tran 100ms 500000ms |
|||
wrdata tr_sim.ngspice v(d) i(V_osdi_sense) i(V_builtin_sense) |
|||
plot v(d) |
|||
plot i(V_osdi_sense) i(V_builtin_sense) |
|||
|
|||
* print number of iterations |
|||
rusage totiter |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,43 +0,0 @@ |
|||
ECL DFF HICUM2.4 test case |
|||
* |
|||
V6 D GND dc 0 PULSE(-.25 0 0 1P 1P .25N .50N) |
|||
V5 D_BAR GND dc 0 PULSE(0 -.25 0 1P 1P .25N .50N) |
|||
V4 CLK GND dc 0 PULSE(-0.9 -1.2 0 1P 1P .125N .25N) |
|||
V3 CLK_BAR GND dc 0 PULSE(-1.2 -0.9 0 1P 1P .125N .25N) |
|||
VVCS NET2 GND DC -0.8 |
|||
R6 GND NET6 800 |
|||
R5 GND NET11 800 |
|||
R4 NET12 VEE 350 |
|||
VVEE VEE GND DC -2.0 |
|||
R3 GND NET10 800 |
|||
R2 NET13 VEE 350 |
|||
R1 GND Q 800 |
|||
XQVLGNPN16 NET7 CLK_BAR NET4 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN15 NET5 CLK NET3 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN14 NET1dt Q NET7 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN13 Q NET6 NET9 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN12 NET6 NET11 NET5 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN11 NET11 D_BAR NET8 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN1dt NET4 NET2 NET13 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN9 NET3 NET2 NET12 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN8 NET8 CLK_BAR NET3 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN7 NET9 CLK NET4 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN6 Q NET1dt NET7 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN5 NET1dt NET11 NET9 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN4 NET11 NET6 NET5 VEE dt hicumL0V1p1_c_sbt |
|||
XQVLGNPN3 NET6 D NET8 VEE dt hicumL0V1p1_c_sbt |
|||
|
|||
Rdt dt 0 1G |
|||
* |
|||
.include Modelcards/model-card-hicumL0V1p11_mod.lib |
|||
.SAVE V(D) V(CLK) V(Q) |
|||
.control |
|||
pre_osdi test_osdi_win/HICUML0-2.osdi |
|||
TRAN 0.25p 5n |
|||
rusage |
|||
set color0=white |
|||
set xbrushwidth=2 |
|||
plot V(D) V(CLK) V(Q) ylimit -1.2 0.2 |
|||
*quit |
|||
.endc |
|||
.END |
|||
@ -1,59 +0,0 @@ |
|||
ECL DFF VBIC test case |
|||
* |
|||
V6 D GND PULSE(-.25 0 0 1P 1P .25N .50N) |
|||
V5 D_BAR GND PULSE(0 -.25 0 1P 1P .25N .50N) |
|||
V4 CLK GND PULSE(-0.9 -1.2 0 1P 1P .125N .25N) |
|||
V3 CLK_BAR GND PULSE(-1.2 -0.9 0 1P 1P .125N .25N) |
|||
VVCS NET2 GND DC -0.8 |
|||
R6 GND NET6 800 |
|||
R5 GND NET11 800 |
|||
R4 NET12 VEE 350 |
|||
VVEE VEE GND DC -2.0 |
|||
R3 GND NET10 800 |
|||
R2 NET13 VEE 350 |
|||
R1 GND Q 800 |
|||
QVLGNPN16 NET7 CLK_BAR NET4 VEE NPN_VBIC_VLG |
|||
QVLGNPN15 NET5 CLK NET3 VEE NPN_VBIC_VLG |
|||
QVLGNPN14 NET10 Q NET7 VEE NPN_VBIC_VLG |
|||
QVLGNPN13 Q NET6 NET9 VEE NPN_VBIC_VLG |
|||
QVLGNPN12 NET6 NET11 NET5 VEE NPN_VBIC_VLG |
|||
QVLGNPN11 NET11 D_BAR NET8 VEE NPN_VBIC_VLG |
|||
QVLGNPN10 NET4 NET2 NET13 VEE NPN_VBIC_VLG |
|||
QVLGNPN9 NET3 NET2 NET12 VEE NPN_VBIC_VLG |
|||
QVLGNPN8 NET8 CLK_BAR NET3 VEE NPN_VBIC_VLG |
|||
QVLGNPN7 NET9 CLK NET4 VEE NPN_VBIC_VLG |
|||
QVLGNPN6 Q NET10 NET7 VEE NPN_VBIC_VLG |
|||
QVLGNPN5 NET10 NET11 NET9 VEE NPN_VBIC_VLG |
|||
QVLGNPN4 NET11 NET6 NET5 VEE NPN_VBIC_VLG |
|||
QVLGNPN3 NET6 D NET8 VEE NPN_VBIC_VLG |
|||
* |
|||
.MODEL NPN_VBIC_VLG NPN LEVEL=4 |
|||
+TNOM = 27 RCI = 1E3 RCX = 50 |
|||
+VO = 1.5 GAMM = 3.402097E-11 HRCF = 1 |
|||
+RBX = 243 RBI = 20 RE = 30 |
|||
+RS = 0 RBP = 0 IS = 8.084033E-18 |
|||
+NF = 1 NR = 1.005 FC = 0.5 |
|||
+CJE = 2.083234E-15 PE = 0.8793669 ME = 0.3108762 |
|||
+CJC = 1.803275E-15 PC = 0.5512188 MC = 0.4454263 |
|||
+CJCP = 8E-15 PS = 0.66956 MS = 0.2243 |
|||
+IBEI = 4.542609E-20 WBE = 1 NEI = 1 |
|||
+IBEN = 3.275162E-16 NEN = 1.5543186 IBCI = 3.594252E-19 |
|||
+NCI = 0.996 IBCN = 1.717776E-17 NCN = 1.202521 |
|||
+AVC1 = 3E-4 AVC2 = 1E-5 ISP = 1.332E-19 |
|||
+WSP = 1 NFP = 1 IBEIP = 0 |
|||
+IBENP = 0 IBCIP = 0 NCIP = 1 |
|||
+IBCNP = 0 NCNP = 2 VEF = 109.6523 |
|||
+VER = 2.2052435 IKF = 6.03524E-3 IKR = 1.807895E-4 |
|||
+IKP = 2.908576E-5 TF = 1.1E-12 XTF = 21.5423 |
|||
+VTF = 12.4758677 ITF = 0.0175231 TR = 2.23542E-9 |
|||
|
|||
.SAVE V(D) V(CLK) V(Q) |
|||
.control |
|||
TRAN 0.25p 5n |
|||
rusage |
|||
set color0=white |
|||
set xbrushwidth=2 |
|||
plot V(D) V(CLK) V(Q) |
|||
*quit |
|||
.endc |
|||
.END |
|||
1233
test_cases/hicuml0/HICUML0-2.va
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,254 +0,0 @@ |
|||
******************************************************************************** |
|||
******************************************************************************** |
|||
* HICUM Level0 Version 1.1 model cards for testing |
|||
******************************************************************************** |
|||
******************************************************************************** |
|||
* 1D transistor: Isothermal Simulation and Temperature dependence |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_1D c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_1D |
|||
******************************************************************************** |
|||
* 1D transistor: Electrothermal Simulation to test self-heating |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_1D_slh c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=1000.0 cth=1.0e-10 |
|||
+ tnom=27.0 dt=0.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_1D_slh |
|||
******************************************************************************** |
|||
* 1D transistor: Isothermal Simulation with NQS Effect: future |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_1D_nqs c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_1D_nqs |
|||
******************************************************************************** |
|||
* 1D transistor: Isothermal Simulation to test collector current spreading |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_1D_ccs c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_1D_ccs |
|||
******************************************************************************** |
|||
* Internal transistor: Isothermal Simulation and Temperature dependence (Tunneling current at peripheral node:future) |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_i_tnp c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_i_tnp |
|||
******************************************************************************** |
|||
* Internal transistor: Isothermal Simulation and Temperature dependence (Tunneling current at internal node:future) |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_i_tni c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_i_tni |
|||
******************************************************************************** |
|||
* Complete transistor: Isothermal Simulation and Temperature dependence |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_c |
|||
******************************************************************************** |
|||
* Complete transistor: Electrothermal Simulation to test self-heating |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c_slh c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=1000.0 cth=1.0e-10 flsh=2 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_c_slh |
|||
******************************************************************************** |
|||
* Complete transistor: Isothermal Simulation with NQS Effect: future |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c_nqs c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_c_nqs |
|||
******************************************************************************** |
|||
* Complete transistor: Isothermal Simulation to test collector current spreading |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c_ccs c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_c_ccs |
|||
******************************************************************************** |
|||
* Complete transistor: Isothermal Simulation with substrate diode |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c_sbt c b e s dt |
|||
*qhcm0 c b e s dt hic0_full |
|||
aqhcm0 c b e s dt hic0_full |
|||
*.model hic0_full npn |
|||
.model hic0_full hicumL0va |
|||
+ level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=1.0e-17 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=3.64e-14 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 type=1 ; npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_c_sbt |
|||
******************************************************************************** |
|||
* Complete transistor: Isothermal Simulation with substrate network: future |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c_sbn c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=1.0e-17 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=3.64e-14 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
.ends hicumL0V1p1_c_sbn |
|||
******************************************************************************** |
|||
* Complete test transistor: default |
|||
******************************************************************************** |
|||
.subckt hicumL0V11_default c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.ends hicumL0V11_default |
|||
******************************************************************************** |
|||
@ -1,40 +0,0 @@ |
|||
******************************************************************************** |
|||
******************************************************************************** |
|||
* HICUM Level0 Version 1.1 model cards for testing |
|||
******************************************************************************** |
|||
******************************************************************************** |
|||
* 1D transistor: Isothermal Simulation and Temperature dependence |
|||
******************************************************************************** |
|||
|
|||
******************************************************************************** |
|||
* Complete transistor: Isothermal Simulation with substrate diode |
|||
******************************************************************************** |
|||
.subckt hicumL0V1p1_c_sbt c b e s dt |
|||
*qhcm0 c b e s dt hic0_full |
|||
aqhcm0 c b e s dt hic0_full |
|||
*.model hic0_full npn |
|||
.ends |
|||
.model hic0_full hicumL0va |
|||
+ level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 |
|||
+ iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 |
|||
+ mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 |
|||
+ aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=1.0e-17 msc=1.0 |
|||
+ cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 |
|||
+ vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 |
|||
+ cjs0=3.64e-14 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 |
|||
+ tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 |
|||
+ vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 |
|||
+ alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 |
|||
+ zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 |
|||
+ f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 |
|||
+ tnom=27.0 type=1 ; npn=1 pnp=0 |
|||
*+ dt=0.0 |
|||
******************************************************************************** |
|||
* Complete test transistor: default |
|||
******************************************************************************** |
|||
.subckt hicumL0V11_default c b e s dt |
|||
qhcm0 c b e s dt hic0_full |
|||
.ends hicumL0V11_default |
|||
******************************************************************************** |
|||
|
|||
|
|||
@ -1,23 +0,0 @@ |
|||
Bip model in subckt Gummel Test Ic=f(Vc,Vb) |
|||
|
|||
VB B 0 0.5 |
|||
VC C 0 1.0 |
|||
VS S 0 0.0 |
|||
X1 C B 0 S bip_default |
|||
|
|||
.control |
|||
dc vb 0.2 1.4 0.01 |
|||
plot abs(i(vc)) abs(i(vb)) abs(i(vs)) ylimit 0.1p 100m ylog |
|||
plot abs(i(vc))/abs(i(vb)) vs abs(i(vc)) xlog xlimit 100p 100m ylimit 0 200 retraceplot |
|||
.endc |
|||
|
|||
******************************************************************************** |
|||
* Complete test transistor: default |
|||
******************************************************************************** |
|||
.subckt bip_default c b e s |
|||
qhcm0 c b e s hic0_full |
|||
.model hic0_full npn |
|||
.ends hicumL0V11_default |
|||
******************************************************************************** |
|||
|
|||
.end |
|||
@ -1,19 +0,0 @@ |
|||
HICUM0 Gummel Test Ic=f(Vc,Vb) |
|||
|
|||
VB B 0 0.5 |
|||
VC C 0 1.0 |
|||
VS S 0 0.0 |
|||
*AQ1 C B 0 S DT hicumL0V1p1_c_sbt |
|||
XQ1 C B 0 S DT hicumL0V1p1_c_sbt |
|||
Rdt dt 0 1G |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/HICUML0-2.osdi |
|||
dc vb 0.2 1.4 0.01 |
|||
plot abs(i(vc)) abs(i(vb)) abs(i(vs)) ylimit 0.1p 100m ylog |
|||
plot abs(i(vc))/abs(i(vb)) vs abs(i(vc)) xlog xlimit 100p 100m ylimit 0 200 retraceplot |
|||
.endc |
|||
|
|||
.include Modelcards/model-card-hicumL0V1p11_mod.lib |
|||
|
|||
.end |
|||
@ -1,20 +0,0 @@ |
|||
HICUM0 Output Test Ic=f(Vc,Ib) |
|||
|
|||
IB 0 B 200n |
|||
VC C 0 2.0 |
|||
VS S 0 0.0 |
|||
X1 C B 0 S DT hicumL0V1p1_c_sbt |
|||
|
|||
Rdt dt 0 1G |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/HICUML0-2.osdi |
|||
dc vc 0.0 3.0 0.05 ib 10u 100u 10u |
|||
run |
|||
plot abs(i(vc)) |
|||
plot v(dt) |
|||
.endc |
|||
|
|||
.include Modelcards/model-card-hicumL0V1p11_mod.lib |
|||
|
|||
.end |
|||
@ -1,35 +0,0 @@ |
|||
HICUM0 Output Test Ic=f(Vc,Ib) |
|||
|
|||
IB 0 B 200n |
|||
VC C 0 2.0 |
|||
VS S 0 0.0 |
|||
Q1 C B 0 S NPN_VBIC_VLG |
|||
|
|||
.control |
|||
dc vc 0.0 5.0 0.05 ib 10u 100u 10u |
|||
run |
|||
plot abs(i(vc)) |
|||
plot v(dt) |
|||
.endc |
|||
|
|||
.MODEL NPN_VBIC_VLG NPN LEVEL=4 |
|||
+TNOM = 27 RCI = 1E3 RCX = 50 |
|||
+VO = 1.5 GAMM = 3.402097E-11 HRCF = 1 |
|||
+RBX = 243 RBI = 20 RE = 30 |
|||
+RS = 0 RBP = 0 IS = 8.084033E-18 |
|||
+NF = 1 NR = 1.005 FC = 0.5 |
|||
+CJE = 2.083234E-15 PE = 0.8793669 ME = 0.3108762 |
|||
+CJC = 1.803275E-15 PC = 0.5512188 MC = 0.4454263 |
|||
+CJCP = 8E-15 PS = 0.66956 MS = 0.2243 |
|||
+IBEI = 4.542609E-20 WBE = 1 NEI = 1 |
|||
+IBEN = 3.275162E-16 NEN = 1.5543186 IBCI = 3.594252E-19 |
|||
+NCI = 0.996 IBCN = 1.717776E-17 NCN = 1.202521 |
|||
+AVC1 = 3E-4 AVC2 = 1E-5 ISP = 1.332E-19 |
|||
+WSP = 1 NFP = 1 IBEIP = 0 |
|||
+IBENP = 0 IBCIP = 0 NCIP = 1 |
|||
+IBCNP = 0 NCNP = 2 VEF = 109.6523 |
|||
+VER = 2.2052435 IKF = 6.03524E-3 IKR = 1.807895E-4 |
|||
+IKP = 2.908576E-5 TF = 1.1E-12 XTF = 21.5423 |
|||
+VTF = 12.4758677 ITF = 0.0175231 TR = 2.23542E-9 |
|||
|
|||
.end |
|||
@ -1,374 +0,0 @@ |
|||
/* |
|||
* This file is part of the OSDI component of NGSPICE. |
|||
* Copyright© 2022 SemiMod GmbH. |
|||
* |
|||
* This Source Code Form is subject to the terms of the Mozilla Public |
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. |
|||
* |
|||
* Author: Pascal Kuthe <pascal.kuthe@semimod.de> |
|||
* |
|||
* This is an exemplary implementation of the OSDI interface for the Verilog-A |
|||
* model specified in diode.va. In the future, the OpenVAF compiler shall |
|||
* generate an comparable object file. Primary purpose of this is example to |
|||
* have a concrete example for the OSDI interface, OpenVAF will generate a more |
|||
* optimized implementation. |
|||
* |
|||
*/ |
|||
|
|||
#include "osdi.h" |
|||
#include "string.h" |
|||
#include <math.h> |
|||
#include <stdbool.h> |
|||
#include <stddef.h> |
|||
#include <stdint.h> |
|||
#include <stdio.h> |
|||
|
|||
// public interface |
|||
extern uint32_t OSDI_VERSION_MAJOR; |
|||
extern uint32_t OSDI_VERSION_MINOR; |
|||
extern uint32_t OSDI_NUM_DESCRIPTORS; |
|||
extern OsdiDescriptor OSDI_DESCRIPTORS[1]; |
|||
|
|||
// number of nodes and definitions of node ids for nicer syntax in this file |
|||
// note: order should be same as "nodes" list defined later |
|||
#define NUM_NODES 3 |
|||
#define P 0 |
|||
#define M 1 |
|||
|
|||
// number of matrix entries and definitions for Jacobian entries for nicer |
|||
// syntax in this file |
|||
#define NUM_MATRIX 4 |
|||
#define P_P 0 |
|||
#define P_M 1 |
|||
#define M_P 2 |
|||
#define M_M 3 |
|||
|
|||
// The model structure for the diode |
|||
typedef struct CapacitorModel |
|||
{ |
|||
double C; |
|||
bool C_given; |
|||
} CapacitorModel; |
|||
|
|||
// The instace structure for the diode |
|||
typedef struct CapacitorInstance |
|||
{ |
|||
double temperature; |
|||
double rhs_resist[NUM_NODES]; |
|||
double rhs_react[NUM_NODES]; |
|||
double jacobian_resist[NUM_MATRIX]; |
|||
double jacobian_react[NUM_MATRIX]; |
|||
double *jacobian_ptr_resist[NUM_MATRIX]; |
|||
double *jacobian_ptr_react[NUM_MATRIX]; |
|||
uint32_t node_off[NUM_NODES]; |
|||
} CapacitorInstance; |
|||
|
|||
// implementation of the access function as defined by the OSDI spec |
|||
void *osdi_access(void *inst_, void *model_, uint32_t id, uint32_t flags) |
|||
{ |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
bool *given; |
|||
void *value; |
|||
|
|||
switch (id) // id of params defined in param_opvar array |
|||
{ |
|||
case 0: |
|||
value = (void *)&model->C; |
|||
given = &model->C_given; |
|||
break; |
|||
default: |
|||
return NULL; |
|||
} |
|||
|
|||
if (flags & ACCESS_FLAG_SET) |
|||
{ |
|||
*given = true; |
|||
} |
|||
|
|||
return value; |
|||
} |
|||
|
|||
// implementation of the setup_model function as defined in the OSDI spec |
|||
OsdiInitInfo setup_model(void *_handle, void *model_) |
|||
{ |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
|
|||
// set parameters and check bounds |
|||
if (!model->C_given) |
|||
{ |
|||
model->C = 1e-15; |
|||
} |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the setup_instace function as defined in the OSDI spec |
|||
OsdiInitInfo setup_instance(void *_handle, void *inst_, void *model_, |
|||
double temperature, uint32_t _num_terminals) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
|
|||
inst->temperature = temperature; |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the eval function as defined in the OSDI spec |
|||
uint32_t eval(void *handle, void *inst_, void *model_, uint32_t flags, |
|||
double *prev_solve, OsdiSimParas *sim_params) |
|||
{ |
|||
CapacitorModel *model = (CapacitorModel *)model_; |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
// get voltages |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
double vpm = vp - vm; |
|||
|
|||
double gmin = 1e-12; |
|||
for (int i = 0; sim_params->names[i] != NULL; i++) |
|||
{ |
|||
if (strcmp(sim_params->names[i], "gmin") == 0) |
|||
{ |
|||
gmin = sim_params->vals[i]; |
|||
} |
|||
} |
|||
|
|||
double qc_vpm = model->C; |
|||
double qc = model->C * vpm; |
|||
|
|||
//////////////////////////////// |
|||
// evaluate model equations |
|||
//////////////////////////////// |
|||
|
|||
if (flags & CALC_REACT_RESIDUAL) |
|||
{ |
|||
// write react rhs |
|||
inst->rhs_react[P] = qc; |
|||
inst->rhs_react[M] = -qc; |
|||
} |
|||
|
|||
////////////////// |
|||
// write Jacobian |
|||
////////////////// |
|||
|
|||
if (flags & CALC_REACT_JACOBIAN) |
|||
{ |
|||
// write react matrix |
|||
// stamp Qd between nodes A and Ci depending also on dT |
|||
inst->jacobian_react[P_P] = qc_vpm; |
|||
inst->jacobian_react[P_M] = -qc_vpm; |
|||
inst->jacobian_react[M_P] = -qc_vpm; |
|||
inst->jacobian_react[M_M] = qc_vpm; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
// TODO implementation of the load_noise function as defined in the OSDI spec |
|||
void load_noise(void *inst, void *model, double freq, double *noise_dens, |
|||
double *ln_noise_dens) |
|||
{ |
|||
// TODO add noise to example |
|||
} |
|||
|
|||
#define LOAD_RHS_RESIST(name) \ |
|||
dst[inst->node_off[name]] += inst->rhs_resist[name]; |
|||
|
|||
// implementation of the load_rhs_resist function as defined in the OSDI spec |
|||
void load_residual_resist(void *inst_, double *dst) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
LOAD_RHS_RESIST(P) |
|||
LOAD_RHS_RESIST(M) |
|||
} |
|||
|
|||
#define LOAD_RHS_REACT(name) dst[inst->node_off[name]] += inst->rhs_react[name]; |
|||
|
|||
// implementation of the load_rhs_react function as defined in the OSDI spec |
|||
void load_residual_react(void *inst_, double *dst) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
LOAD_RHS_REACT(P) |
|||
LOAD_RHS_REACT(M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_RESIST(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_resist[name]; |
|||
|
|||
// implementation of the load_matrix_resist function as defined in the OSDI spec |
|||
void load_jacobian_resist(void *inst_) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
LOAD_MATRIX_RESIST(P_P) |
|||
LOAD_MATRIX_RESIST(P_M) |
|||
LOAD_MATRIX_RESIST(M_P) |
|||
LOAD_MATRIX_RESIST(M_M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_REACT(name) \ |
|||
*inst->jacobian_ptr_react[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_react function as defined in the OSDI spec |
|||
void load_jacobian_react(void *inst_, double alpha) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
LOAD_MATRIX_REACT(P_P) |
|||
LOAD_MATRIX_REACT(M_M) |
|||
LOAD_MATRIX_REACT(P_M) |
|||
LOAD_MATRIX_REACT(M_P) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_TRAN(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_tran function as defined in the OSDI spec |
|||
void load_jacobian_tran(void *inst_, double alpha) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
|
|||
// set dc stamps |
|||
load_jacobian_resist(inst_); |
|||
|
|||
// add reactive contributions |
|||
LOAD_MATRIX_TRAN(P_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
LOAD_MATRIX_TRAN(M_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_dc function as defined in the OSDI spec |
|||
void load_spice_rhs_dc(void *inst_, double *dst, double *prev_solve) |
|||
{ |
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
dst[inst->node_off[P]] += inst->jacobian_resist[P_M] * vm + |
|||
inst->jacobian_resist[P_P] * vp - |
|||
inst->rhs_resist[P]; |
|||
|
|||
dst[inst->node_off[M]] += inst->jacobian_resist[M_P] * vp + |
|||
inst->jacobian_resist[M_M] * vm - |
|||
inst->rhs_resist[M]; |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_tran function as defined in the OSDI |
|||
// spec |
|||
void load_spice_rhs_tran(void *inst_, double *dst, double *prev_solve, |
|||
double alpha) |
|||
{ |
|||
|
|||
CapacitorInstance *inst = (CapacitorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
// set DC rhs |
|||
load_spice_rhs_dc(inst_, dst, prev_solve); |
|||
|
|||
// add contributions due to reactive elements |
|||
dst[inst->node_off[P]] += |
|||
alpha * (inst->jacobian_react[P_P] * vp + |
|||
inst->jacobian_react[P_M] * vm); |
|||
|
|||
dst[inst->node_off[M]] += alpha * (inst->jacobian_react[M_M] * vm + |
|||
inst->jacobian_react[M_P] * vp); |
|||
} |
|||
|
|||
// structure that provides information of all nodes of the model |
|||
OsdiNode nodes[NUM_NODES] = { |
|||
{.name = "P", .units = "V", .is_reactive = true}, |
|||
{.name = "M", .units = "V", .is_reactive = true}, |
|||
}; |
|||
|
|||
// boolean array that tells which Jacobian entries are constant. Nothing is |
|||
// constant with selfheating, though. |
|||
bool const_jacobian_entries[NUM_MATRIX] = {}; |
|||
// these node pairs specify which entries in the Jacobian must be accounted for |
|||
OsdiNodePair jacobian_entries[NUM_MATRIX] = { |
|||
{P, P}, |
|||
{P, M}, |
|||
{M, P}, |
|||
{M, M}, |
|||
}; |
|||
|
|||
#define NUM_PARAMS 1 |
|||
// the model parameters as defined in Verilog-A, bounds and default values are |
|||
// stored elsewhere as they may depend on model parameters etc. |
|||
OsdiParamOpvar params[NUM_PARAMS] = { |
|||
{ |
|||
.name = (char *[]){"C"}, |
|||
.num_alias = 0, |
|||
.description = "Capacitance", |
|||
.units = "Farad", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
}; |
|||
|
|||
// fill exported data |
|||
uint32_t OSDI_VERSION_MAJOR = OSDI_VERSION_MAJOR_CURR; |
|||
uint32_t OSDI_VERSION_MINOR = OSDI_VERSION_MINOR_CURR; |
|||
uint32_t OSDI_NUM_DESCRIPTORS = 1; |
|||
// this is the main structure used by simulators, it gives access to all |
|||
// information in a model |
|||
OsdiDescriptor OSDI_DESCRIPTORS[1] = {{ |
|||
// metadata |
|||
.name = "capacitor_va", |
|||
|
|||
// nodes |
|||
.num_nodes = NUM_NODES, |
|||
.num_terminals = 2, |
|||
.nodes = (OsdiNode *)&nodes, |
|||
|
|||
// matrix entries |
|||
.num_jacobian_entries = NUM_MATRIX, |
|||
.jacobian_entries = (OsdiNodePair *)&jacobian_entries, |
|||
.const_jacobian_entries = (bool *)&const_jacobian_entries, |
|||
|
|||
// memory |
|||
.instance_size = sizeof(CapacitorInstance), |
|||
.model_size = sizeof(CapacitorModel), |
|||
.residual_resist_offset = offsetof(CapacitorInstance, rhs_resist), |
|||
.residual_react_offset = offsetof(CapacitorInstance, rhs_react), |
|||
.node_mapping_offset = offsetof(CapacitorInstance, node_off), |
|||
.jacobian_resist_offset = offsetof(CapacitorInstance, jacobian_resist), |
|||
.jacobian_react_offset = offsetof(CapacitorInstance, jacobian_react), |
|||
.jacobian_ptr_resist_offset = offsetof(CapacitorInstance, jacobian_ptr_resist), |
|||
.jacobian_ptr_react_offset = offsetof(CapacitorInstance, jacobian_ptr_react), |
|||
|
|||
// TODO add node collapsing to example |
|||
// node collapsing |
|||
.num_collapsible = 0, |
|||
.collapsible = NULL, |
|||
.is_collapsible_offset = 0, |
|||
|
|||
// noise |
|||
.noise_sources = NULL, |
|||
.num_noise_src = 0, |
|||
|
|||
// parameters and op vars |
|||
.num_params = NUM_PARAMS, |
|||
.num_instance_params = 0, |
|||
.num_opvars = 0, |
|||
.param_opvar = (OsdiParamOpvar *)¶ms, |
|||
|
|||
// setup |
|||
.access = &osdi_access, |
|||
.setup_model = &setup_model, |
|||
.setup_instance = &setup_instance, |
|||
.eval = &eval, |
|||
.load_noise = &load_noise, |
|||
.load_residual_resist = &load_residual_resist, |
|||
.load_residual_react = &load_residual_react, |
|||
.load_spice_rhs_dc = &load_spice_rhs_dc, |
|||
.load_spice_rhs_tran = &load_spice_rhs_tran, |
|||
.load_jacobian_resist = &load_jacobian_resist, |
|||
.load_jacobian_react = &load_jacobian_react, |
|||
.load_jacobian_tran = &load_jacobian_tran, |
|||
}}; |
|||
@ -1,49 +0,0 @@ |
|||
OSDI Multiple Devices Test |
|||
.options abstol=1e-15 |
|||
|
|||
|
|||
* one voltage source for sweeping, one for sensing: |
|||
VD Dx 0 DC 0 AC 1 SIN (0.5 0.2 10M) |
|||
Vsense Dx D DC 0 |
|||
|
|||
* model definitions: |
|||
.model rmod_osdi resistor_va r=20 |
|||
.model cmod_osdi capacitor_va c=5 |
|||
|
|||
*OSDI Resistor and Capacitor: |
|||
*OSDI_ACTIVATE*A1 D 0 rmod_osdi |
|||
*OSDI_ACTIVATE*A2 D 0 rmod_osdi |
|||
*OSDI_ACTIVATE*A3 D 0 cmod_osdi |
|||
|
|||
*Built-in Capacitor and Resistor: |
|||
*BUILT_IN_ACTIVATE*R1 D 0 20 |
|||
*BUILT_IN_ACTIVATE*R2 D 0 20 |
|||
*BUILT_IN_ACTIVATE*C1 D 0 5 |
|||
|
|||
|
|||
.control |
|||
pre_osdi resistor.osdi capacitor.osdi |
|||
|
|||
set filetype=ascii |
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
|
|||
* a DC sweep from 0.3V to 1V |
|||
dc Vd 0.3 1.0 0.01 |
|||
wrdata dc_sim.ngspice v(d) i(vsense) |
|||
|
|||
* an AC sweep at Vd=0.5V |
|||
alter VD=0.5 |
|||
ac dec 10 .01 10 |
|||
wrdata ac_sim.ngspice v(d) i(vsense) |
|||
|
|||
* a transient analysis |
|||
tran 100ms 500000ms |
|||
wrdata tr_sim.ngspice v(d) i(vsense) |
|||
|
|||
* print number of iterations |
|||
rusage totiter |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,364 +0,0 @@ |
|||
/* |
|||
* This file is part of the OSDI component of NGSPICE. |
|||
* Copyright© 2022 SemiMod GmbH. |
|||
* |
|||
* This Source Code Form is subject to the terms of the Mozilla Public |
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. |
|||
* |
|||
* Author: Pascal Kuthe <pascal.kuthe@semimod.de> |
|||
* |
|||
* This is an exemplary implementation of the OSDI interface for the Verilog-A |
|||
* model specified in diode.va. In the future, the OpenVAF compiler shall |
|||
* generate an comparable object file. Primary purpose of this is example to |
|||
* have a concrete example for the OSDI interface, OpenVAF will generate a more |
|||
* optimized implementation. |
|||
* |
|||
*/ |
|||
|
|||
#include "osdi.h" |
|||
#include "string.h" |
|||
#include <math.h> |
|||
#include <stdbool.h> |
|||
#include <stddef.h> |
|||
#include <stdint.h> |
|||
#include <stdio.h> |
|||
|
|||
// public interface |
|||
extern uint32_t OSDI_VERSION_MAJOR; |
|||
extern uint32_t OSDI_VERSION_MINOR; |
|||
extern uint32_t OSDI_NUM_DESCRIPTORS; |
|||
extern OsdiDescriptor OSDI_DESCRIPTORS[1]; |
|||
|
|||
// number of nodes and definitions of node ids for nicer syntax in this file |
|||
// note: order should be same as "nodes" list defined later |
|||
#define NUM_NODES 3 |
|||
#define P 0 |
|||
#define M 1 |
|||
|
|||
// number of matrix entries and definitions for Jacobian entries for nicer |
|||
// syntax in this file |
|||
#define NUM_MATRIX 4 |
|||
#define P_P 0 |
|||
#define P_M 1 |
|||
#define M_P 2 |
|||
#define M_M 3 |
|||
|
|||
// The model structure for the diode |
|||
typedef struct ResistorModel |
|||
{ |
|||
double R; |
|||
bool R_given; |
|||
} ResistorModel; |
|||
|
|||
// The instace structure for the diode |
|||
typedef struct ResistorInstance |
|||
{ |
|||
double temperature; |
|||
double rhs_resist[NUM_NODES]; |
|||
double rhs_react[NUM_NODES]; |
|||
double jacobian_resist[NUM_MATRIX]; |
|||
double jacobian_react[NUM_MATRIX]; |
|||
double *jacobian_ptr_resist[NUM_MATRIX]; |
|||
double *jacobian_ptr_react[NUM_MATRIX]; |
|||
uint32_t node_off[NUM_NODES]; |
|||
} ResistorInstance; |
|||
|
|||
// implementation of the access function as defined by the OSDI spec |
|||
void *osdi_access(void *inst_, void *model_, uint32_t id, uint32_t flags) |
|||
{ |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
bool *given; |
|||
void *value; |
|||
|
|||
switch (id) // id of params defined in param_opvar array |
|||
{ |
|||
case 0: |
|||
value = (void *)&model->R; |
|||
given = &model->R_given; |
|||
break; |
|||
default: |
|||
return NULL; |
|||
} |
|||
|
|||
if (flags & ACCESS_FLAG_SET) |
|||
{ |
|||
*given = true; |
|||
} |
|||
|
|||
return value; |
|||
} |
|||
|
|||
// implementation of the setup_model function as defined in the OSDI spec |
|||
OsdiInitInfo setup_model(void *_handle, void *model_) |
|||
{ |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
|
|||
// set parameters and check bounds |
|||
if (!model->R_given) |
|||
{ |
|||
model->R = 1; |
|||
} |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the setup_instace function as defined in the OSDI spec |
|||
OsdiInitInfo setup_instance(void *_handle, void *inst_, void *model_, |
|||
double temperature, uint32_t _num_terminals) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
|
|||
inst->temperature = temperature; |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the eval function as defined in the OSDI spec |
|||
uint32_t eval(void *handle, void *inst_, void *model_, uint32_t flags, |
|||
double *prev_solve, OsdiSimParas *sim_params) |
|||
{ |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
// get voltages |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
double vpm = vp - vm; |
|||
|
|||
double ir = vpm / model->R; |
|||
double g = 1 / model->R; |
|||
|
|||
//////////////// |
|||
// write rhs |
|||
//////////////// |
|||
|
|||
if (flags & CALC_RESIST_RESIDUAL) |
|||
{ |
|||
// write resist rhs |
|||
inst->rhs_resist[P] = ir; |
|||
inst->rhs_resist[M] = -ir; |
|||
} |
|||
|
|||
////////////////// |
|||
// write Jacobian |
|||
////////////////// |
|||
|
|||
if (flags & CALC_RESIST_JACOBIAN) |
|||
{ |
|||
// stamp resistor |
|||
inst->jacobian_resist[P_P] = g; |
|||
inst->jacobian_resist[P_M] = -g; |
|||
inst->jacobian_resist[M_P] = -g; |
|||
inst->jacobian_resist[M_M] = g; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
// TODO implementation of the load_noise function as defined in the OSDI spec |
|||
void load_noise(void *inst, void *model, double freq, double *noise_dens, |
|||
double *ln_noise_dens) |
|||
{ |
|||
// TODO add noise to example |
|||
} |
|||
|
|||
#define LOAD_RHS_RESIST(name) \ |
|||
dst[inst->node_off[name]] += inst->rhs_resist[name]; |
|||
|
|||
// implementation of the load_rhs_resist function as defined in the OSDI spec |
|||
void load_residual_resist(void *inst_, double *dst) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
LOAD_RHS_RESIST(P) |
|||
LOAD_RHS_RESIST(M) |
|||
} |
|||
|
|||
#define LOAD_RHS_REACT(name) dst[inst->node_off[name]] += inst->rhs_react[name]; |
|||
|
|||
// implementation of the load_rhs_react function as defined in the OSDI spec |
|||
void load_residual_react(void *inst_, double *dst) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
LOAD_RHS_REACT(P) |
|||
LOAD_RHS_REACT(M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_RESIST(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_resist[name]; |
|||
|
|||
// implementation of the load_matrix_resist function as defined in the OSDI spec |
|||
void load_jacobian_resist(void *inst_) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
LOAD_MATRIX_RESIST(P_P) |
|||
LOAD_MATRIX_RESIST(P_M) |
|||
LOAD_MATRIX_RESIST(M_P) |
|||
LOAD_MATRIX_RESIST(M_M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_REACT(name) \ |
|||
*inst->jacobian_ptr_react[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_react function as defined in the OSDI spec |
|||
void load_jacobian_react(void *inst_, double alpha) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
LOAD_MATRIX_REACT(P_P) |
|||
LOAD_MATRIX_REACT(M_M) |
|||
LOAD_MATRIX_REACT(P_M) |
|||
LOAD_MATRIX_REACT(M_P) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_TRAN(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_tran function as defined in the OSDI spec |
|||
void load_jacobian_tran(void *inst_, double alpha) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
// set dc stamps |
|||
load_jacobian_resist(inst_); |
|||
|
|||
// add reactive contributions |
|||
LOAD_MATRIX_TRAN(P_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
LOAD_MATRIX_TRAN(M_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_dc function as defined in the OSDI spec |
|||
void load_spice_rhs_dc(void *inst_, double *dst, double *prev_solve) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
dst[inst->node_off[P]] += inst->jacobian_resist[P_M] * vm + |
|||
inst->jacobian_resist[P_P] * vp - |
|||
inst->rhs_resist[P]; |
|||
|
|||
dst[inst->node_off[M]] += inst->jacobian_resist[M_P] * vp + |
|||
inst->jacobian_resist[M_M] * vm - |
|||
inst->rhs_resist[M]; |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_tran function as defined in the OSDI |
|||
// spec |
|||
void load_spice_rhs_tran(void *inst_, double *dst, double *prev_solve, |
|||
double alpha) |
|||
{ |
|||
|
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
// set DC rhs |
|||
load_spice_rhs_dc(inst_, dst, prev_solve); |
|||
|
|||
// add contributions due to reactive elements |
|||
dst[inst->node_off[P]] += |
|||
alpha * (inst->jacobian_react[P_P] * vp + |
|||
inst->jacobian_react[P_M] * vm); |
|||
|
|||
dst[inst->node_off[M]] += alpha * (inst->jacobian_react[M_M] * vm + |
|||
inst->jacobian_react[M_P] * vp); |
|||
} |
|||
|
|||
// structure that provides information of all nodes of the model |
|||
OsdiNode nodes[NUM_NODES] = { |
|||
{.name = "P", .units = "V", .is_reactive = false}, |
|||
{.name = "M", .units = "V", .is_reactive = false}, |
|||
}; |
|||
|
|||
// boolean array that tells which Jacobian entries are constant. Nothing is |
|||
// constant with selfheating, though. |
|||
bool const_jacobian_entries[NUM_MATRIX] = {}; |
|||
// these node pairs specify which entries in the Jacobian must be accounted for |
|||
OsdiNodePair jacobian_entries[NUM_MATRIX] = { |
|||
{P, P}, |
|||
{P, M}, |
|||
{M, P}, |
|||
{M, M}, |
|||
}; |
|||
|
|||
#define NUM_PARAMS 1 |
|||
// the model parameters as defined in Verilog-A, bounds and default values are |
|||
// stored elsewhere as they may depend on model parameters etc. |
|||
OsdiParamOpvar params[NUM_PARAMS] = { |
|||
{ |
|||
.name = (char *[]){"R"}, |
|||
.num_alias = 0, |
|||
.description = "Resistance", |
|||
.units = "Ohm", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
}; |
|||
|
|||
// fill exported data |
|||
uint32_t OSDI_VERSION_MAJOR = OSDI_VERSION_MAJOR_CURR; |
|||
uint32_t OSDI_VERSION_MINOR = OSDI_VERSION_MINOR_CURR; |
|||
uint32_t OSDI_NUM_DESCRIPTORS = 1; |
|||
// this is the main structure used by simulators, it gives access to all |
|||
// information in a model |
|||
OsdiDescriptor OSDI_DESCRIPTORS[1] = {{ |
|||
// metadata |
|||
.name = "resistor_va", |
|||
|
|||
// nodes |
|||
.num_nodes = NUM_NODES, |
|||
.num_terminals = 2, |
|||
.nodes = (OsdiNode *)&nodes, |
|||
|
|||
// matrix entries |
|||
.num_jacobian_entries = NUM_MATRIX, |
|||
.jacobian_entries = (OsdiNodePair *)&jacobian_entries, |
|||
.const_jacobian_entries = (bool *)&const_jacobian_entries, |
|||
|
|||
// memory |
|||
.instance_size = sizeof(ResistorInstance), |
|||
.model_size = sizeof(ResistorModel), |
|||
.residual_resist_offset = offsetof(ResistorInstance, rhs_resist), |
|||
.residual_react_offset = offsetof(ResistorInstance, rhs_react), |
|||
.node_mapping_offset = offsetof(ResistorInstance, node_off), |
|||
.jacobian_resist_offset = offsetof(ResistorInstance, jacobian_resist), |
|||
.jacobian_react_offset = offsetof(ResistorInstance, jacobian_react), |
|||
.jacobian_ptr_resist_offset = offsetof(ResistorInstance, jacobian_ptr_resist), |
|||
.jacobian_ptr_react_offset = offsetof(ResistorInstance, jacobian_ptr_react), |
|||
|
|||
// TODO add node collapsing to example |
|||
// node collapsing |
|||
.num_collapsible = 0, |
|||
.collapsible = NULL, |
|||
.is_collapsible_offset = 0, |
|||
|
|||
// noise |
|||
.noise_sources = NULL, |
|||
.num_noise_src = 0, |
|||
|
|||
// parameters and op vars |
|||
.num_params = NUM_PARAMS, |
|||
.num_instance_params = 0, |
|||
.num_opvars = 0, |
|||
.param_opvar = (OsdiParamOpvar *)¶ms, |
|||
|
|||
// setup |
|||
.access = &osdi_access, |
|||
.setup_model = &setup_model, |
|||
.setup_instance = &setup_instance, |
|||
.eval = &eval, |
|||
.load_noise = &load_noise, |
|||
.load_residual_resist = &load_residual_resist, |
|||
.load_residual_react = &load_residual_react, |
|||
.load_spice_rhs_dc = &load_spice_rhs_dc, |
|||
.load_spice_rhs_tran = &load_spice_rhs_tran, |
|||
.load_jacobian_resist = &load_jacobian_resist, |
|||
.load_jacobian_react = &load_jacobian_react, |
|||
.load_jacobian_tran = &load_jacobian_tran, |
|||
}}; |
|||
@ -1,172 +0,0 @@ |
|||
""" test OSDI simulation of resistor and capacitor |
|||
""" |
|||
import os, shutil |
|||
import numpy as np |
|||
import pandas as pd |
|||
import sys |
|||
sys.path.append( |
|||
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) |
|||
|
|||
from testing import prepare_test |
|||
|
|||
# This test runs a DC, AC and Transient Simulation of a simple resistor and resistor. |
|||
# The capacitor and resistor are available as C files and need to be compiled to a shared objects |
|||
# and then bet put into /usr/local/share/ngspice/osdi: |
|||
# |
|||
# > make osdi_resistor |
|||
# > cp resistor_osdi.osdi /usr/local/share/ngspice/osdi/resistor_osdi.osdi |
|||
# > make osdi_capacitor |
|||
# > cp capacitor_osdi.osdi /usr/local/share/ngspice/osdi/capacitor_osdi.osdi |
|||
# |
|||
# The integration test proves the functioning of the OSDI interface. |
|||
# Future tests will target Verilog-A models like HICUM/L2 that should yield exactly the same results as the Ngspice implementation. |
|||
|
|||
|
|||
directory = os.path.dirname(__file__) |
|||
|
|||
def test_ngspice(): |
|||
dir_osdi, dir_built_in = prepare_test(directory) |
|||
|
|||
# read DC simulation results |
|||
dc_data_osdi = pd.read_csv(os.path.join(dir_osdi, "dc_sim.ngspice"), sep="\\s+") |
|||
dc_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "dc_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
|
|||
# read AC simulation results |
|||
ac_data_osdi = pd.read_csv(os.path.join(dir_osdi, "ac_sim.ngspice"), sep="\\s+") |
|||
ac_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "ac_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# read TR simulation results |
|||
tr_data_osdi = pd.read_csv(os.path.join(dir_osdi, "tr_sim.ngspice"), sep="\\s+") |
|||
tr_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "tr_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# test simulation results |
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
# np.testing.assert_allclose(id_osdi[0:20], id_built_in[0:20], rtol=0.01) |
|||
|
|||
return ( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) = test_ngspice() |
|||
|
|||
import matplotlib.pyplot as plt |
|||
|
|||
# DC Plot |
|||
pd_built_in = dc_data_built_in["v(d)"] * dc_data_built_in["i(vsense)"] |
|||
pd_osdi = dc_data_osdi["v(d)"] * dc_data_osdi["i(vsense)"] |
|||
fig, ax1 = plt.subplots() |
|||
ax1.plot( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
ax1.plot( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["v(d)"] / 10 * 1e3, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
ax1.plot( |
|||
dc_data_osdi["v(d)"], |
|||
dc_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
ax1.set_ylabel(r"$I_{\mathrm{P}} (\mathrm{mA})$") |
|||
ax1.set_xlabel(r"$V_{\mathrm{PM}}(\mathrm{V})$") |
|||
plt.legend() |
|||
|
|||
# AC Plot |
|||
omega = 2 * np.pi * ac_data_osdi["frequency"] |
|||
z_analytical = 1 / 10 |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
np.ones_like(ac_data_built_in["frequency"]) * z_analytical * 1e3, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], ac_data_osdi["i(vsense)"] * 1e3, label="OSDI" |
|||
) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Re \\left\{ Y_{11} \\right\} (\\mathrm{mS})$") |
|||
plt.legend() |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense).1"] / omega, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
np.ones_like(ac_data_built_in["i(vsense).1"]) *5, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], |
|||
ac_data_osdi["i(vsense).1"] / omega, |
|||
label="OSDI", |
|||
) |
|||
plt.ylim(4, 6) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Im\\left\{Y_{11}\\right\}/(\\omega) (\\mathrm{F})$") |
|||
plt.legend() |
|||
|
|||
# TR plot |
|||
fig = plt.figure() |
|||
plt.plot( |
|||
tr_data_built_in["time"] * 1e9, |
|||
tr_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.plot( |
|||
tr_data_osdi["time"] * 1e9, |
|||
tr_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
plt.xlabel(r"$t(\mathrm{nS})$") |
|||
plt.ylabel(r"$I_{\mathrm{D}}(\mathrm{mA})$") |
|||
plt.legend() |
|||
|
|||
plt.show() |
|||
@ -1,831 +0,0 @@ |
|||
/* |
|||
* This file is part of the OSDI component of NGSPICE. |
|||
* Copyright© 2022 SemiMod GmbH. |
|||
* |
|||
* This Source Code Form is subject to the terms of the Mozilla Public |
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. |
|||
* |
|||
* Author: Pascal Kuthe <pascal.kuthe@semimod.de> |
|||
* |
|||
* This is an exemplary implementation of the OSDI interface for the Verilog-A |
|||
* model specified in diode.va. In the future, the OpenVAF compiler shall |
|||
* generate an comparable object file. Primary purpose of this is example to |
|||
* have a concrete example for the OSDI interface, OpenVAF will generate a more |
|||
* optimized implementation. |
|||
* |
|||
*/ |
|||
|
|||
#include "osdi.h" |
|||
#include "string.h" |
|||
#include <math.h> |
|||
#include <stdbool.h> |
|||
#include <stddef.h> |
|||
#include <stdint.h> |
|||
#include <stdio.h> |
|||
|
|||
// public interface |
|||
extern uint32_t OSDI_VERSION_MAJOR; |
|||
extern uint32_t OSDI_VERSION_MINOR; |
|||
extern uint32_t OSDI_NUM_DESCRIPTORS; |
|||
extern OsdiDescriptor OSDI_DESCRIPTORS[1]; |
|||
|
|||
// number of nodes and definitions of node ids for nicer syntax in this file |
|||
// note: order should be same as "nodes" list defined later |
|||
#define NUM_NODES 4 |
|||
#define A 0 |
|||
#define C 1 |
|||
#define TNODE 2 |
|||
#define CI 3 |
|||
|
|||
#define NUM_COLLAPSIBLE 2 |
|||
|
|||
// number of matrix entries and definitions for Jacobian entries for nicer |
|||
// syntax in this file |
|||
#define NUM_MATRIX 14 |
|||
#define CI_CI 0 |
|||
#define CI_C 1 |
|||
#define C_CI 2 |
|||
#define C_C 3 |
|||
#define A_A 4 |
|||
#define A_CI 5 |
|||
#define CI_A 6 |
|||
#define A_TNODE 7 |
|||
#define C_TNODE 8 |
|||
#define CI_TNODE 9 |
|||
#define TNODE_TNODE 10 |
|||
#define TNODE_A 11 |
|||
#define TNODE_C 12 |
|||
#define TNODE_CI 13 |
|||
|
|||
// The model structure for the diode |
|||
typedef struct DiodeModel |
|||
{ |
|||
double Rs; |
|||
bool Rs_given; |
|||
double Is; |
|||
bool Is_given; |
|||
double zetars; |
|||
bool zetars_given; |
|||
double N; |
|||
bool N_given; |
|||
double Cj0; |
|||
bool Cj0_given; |
|||
double Vj; |
|||
bool Vj_given; |
|||
double M; |
|||
bool M_given; |
|||
double Rth; |
|||
bool Rth_given; |
|||
double zetarth; |
|||
bool zetarth_given; |
|||
double zetais; |
|||
bool zetais_given; |
|||
double Tnom; |
|||
bool Tnom_given; |
|||
double mfactor; // multiplication factor for parallel devices |
|||
bool mfactor_given; |
|||
// InitError errors[MAX_ERROR_NUM], |
|||
} DiodeModel; |
|||
|
|||
// The instace structure for the diode |
|||
typedef struct DiodeInstace |
|||
{ |
|||
double mfactor; // multiplication factor for parallel devices |
|||
bool mfactor_given; |
|||
double temperature; |
|||
double rhs_resist[NUM_NODES]; |
|||
double rhs_react[NUM_NODES]; |
|||
double jacobian_resist[NUM_MATRIX]; |
|||
double jacobian_react[NUM_MATRIX]; |
|||
bool is_collapsible[NUM_COLLAPSIBLE]; |
|||
double *jacobian_ptr_resist[NUM_MATRIX]; |
|||
double *jacobian_ptr_react[NUM_MATRIX]; |
|||
uint32_t node_off[NUM_NODES]; |
|||
} DiodeInstace; |
|||
|
|||
#define EXP_LIM 80.0 |
|||
|
|||
double limexp(double x) |
|||
{ |
|||
if (x < EXP_LIM) |
|||
{ |
|||
return exp(x); |
|||
} |
|||
else |
|||
{ |
|||
return exp(EXP_LIM) * (x + 1 - EXP_LIM); |
|||
} |
|||
} |
|||
|
|||
double dlimexp(double x) |
|||
{ |
|||
if (x < EXP_LIM) |
|||
{ |
|||
return exp(x); |
|||
} |
|||
else |
|||
{ |
|||
return exp(EXP_LIM); |
|||
} |
|||
} |
|||
|
|||
// implementation of the access function as defined by the OSDI spec |
|||
void *osdi_access(void *inst_, void *model_, uint32_t id, uint32_t flags) |
|||
{ |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
bool *given; |
|||
void *value; |
|||
|
|||
switch (id) // id of params defined in param_opvar array |
|||
{ |
|||
case 0: |
|||
if (flags & ACCESS_FLAG_INSTANCE) |
|||
{ |
|||
value = (void *)&inst->mfactor; |
|||
given = &inst->mfactor_given; |
|||
} |
|||
else |
|||
{ |
|||
value = (void *)&model->mfactor; |
|||
given = &model->mfactor_given; |
|||
} |
|||
break; |
|||
case 1: |
|||
value = (void *)&model->Rs; |
|||
given = &model->Rs_given; |
|||
break; |
|||
case 2: |
|||
value = (void *)&model->Is; |
|||
given = &model->Is_given; |
|||
break; |
|||
case 3: |
|||
value = (void *)&model->zetars; |
|||
given = &model->zetars_given; |
|||
break; |
|||
case 4: |
|||
value = (void *)&model->N; |
|||
given = &model->N_given; |
|||
break; |
|||
case 5: |
|||
value = (void *)&model->Cj0; |
|||
given = &model->Cj0_given; |
|||
break; |
|||
case 6: |
|||
value = (void *)&model->Vj; |
|||
given = &model->Vj_given; |
|||
break; |
|||
case 7: |
|||
value = (void *)&model->M; |
|||
given = &model->M_given; |
|||
break; |
|||
case 8: |
|||
value = &model->Rth; |
|||
given = &model->Rth_given; |
|||
break; |
|||
case 9: |
|||
value = (void *)&model->zetarth; |
|||
given = &model->zetarth_given; |
|||
break; |
|||
case 10: |
|||
value = (void *)&model->zetais; |
|||
given = &model->zetais_given; |
|||
break; |
|||
case 11: |
|||
value = (void *)&model->Tnom; |
|||
given = &model->Tnom_given; |
|||
break; |
|||
default: |
|||
return NULL; |
|||
} |
|||
|
|||
if (flags & ACCESS_FLAG_SET) |
|||
{ |
|||
*given = true; |
|||
} |
|||
|
|||
return value; |
|||
} |
|||
|
|||
// implementation of the setup_model function as defined in the OSDI spec |
|||
OsdiInitInfo setup_model(void *_handle, void *model_) |
|||
{ |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
|
|||
// set parameters and check bounds |
|||
if (!model->mfactor_given) |
|||
{ |
|||
model->mfactor = 1.0; |
|||
} |
|||
if (!model->Rs_given) |
|||
{ |
|||
model->Rs = 1e-9; |
|||
} |
|||
if (!model->Is_given) |
|||
{ |
|||
model->Is = 1e-14; |
|||
} |
|||
if (!model->zetars_given) |
|||
{ |
|||
model->zetars = 0; |
|||
} |
|||
if (!model->N_given) |
|||
{ |
|||
model->N = 1; |
|||
} |
|||
if (!model->Cj0_given) |
|||
{ |
|||
model->Cj0 = 0; |
|||
} |
|||
if (!model->Vj_given) |
|||
{ |
|||
model->Vj = 1.0; |
|||
} |
|||
if (!model->M_given) |
|||
{ |
|||
model->M = 0.5; |
|||
} |
|||
if (!model->Rth_given) |
|||
{ |
|||
model->Rth = 0; |
|||
} |
|||
if (!model->zetarth_given) |
|||
{ |
|||
model->zetarth = 0; |
|||
} |
|||
if (!model->zetais_given) |
|||
{ |
|||
model->zetais = 0; |
|||
} |
|||
if (!model->Tnom_given) |
|||
{ |
|||
model->Tnom = 300; |
|||
} |
|||
|
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the setup_instace function as defined in the OSDI spec |
|||
OsdiInitInfo setup_instance(void *_handle, void *inst_, void *model_, |
|||
double temperature, uint32_t _num_terminals) |
|||
{ |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
|
|||
// Here the logic for node collapsing ist implemented. The indices in this list must adhere to the "collapsible" List of node pairs. |
|||
if (model->Rs<1e-9){ // Rs between Ci C |
|||
inst->is_collapsible[0] = true; |
|||
} |
|||
if (model->Rth<1e-9){ // Rs between Ci C |
|||
inst->is_collapsible[1] = true; |
|||
} |
|||
|
|||
if (!inst->mfactor_given) |
|||
{ |
|||
if (model->mfactor_given) |
|||
{ |
|||
inst->mfactor = model->mfactor; |
|||
} |
|||
else |
|||
{ |
|||
inst->mfactor = 1; |
|||
} |
|||
} |
|||
|
|||
inst->temperature = temperature; |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the eval function as defined in the OSDI spec |
|||
uint32_t eval(void *handle, void *inst_, void *model_, uint32_t flags, |
|||
double *prev_solve, OsdiSimParas *sim_params) |
|||
{ |
|||
DiodeModel *model = (DiodeModel *)model_; |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
// get voltages |
|||
double va = prev_solve[inst->node_off[A]]; |
|||
double vc = prev_solve[inst->node_off[C]]; |
|||
double vci = prev_solve[inst->node_off[CI]]; |
|||
double vdtj = prev_solve[inst->node_off[TNODE]]; |
|||
|
|||
double vcic = vci - vc; |
|||
double vaci = va - vci; |
|||
|
|||
double gmin = 1e-12; |
|||
for (int i = 0; sim_params->names[i] != NULL; i++) |
|||
{ |
|||
if (strcmp(sim_params->names[i], "gmin") == 0) |
|||
{ |
|||
gmin = sim_params->vals[i]; |
|||
} |
|||
} |
|||
|
|||
//////////////////////////////// |
|||
// evaluate model equations |
|||
//////////////////////////////// |
|||
|
|||
// temperature update |
|||
double pk = 1.3806503e-23; |
|||
double pq = 1.602176462e-19; |
|||
double t_dev = inst->temperature + vdtj; |
|||
double tdev_tnom = t_dev / model->Tnom; |
|||
double rs_t = model->Rs * powf(tdev_tnom, model->zetars); |
|||
double rth_t = model->Rth * powf(tdev_tnom, model->zetarth); |
|||
double is_t = model->Is * powf(tdev_tnom, model->zetais); |
|||
double vt = t_dev * pk / pq; |
|||
|
|||
// derivatives w.r.t. temperature |
|||
double rs_dt = model->zetars * model->Rs * |
|||
powf(tdev_tnom, model->zetars - 1.0) / model->Tnom; |
|||
double rth_dt = model->zetarth * model->Rth * |
|||
powf(tdev_tnom, model->zetarth - 1.0) / model->Tnom; |
|||
double is_dt = model->zetais * model->Is * |
|||
powf(tdev_tnom, model->zetais - 1.0) / model->Tnom; |
|||
double vt_tj = pk / pq; |
|||
|
|||
// evaluate model equations and calculate all derivatives |
|||
// diode current |
|||
double id = is_t * (limexp(vaci / (model->N * vt)) - 1.0); |
|||
double gd = is_t / vt * dlimexp(vaci / (model->N * vt)); |
|||
double gdt = -is_t * dlimexp(vaci / (model->N * vt)) * vaci / model->N / vt / |
|||
vt * vt_tj + |
|||
1.0 * exp((vaci / (model->N * vt)) - 1.0) * is_dt; |
|||
|
|||
// resistor |
|||
double irs = 0; |
|||
double g = 0; |
|||
double grt = 0; |
|||
if (!inst->is_collapsible[0]) { |
|||
irs = vcic / rs_t; |
|||
g = 1.0 / rs_t; |
|||
grt = -irs / rs_t * rs_dt; |
|||
} |
|||
|
|||
|
|||
// thermal resistance |
|||
double irth = 0; |
|||
double gt = 0; |
|||
if (!inst->is_collapsible[1]) { |
|||
irth = vdtj / rth_t; |
|||
gt = 1.0 / rth_t - irth / rth_t * rth_dt; |
|||
} |
|||
|
|||
// charge |
|||
double vf = model->Vj * (1.0 - powf(3.04, -1.0 / model->M)); |
|||
double x = (vf - vaci) / vt; |
|||
double x_vt = -x / vt; |
|||
double x_dtj = x_vt * vt_tj; |
|||
double x_vaci = -1.0 / vt; |
|||
double y = sqrt(x * x + 1.92); |
|||
double y_x = 0.5 / y * 2.0 * x; |
|||
double y_vaci = y_x * x_vaci; |
|||
double y_dtj = y_x * x_dtj; |
|||
double vd = vf - vt * (x + y) / (2.0); |
|||
double vd_x = -vt / 2.0; |
|||
double vd_y = -vt / 2.0; |
|||
double vd_vt = -(x + y) / (2.0); |
|||
double vd_dtj = vd_x * x_dtj + vd_y * y_dtj + vd_vt * vt_tj; |
|||
double vd_vaci = vd_x * x_vaci + vd_y * y_vaci; |
|||
double qd = model->Cj0 * vaci * model->Vj * |
|||
(1.0 - powf(1.0 - vd / model->Vj, 1.0 - model->M)) / |
|||
(1.0 - model->M); |
|||
double qd_vd = model->Cj0 * model->Vj / (1.0 - model->M) * (1.0 - model->M) * |
|||
powf(1.0 - vd / model->Vj, 1.0 - model->M - 1.0) / model->Vj; |
|||
double qd_dtj = qd_vd * vd_dtj; |
|||
double qd_vaci = qd_vd * vd_vaci; |
|||
|
|||
// thermal power source = current source |
|||
double ith = id * vaci ; |
|||
double ith_vtj = gdt * vaci ; |
|||
double ith_vcic = 0; |
|||
double ith_vaci = gd * vaci + id; |
|||
if (!inst->is_collapsible[0]) { |
|||
ith_vcic = 2.0 * vcic / rs_t; |
|||
ith += powf(vcic, 2.0) / rs_t; |
|||
ith_vtj -= - powf(vcic, 2.0) / rs_t / rs_t * rs_dt; |
|||
} |
|||
|
|||
id += gmin * vaci; |
|||
gd += gmin; |
|||
|
|||
double mfactor = inst->mfactor; |
|||
|
|||
//////////////// |
|||
// write rhs |
|||
//////////////// |
|||
|
|||
if (flags & CALC_RESIST_RESIDUAL) |
|||
{ |
|||
// write resist rhs |
|||
inst->rhs_resist[A] = id * mfactor; |
|||
inst->rhs_resist[CI] = -id * mfactor + irs * mfactor; |
|||
inst->rhs_resist[C] = -irs * mfactor; |
|||
inst->rhs_resist[TNODE] = -ith * mfactor + irth * mfactor; |
|||
} |
|||
|
|||
if (flags & CALC_REACT_RESIDUAL) |
|||
{ |
|||
// write react rhs |
|||
inst->rhs_react[A] = qd * mfactor; |
|||
inst->rhs_react[CI] = -qd * mfactor; |
|||
} |
|||
|
|||
////////////////// |
|||
// write Jacobian |
|||
////////////////// |
|||
|
|||
if (flags & CALC_RESIST_JACOBIAN) |
|||
{ |
|||
// stamp diode (current flowing from Ci into A) |
|||
inst->jacobian_resist[A_A] = gd * mfactor; |
|||
inst->jacobian_resist[A_CI] = -gd * mfactor; |
|||
inst->jacobian_resist[CI_A] = -gd * mfactor; |
|||
inst->jacobian_resist[CI_CI] = gd * mfactor; |
|||
// diode thermal |
|||
inst->jacobian_resist[A_TNODE] = gdt * mfactor; |
|||
inst->jacobian_resist[CI_TNODE] = -gdt * mfactor; |
|||
|
|||
// stamp resistor (current flowing from C into CI) |
|||
inst->jacobian_resist[CI_CI] += g * mfactor; |
|||
inst->jacobian_resist[CI_C] = -g * mfactor; |
|||
inst->jacobian_resist[C_CI] = -g * mfactor; |
|||
inst->jacobian_resist[C_C] = g * mfactor; |
|||
// resistor thermal |
|||
inst->jacobian_resist[CI_TNODE] = grt * mfactor; |
|||
inst->jacobian_resist[C_TNODE] = -grt * mfactor; |
|||
|
|||
// stamp rth flowing into node dTj |
|||
inst->jacobian_resist[TNODE_TNODE] = gt * mfactor; |
|||
|
|||
// stamp ith flowing out of T node |
|||
inst->jacobian_resist[TNODE_TNODE] -= ith_vtj * mfactor; |
|||
inst->jacobian_resist[TNODE_CI] = (ith_vcic - ith_vaci) * mfactor; |
|||
inst->jacobian_resist[TNODE_C] = -ith_vcic * mfactor; |
|||
inst->jacobian_resist[TNODE_A] = ith_vaci * mfactor; |
|||
} |
|||
|
|||
if (flags & CALC_REACT_JACOBIAN) |
|||
{ |
|||
// write react matrix |
|||
// stamp Qd between nodes A and Ci depending also on dT |
|||
inst->jacobian_react[A_A] = qd_vaci * mfactor; |
|||
inst->jacobian_react[A_CI] = -qd_vaci * mfactor; |
|||
inst->jacobian_react[CI_A] = -qd_vaci * mfactor; |
|||
inst->jacobian_react[CI_CI] = qd_vaci * mfactor; |
|||
|
|||
inst->jacobian_react[A_TNODE] = qd_dtj * mfactor; |
|||
inst->jacobian_react[CI_TNODE] = -qd_dtj * mfactor; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
// TODO implementation of the load_noise function as defined in the OSDI spec |
|||
void load_noise(void *inst, void *model, double freq, double *noise_dens, |
|||
double *ln_noise_dens) |
|||
{ |
|||
// TODO add noise to example |
|||
} |
|||
|
|||
#define LOAD_RHS_RESIST(name) \ |
|||
dst[inst->node_off[name]] += inst->rhs_resist[name]; |
|||
|
|||
// implementation of the load_rhs_resist function as defined in the OSDI spec |
|||
void load_residual_resist(void *inst_, double *dst) |
|||
{ |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
LOAD_RHS_RESIST(A) |
|||
LOAD_RHS_RESIST(CI) |
|||
LOAD_RHS_RESIST(C) |
|||
LOAD_RHS_RESIST(TNODE) |
|||
} |
|||
|
|||
#define LOAD_RHS_REACT(name) dst[inst->node_off[name]] += inst->rhs_react[name]; |
|||
|
|||
// implementation of the load_rhs_react function as defined in the OSDI spec |
|||
void load_residual_react(void *inst_, double *dst) |
|||
{ |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
LOAD_RHS_REACT(A) |
|||
LOAD_RHS_REACT(CI) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_RESIST(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_resist[name]; |
|||
|
|||
// implementation of the load_matrix_resist function as defined in the OSDI spec |
|||
void load_jacobian_resist(void *inst_) |
|||
{ |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
LOAD_MATRIX_RESIST(A_A) |
|||
LOAD_MATRIX_RESIST(A_CI) |
|||
LOAD_MATRIX_RESIST(A_TNODE) |
|||
|
|||
LOAD_MATRIX_RESIST(CI_A) |
|||
LOAD_MATRIX_RESIST(CI_CI) |
|||
LOAD_MATRIX_RESIST(CI_C) |
|||
LOAD_MATRIX_RESIST(CI_TNODE) |
|||
|
|||
LOAD_MATRIX_RESIST(C_CI) |
|||
LOAD_MATRIX_RESIST(C_C) |
|||
LOAD_MATRIX_RESIST(C_TNODE) |
|||
|
|||
LOAD_MATRIX_RESIST(TNODE_TNODE) |
|||
LOAD_MATRIX_RESIST(TNODE_A) |
|||
LOAD_MATRIX_RESIST(TNODE_C) |
|||
LOAD_MATRIX_RESIST(TNODE_CI) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_REACT(name) \ |
|||
*inst->jacobian_ptr_react[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_react function as defined in the OSDI spec |
|||
void load_jacobian_react(void *inst_, double alpha) |
|||
{ |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
LOAD_MATRIX_REACT(A_A) |
|||
LOAD_MATRIX_REACT(A_CI) |
|||
LOAD_MATRIX_REACT(CI_A) |
|||
LOAD_MATRIX_REACT(CI_CI) |
|||
|
|||
LOAD_MATRIX_REACT(A_TNODE) |
|||
LOAD_MATRIX_REACT(CI_TNODE) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_TRAN(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_tran function as defined in the OSDI spec |
|||
void load_jacobian_tran(void *inst_, double alpha) |
|||
{ |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
|
|||
// set dc stamps |
|||
load_jacobian_resist(inst_); |
|||
|
|||
// add reactive contributions |
|||
LOAD_MATRIX_TRAN(A_A) |
|||
LOAD_MATRIX_TRAN(A_CI) |
|||
LOAD_MATRIX_TRAN(CI_A) |
|||
LOAD_MATRIX_TRAN(CI_CI) |
|||
|
|||
LOAD_MATRIX_TRAN(A_TNODE) |
|||
LOAD_MATRIX_TRAN(CI_TNODE) |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_dc function as defined in the OSDI spec |
|||
void load_spice_rhs_dc(void *inst_, double *dst, double *prev_solve) |
|||
{ |
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
double va = prev_solve[inst->node_off[A]]; |
|||
double vci = prev_solve[inst->node_off[CI]]; |
|||
double vc = prev_solve[inst->node_off[C]]; |
|||
double vdtj = prev_solve[inst->node_off[TNODE]]; |
|||
|
|||
dst[inst->node_off[A]] += inst->jacobian_resist[A_A] * va + |
|||
inst->jacobian_resist[A_TNODE] * vdtj + |
|||
inst->jacobian_resist[A_CI] * vci - |
|||
inst->rhs_resist[A]; |
|||
|
|||
dst[inst->node_off[CI]] += inst->jacobian_resist[CI_A] * va + |
|||
inst->jacobian_resist[CI_TNODE] * vdtj + |
|||
inst->jacobian_resist[CI_CI] * vci - |
|||
inst->rhs_resist[CI]; |
|||
|
|||
dst[inst->node_off[C]] += inst->jacobian_resist[C_C] * vc + |
|||
inst->jacobian_resist[C_CI] * vci + |
|||
inst->jacobian_resist[C_TNODE] * vdtj - |
|||
inst->rhs_resist[C]; |
|||
|
|||
dst[inst->node_off[TNODE]] += inst->jacobian_resist[TNODE_A] * va + |
|||
inst->jacobian_resist[TNODE_C] * vc + |
|||
inst->jacobian_resist[TNODE_CI] * vci + |
|||
inst->jacobian_resist[TNODE_TNODE] * vdtj - |
|||
inst->rhs_resist[TNODE]; |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_tran function as defined in the OSDI |
|||
// spec |
|||
void load_spice_rhs_tran(void *inst_, double *dst, double *prev_solve, |
|||
double alpha) |
|||
{ |
|||
|
|||
DiodeInstace *inst = (DiodeInstace *)inst_; |
|||
double va = prev_solve[inst->node_off[A]]; |
|||
double vci = prev_solve[inst->node_off[CI]]; |
|||
double vdtj = prev_solve[inst->node_off[TNODE]]; |
|||
|
|||
// set DC rhs |
|||
load_spice_rhs_dc(inst_, dst, prev_solve); |
|||
|
|||
// add contributions due to reactive elements |
|||
dst[inst->node_off[A]] += |
|||
alpha * (inst->jacobian_react[A_A] * va + |
|||
inst->jacobian_react[A_CI] * vci + |
|||
inst->jacobian_react[A_TNODE] * vdtj); |
|||
|
|||
dst[inst->node_off[CI]] += alpha * (inst->jacobian_react[CI_CI] * vci + |
|||
inst->jacobian_react[CI_A] * va + |
|||
inst->jacobian_react[CI_TNODE] * vdtj); |
|||
} |
|||
|
|||
// structure that provides information of all nodes of the model |
|||
OsdiNode nodes[NUM_NODES] = { |
|||
{.name = "A", .units = "V", .is_reactive = true}, |
|||
{.name = "C", .units = "V"}, |
|||
{.name = "dT", .units = "K"}, |
|||
{.name = "CI", .units = "V", .is_reactive = true}, |
|||
}; |
|||
|
|||
// boolean array that tells which Jacobian entries are constant. Nothing is |
|||
// constant with selfheating, though. |
|||
bool const_jacobian_entries[NUM_MATRIX] = {}; |
|||
// these node pairs specify which entries in the Jacobian must be accounted for |
|||
OsdiNodePair jacobian_entries[NUM_MATRIX] = { |
|||
{CI, CI}, |
|||
{CI, C}, |
|||
{C, CI}, |
|||
{C, C}, |
|||
{A, A}, |
|||
{A, CI}, |
|||
{CI, A}, |
|||
{A, TNODE}, |
|||
{C, TNODE}, |
|||
{CI, TNODE}, |
|||
{TNODE, TNODE}, |
|||
{TNODE, A}, |
|||
{TNODE, C}, |
|||
{TNODE, CI}, |
|||
}; |
|||
OsdiNodePair collapsible[NUM_COLLAPSIBLE] = { |
|||
{CI, C}, |
|||
{TNODE, NUM_NODES}, |
|||
}; |
|||
|
|||
#define NUM_PARAMS 12 |
|||
// the model parameters as defined in Verilog-A, bounds and default values are |
|||
// stored elsewhere as they may depend on model parameters etc. |
|||
OsdiParamOpvar params[NUM_PARAMS] = { |
|||
{ |
|||
.name = (char *[]){"$mfactor"}, |
|||
.num_alias = 0, |
|||
.description = "Verilog-A multiplication factor for parallel devices", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_INST, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Rs"}, |
|||
.num_alias = 0, |
|||
.description = "Ohmic res", |
|||
.units = "Ohm", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Is"}, |
|||
.num_alias = 0, |
|||
.description = "Saturation current", |
|||
.units = "A", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"zetars"}, |
|||
.num_alias = 0, |
|||
.description = "Temperature coefficient of ohmic res", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"N"}, |
|||
.num_alias = 0, |
|||
.description = "Emission coefficient", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Cj0"}, |
|||
.num_alias = 0, |
|||
.description = "Junction capacitance", |
|||
.units = "F", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Vj"}, |
|||
.num_alias = 0, |
|||
.description = "Junction potential", |
|||
.units = "V", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"M"}, |
|||
.num_alias = 0, |
|||
.description = "Grading coefficient", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Rth"}, |
|||
.num_alias = 0, |
|||
.description = "Thermal resistance", |
|||
.units = "K/W", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"zetarth"}, |
|||
.num_alias = 0, |
|||
.description = "Temperature coefficient of thermal res", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"zetais"}, |
|||
.num_alias = 0, |
|||
.description = "Temperature coefficient of Is", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
{ |
|||
.name = (char *[]){"Tnom"}, |
|||
.num_alias = 0, |
|||
.description = "Reference temperature", |
|||
.units = "", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
}; |
|||
|
|||
// fill exported data |
|||
uint32_t OSDI_VERSION_MAJOR = OSDI_VERSION_MAJOR_CURR; |
|||
uint32_t OSDI_VERSION_MINOR = OSDI_VERSION_MINOR_CURR; |
|||
uint32_t OSDI_NUM_DESCRIPTORS = 1; |
|||
// this is the main structure used by simulators, it gives access to all |
|||
// information in a model |
|||
OsdiDescriptor OSDI_DESCRIPTORS[1] = {{ |
|||
// metadata |
|||
.name = "diode_va", |
|||
|
|||
// nodes |
|||
.num_nodes = NUM_NODES, |
|||
.num_terminals = 3, |
|||
.nodes = (OsdiNode *)&nodes, |
|||
|
|||
// matrix entries |
|||
.num_jacobian_entries = NUM_MATRIX, |
|||
.jacobian_entries = (OsdiNodePair *)&jacobian_entries, |
|||
.const_jacobian_entries = (bool *)&const_jacobian_entries, |
|||
|
|||
// memory |
|||
.instance_size = sizeof(DiodeInstace), |
|||
.model_size = sizeof(DiodeModel), |
|||
.residual_resist_offset = offsetof(DiodeInstace, rhs_resist), |
|||
.residual_react_offset = offsetof(DiodeInstace, rhs_react), |
|||
.node_mapping_offset = offsetof(DiodeInstace, node_off), |
|||
.jacobian_resist_offset = offsetof(DiodeInstace, jacobian_resist), |
|||
.jacobian_react_offset = offsetof(DiodeInstace, jacobian_react), |
|||
.jacobian_ptr_resist_offset = offsetof(DiodeInstace, jacobian_ptr_resist), |
|||
.jacobian_ptr_react_offset = offsetof(DiodeInstace, jacobian_ptr_react), |
|||
|
|||
// node collapsing |
|||
.num_collapsible = NUM_COLLAPSIBLE, |
|||
.collapsible = collapsible, |
|||
.is_collapsible_offset = offsetof(DiodeInstace, is_collapsible), |
|||
|
|||
// noise |
|||
.noise_sources = NULL, |
|||
.num_noise_src = 0, |
|||
|
|||
// parameters and op vars |
|||
.num_params = NUM_PARAMS, |
|||
.num_instance_params = 1, |
|||
.num_opvars = 0, |
|||
.param_opvar = (OsdiParamOpvar *)¶ms, |
|||
|
|||
// setup |
|||
.access = &osdi_access, |
|||
.setup_model = &setup_model, |
|||
.setup_instance = &setup_instance, |
|||
.eval = &eval, |
|||
.load_noise = &load_noise, |
|||
.load_residual_resist = &load_residual_resist, |
|||
.load_residual_react = &load_residual_react, |
|||
.load_spice_rhs_dc = &load_spice_rhs_dc, |
|||
.load_spice_rhs_tran = &load_spice_rhs_tran, |
|||
.load_jacobian_resist = &load_jacobian_resist, |
|||
.load_jacobian_react = &load_jacobian_react, |
|||
.load_jacobian_tran = &load_jacobian_tran, |
|||
}}; |
|||
@ -1,46 +0,0 @@ |
|||
OSDI Diode Test |
|||
.options abstol=1e-15 |
|||
|
|||
|
|||
* one voltage source for sweeping, one for sensing: |
|||
VD Dx 0 DC 0 AC 1 SIN (0.5 0.2 1M) |
|||
Vsense Dx D DC 0 |
|||
* Rt T 0 1e10 *not supported Pascal? |
|||
|
|||
* model definitions: |
|||
.model dmod_built_in d( bv=5.0000000000e+01 is=1e-13 n=1.05 thermal=1 tnom=27 rth0=1 rs=0 cj0=1e-15 vj=0.5 m=0.6 ) |
|||
.model dmod_osdi diode_va rs=0 is=1e-13 n=1.05 Rth=0 cj0=1e-15 vj=0.5 m=0.6 |
|||
|
|||
*OSDI Diode: |
|||
*OSDI_ACTIVATE*A1 D 0 dmod_osdi |
|||
|
|||
*Built-in Diode: |
|||
*BUILT_IN_ACTIVATE*D1 D 0 T dmod_built_in |
|||
|
|||
|
|||
.control |
|||
pre_osdi diode.osdi |
|||
|
|||
set filetype=ascii |
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
|
|||
* a DC sweep from 0.3V to 1V |
|||
dc Vd 0.3 0.6 0.01 |
|||
wrdata dc_sim.ngspice v(d) i(vsense) |
|||
|
|||
* an AC sweep at Vd=0.5V |
|||
alter VD=0.5 |
|||
ac dec 10 .01 10 |
|||
wrdata ac_sim.ngspice v(d) i(vsense) |
|||
|
|||
* a transient analysis |
|||
tran 100ms 500000ms |
|||
wrdata tr_sim.ngspice v(d) i(vsense) |
|||
|
|||
* print number of iterations |
|||
rusage totiter |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,148 +0,0 @@ |
|||
""" test OSDI simulation of diode |
|||
""" |
|||
import os, shutil |
|||
import numpy as np |
|||
import pandas as pd |
|||
import sys |
|||
sys.path.append( |
|||
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) |
|||
|
|||
from testing import prepare_test |
|||
|
|||
# This test runs a DC, AC and Transient Simulation of a simple diode. |
|||
# The diode is available in the "OSDI" Git project and needs to be compiled to a shared object |
|||
# and then bet put into /usr/local/share/ngspice/osdi: |
|||
# |
|||
# > make osdi_diode |
|||
# > cp diode_osdi.osdi /usr/local/share/ngspice/osdi/diode_osdi.osdi |
|||
# |
|||
# The integration test proves the functioning of the OSDI interface. The Ngspice diode is quite |
|||
# complicated and the results are therefore not exactly the same. |
|||
# Future tests will target Verilog-A models like HICUM/L2 that should yield exactly the same results as the Ngspice implementation. |
|||
|
|||
directory = os.path.dirname(__file__) |
|||
|
|||
|
|||
def test_ngspice(): |
|||
dir_osdi, dir_built_in = prepare_test(directory) |
|||
|
|||
# read DC simulation results |
|||
dc_data_osdi = pd.read_csv(os.path.join(dir_osdi, "dc_sim.ngspice"), sep="\\s+") |
|||
dc_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "dc_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
|
|||
# read AC simulation results |
|||
ac_data_osdi = pd.read_csv(os.path.join(dir_osdi, "ac_sim.ngspice"), sep="\\s+") |
|||
ac_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "ac_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# read TR simulation results |
|||
tr_data_osdi = pd.read_csv(os.path.join(dir_osdi, "tr_sim.ngspice"), sep="\\s+") |
|||
tr_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "tr_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# test simulation results |
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
# np.testing.assert_allclose(id_osdi[0:20], id_built_in[0:20], rtol=0.01) #ngspice diode doesnt work with node collapsing :D |
|||
|
|||
return ( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) = test_ngspice() |
|||
|
|||
import matplotlib.pyplot as plt |
|||
|
|||
# DC Plot |
|||
pd_built_in = dc_data_built_in["v(d)"] * dc_data_built_in["i(vsense)"] |
|||
pd_osdi = dc_data_osdi["v(d)"] * dc_data_osdi["i(vsense)"] |
|||
fig, ax1 = plt.subplots() |
|||
ax1.semilogy( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
ax1.semilogy( |
|||
dc_data_osdi["v(d)"], |
|||
dc_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
ax1.set_ylabel(r"$I_{\mathrm{D}} (\mathrm{mA})$") |
|||
ax1.set_xlabel(r"$V_{\mathrm{D}}(\mathrm{V})$") |
|||
plt.legend() |
|||
|
|||
# AC Plot |
|||
omega = 2 * np.pi * ac_data_osdi["frequency"] |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], ac_data_osdi["i(vsense)"] * 1e3, label="OSDI" |
|||
) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Re \\left\{ Y_{11} \\right\} (\\mathrm{mS})$") |
|||
plt.legend() |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense).1"] * 1e3 / omega, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], |
|||
ac_data_osdi["i(vsense).1"] * 1e3 / omega, |
|||
label="OSDI", |
|||
) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Im\\left\{Y_{11}\\right\}/(\\omega) (\\mathrm{mF})$") |
|||
plt.legend() |
|||
|
|||
# TR plot |
|||
fig = plt.figure() |
|||
plt.plot( |
|||
tr_data_built_in["time"] * 1e9, |
|||
tr_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.plot( |
|||
tr_data_osdi["time"] * 1e9, |
|||
tr_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
plt.xlabel(r"$t(\mathrm{nS})$") |
|||
plt.ylabel(r"$I_{\mathrm{D}}(\mathrm{mA})$") |
|||
plt.legend() |
|||
|
|||
plt.show() |
|||
@ -1,44 +0,0 @@ |
|||
OSDI Resistor Test |
|||
.options abstol=1e-15 |
|||
|
|||
|
|||
* one voltage source for sweeping, one for sensing: |
|||
VD Dx 0 DC 0 AC 1 SIN (0.5 0.2 1M) |
|||
Vsense Dx D DC 0 |
|||
|
|||
* model definitions: |
|||
.model rmod_osdi resistor_va r=10 |
|||
|
|||
*OSDI Resistor: |
|||
*OSDI_ACTIVATE*A1 D 0 rmod_osdi |
|||
|
|||
*Built-in Resistor: |
|||
*BUILT_IN_ACTIVATE*R1 D 0 10 |
|||
|
|||
|
|||
.control |
|||
pre_osdi resistor.osdi |
|||
|
|||
set filetype=ascii |
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
|
|||
* a DC sweep from 0.3V to 1V |
|||
dc Vd 0.3 1.0 0.01 |
|||
wrdata dc_sim.ngspice v(d) i(vsense) |
|||
|
|||
* an AC sweep at Vd=0.5V |
|||
alter VD=0.5 |
|||
ac dec 10 .01 10 |
|||
wrdata ac_sim.ngspice v(d) i(vsense) |
|||
|
|||
* a transient analysis |
|||
tran 100ms 500000ms |
|||
wrdata tr_sim.ngspice v(d) i(vsense) |
|||
|
|||
* print number of iterations |
|||
rusage totiter |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,364 +0,0 @@ |
|||
/* |
|||
* This file is part of the OSDI component of NGSPICE. |
|||
* Copyright© 2022 SemiMod GmbH. |
|||
* |
|||
* This Source Code Form is subject to the terms of the Mozilla Public |
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. |
|||
* |
|||
* Author: Pascal Kuthe <pascal.kuthe@semimod.de> |
|||
* |
|||
* This is an exemplary implementation of the OSDI interface for the Verilog-A |
|||
* model specified in diode.va. In the future, the OpenVAF compiler shall |
|||
* generate an comparable object file. Primary purpose of this is example to |
|||
* have a concrete example for the OSDI interface, OpenVAF will generate a more |
|||
* optimized implementation. |
|||
* |
|||
*/ |
|||
|
|||
#include "osdi.h" |
|||
#include "string.h" |
|||
#include <math.h> |
|||
#include <stdbool.h> |
|||
#include <stddef.h> |
|||
#include <stdint.h> |
|||
#include <stdio.h> |
|||
|
|||
// public interface |
|||
extern uint32_t OSDI_VERSION_MAJOR; |
|||
extern uint32_t OSDI_VERSION_MINOR; |
|||
extern uint32_t OSDI_NUM_DESCRIPTORS; |
|||
extern OsdiDescriptor OSDI_DESCRIPTORS[1]; |
|||
|
|||
// number of nodes and definitions of node ids for nicer syntax in this file |
|||
// note: order should be same as "nodes" list defined later |
|||
#define NUM_NODES 2 |
|||
#define P 0 |
|||
#define M 1 |
|||
|
|||
// number of matrix entries and definitions for Jacobian entries for nicer |
|||
// syntax in this file |
|||
#define NUM_MATRIX 4 |
|||
#define P_P 0 |
|||
#define P_M 1 |
|||
#define M_P 2 |
|||
#define M_M 3 |
|||
|
|||
// The model structure for the diode |
|||
typedef struct ResistorModel |
|||
{ |
|||
double R; |
|||
bool R_given; |
|||
} ResistorModel; |
|||
|
|||
// The instace structure for the diode |
|||
typedef struct ResistorInstance |
|||
{ |
|||
double temperature; |
|||
double rhs_resist[NUM_NODES]; |
|||
double rhs_react[NUM_NODES]; |
|||
double jacobian_resist[NUM_MATRIX]; |
|||
double jacobian_react[NUM_MATRIX]; |
|||
double *jacobian_ptr_resist[NUM_MATRIX]; |
|||
double *jacobian_ptr_react[NUM_MATRIX]; |
|||
uint32_t node_off[NUM_NODES]; |
|||
} ResistorInstance; |
|||
|
|||
// implementation of the access function as defined by the OSDI spec |
|||
void *osdi_access(void *inst_, void *model_, uint32_t id, uint32_t flags) |
|||
{ |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
bool *given; |
|||
void *value; |
|||
|
|||
switch (id) // id of params defined in param_opvar array |
|||
{ |
|||
case 0: |
|||
value = (void *)&model->R; |
|||
given = &model->R_given; |
|||
break; |
|||
default: |
|||
return NULL; |
|||
} |
|||
|
|||
if (flags & ACCESS_FLAG_SET) |
|||
{ |
|||
*given = true; |
|||
} |
|||
|
|||
return value; |
|||
} |
|||
|
|||
// implementation of the setup_model function as defined in the OSDI spec |
|||
OsdiInitInfo setup_model(void *_handle, void *model_) |
|||
{ |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
|
|||
// set parameters and check bounds |
|||
if (!model->R_given) |
|||
{ |
|||
model->R = 1; |
|||
} |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the setup_instace function as defined in the OSDI spec |
|||
OsdiInitInfo setup_instance(void *_handle, void *inst_, void *model_, |
|||
double temperature, uint32_t _num_terminals) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
|
|||
inst->temperature = temperature; |
|||
return (OsdiInitInfo){.flags = 0, .num_errors = 0, .errors = NULL}; |
|||
} |
|||
|
|||
// implementation of the eval function as defined in the OSDI spec |
|||
uint32_t eval(void *handle, void *inst_, void *model_, uint32_t flags, |
|||
double *prev_solve, OsdiSimParas *sim_params) |
|||
{ |
|||
ResistorModel *model = (ResistorModel *)model_; |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
// get voltages |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
double vpm = vp - vm; |
|||
|
|||
double ir = vpm / model->R; |
|||
double g = 1 / model->R; |
|||
|
|||
//////////////// |
|||
// write rhs |
|||
//////////////// |
|||
|
|||
if (flags & CALC_RESIST_RESIDUAL) |
|||
{ |
|||
// write resist rhs |
|||
inst->rhs_resist[P] = ir; |
|||
inst->rhs_resist[M] = -ir; |
|||
} |
|||
|
|||
////////////////// |
|||
// write Jacobian |
|||
////////////////// |
|||
|
|||
if (flags & CALC_RESIST_JACOBIAN) |
|||
{ |
|||
// stamp resistor |
|||
inst->jacobian_resist[P_P] = g; |
|||
inst->jacobian_resist[P_M] = -g; |
|||
inst->jacobian_resist[M_P] = -g; |
|||
inst->jacobian_resist[M_M] = g; |
|||
} |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
// TODO implementation of the load_noise function as defined in the OSDI spec |
|||
void load_noise(void *inst, void *model, double freq, double *noise_dens, |
|||
double *ln_noise_dens) |
|||
{ |
|||
// TODO add noise to example |
|||
} |
|||
|
|||
#define LOAD_RHS_RESIST(name) \ |
|||
dst[inst->node_off[name]] += inst->rhs_resist[name]; |
|||
|
|||
// implementation of the load_rhs_resist function as defined in the OSDI spec |
|||
void load_residual_resist(void *inst_, double *dst) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
LOAD_RHS_RESIST(P) |
|||
LOAD_RHS_RESIST(M) |
|||
} |
|||
|
|||
#define LOAD_RHS_REACT(name) dst[inst->node_off[name]] += inst->rhs_react[name]; |
|||
|
|||
// implementation of the load_rhs_react function as defined in the OSDI spec |
|||
void load_residual_react(void *inst_, double *dst) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
LOAD_RHS_REACT(P) |
|||
LOAD_RHS_REACT(M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_RESIST(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_resist[name]; |
|||
|
|||
// implementation of the load_matrix_resist function as defined in the OSDI spec |
|||
void load_jacobian_resist(void *inst_) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
LOAD_MATRIX_RESIST(P_P) |
|||
LOAD_MATRIX_RESIST(P_M) |
|||
LOAD_MATRIX_RESIST(M_P) |
|||
LOAD_MATRIX_RESIST(M_M) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_REACT(name) \ |
|||
*inst->jacobian_ptr_react[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_react function as defined in the OSDI spec |
|||
void load_jacobian_react(void *inst_, double alpha) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
LOAD_MATRIX_REACT(P_P) |
|||
LOAD_MATRIX_REACT(M_M) |
|||
LOAD_MATRIX_REACT(P_M) |
|||
LOAD_MATRIX_REACT(M_P) |
|||
} |
|||
|
|||
#define LOAD_MATRIX_TRAN(name) \ |
|||
*inst->jacobian_ptr_resist[name] += inst->jacobian_react[name] * alpha; |
|||
|
|||
// implementation of the load_matrix_tran function as defined in the OSDI spec |
|||
void load_jacobian_tran(void *inst_, double alpha) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
|
|||
// set dc stamps |
|||
load_jacobian_resist(inst_); |
|||
|
|||
// add reactive contributions |
|||
LOAD_MATRIX_TRAN(P_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
LOAD_MATRIX_TRAN(M_P) |
|||
LOAD_MATRIX_TRAN(M_M) |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_dc function as defined in the OSDI spec |
|||
void load_spice_rhs_dc(void *inst_, double *dst, double *prev_solve) |
|||
{ |
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
dst[inst->node_off[P]] += inst->jacobian_resist[P_M] * vm + |
|||
inst->jacobian_resist[P_P] * vp - |
|||
inst->rhs_resist[P]; |
|||
|
|||
dst[inst->node_off[M]] += inst->jacobian_resist[M_P] * vp + |
|||
inst->jacobian_resist[M_M] * vm - |
|||
inst->rhs_resist[M]; |
|||
} |
|||
|
|||
// implementation of the load_spice_rhs_tran function as defined in the OSDI |
|||
// spec |
|||
void load_spice_rhs_tran(void *inst_, double *dst, double *prev_solve, |
|||
double alpha) |
|||
{ |
|||
|
|||
ResistorInstance *inst = (ResistorInstance *)inst_; |
|||
double vp = prev_solve[inst->node_off[P]]; |
|||
double vm = prev_solve[inst->node_off[M]]; |
|||
|
|||
// set DC rhs |
|||
load_spice_rhs_dc(inst_, dst, prev_solve); |
|||
|
|||
// add contributions due to reactive elements |
|||
dst[inst->node_off[P]] += |
|||
alpha * (inst->jacobian_react[P_P] * vp + |
|||
inst->jacobian_react[P_M] * vm); |
|||
|
|||
dst[inst->node_off[M]] += alpha * (inst->jacobian_react[M_M] * vm + |
|||
inst->jacobian_react[M_P] * vp); |
|||
} |
|||
|
|||
// structure that provides information of all nodes of the model |
|||
OsdiNode nodes[NUM_NODES] = { |
|||
{.name = "P", .units = "V", .is_reactive = false}, |
|||
{.name = "M", .units = "V", .is_reactive = false}, |
|||
}; |
|||
|
|||
// boolean array that tells which Jacobian entries are constant. Nothing is |
|||
// constant with selfheating, though. |
|||
bool const_jacobian_entries[NUM_MATRIX] = {}; |
|||
// these node pairs specify which entries in the Jacobian must be accounted for |
|||
OsdiNodePair jacobian_entries[NUM_MATRIX] = { |
|||
{P, P}, |
|||
{P, M}, |
|||
{M, P}, |
|||
{M, M}, |
|||
}; |
|||
|
|||
#define NUM_PARAMS 1 |
|||
// the model parameters as defined in Verilog-A, bounds and default values are |
|||
// stored elsewhere as they may depend on model parameters etc. |
|||
OsdiParamOpvar params[NUM_PARAMS] = { |
|||
{ |
|||
.name = (char *[]){"R"}, |
|||
.num_alias = 0, |
|||
.description = "Resistance", |
|||
.units = "Ohm", |
|||
.flags = PARA_TY_REAL | PARA_KIND_MODEL, |
|||
.len = 0, |
|||
}, |
|||
}; |
|||
|
|||
// fill exported data |
|||
uint32_t OSDI_VERSION_MAJOR = OSDI_VERSION_MAJOR_CURR; |
|||
uint32_t OSDI_VERSION_MINOR = OSDI_VERSION_MINOR_CURR; |
|||
uint32_t OSDI_NUM_DESCRIPTORS = 1; |
|||
// this is the main structure used by simulators, it gives access to all |
|||
// information in a model |
|||
OsdiDescriptor OSDI_DESCRIPTORS[1] = {{ |
|||
// metadata |
|||
.name = "resistor_va", |
|||
|
|||
// nodes |
|||
.num_nodes = NUM_NODES, |
|||
.num_terminals = 2, |
|||
.nodes = (OsdiNode *)&nodes, |
|||
|
|||
// matrix entries |
|||
.num_jacobian_entries = NUM_MATRIX, |
|||
.jacobian_entries = (OsdiNodePair *)&jacobian_entries, |
|||
.const_jacobian_entries = (bool *)&const_jacobian_entries, |
|||
|
|||
// memory |
|||
.instance_size = sizeof(ResistorInstance), |
|||
.model_size = sizeof(ResistorModel), |
|||
.residual_resist_offset = offsetof(ResistorInstance, rhs_resist), |
|||
.residual_react_offset = offsetof(ResistorInstance, rhs_react), |
|||
.node_mapping_offset = offsetof(ResistorInstance, node_off), |
|||
.jacobian_resist_offset = offsetof(ResistorInstance, jacobian_resist), |
|||
.jacobian_react_offset = offsetof(ResistorInstance, jacobian_react), |
|||
.jacobian_ptr_resist_offset = offsetof(ResistorInstance, jacobian_ptr_resist), |
|||
.jacobian_ptr_react_offset = offsetof(ResistorInstance, jacobian_ptr_react), |
|||
|
|||
// TODO add node collapsing to example |
|||
// node collapsing |
|||
.num_collapsible = 0, |
|||
.collapsible = NULL, |
|||
.is_collapsible_offset = 0, |
|||
|
|||
// noise |
|||
.noise_sources = NULL, |
|||
.num_noise_src = 0, |
|||
|
|||
// parameters and op vars |
|||
.num_params = NUM_PARAMS, |
|||
.num_instance_params = 0, |
|||
.num_opvars = 0, |
|||
.param_opvar = (OsdiParamOpvar *)¶ms, |
|||
|
|||
// setup |
|||
.access = &osdi_access, |
|||
.setup_model = &setup_model, |
|||
.setup_instance = &setup_instance, |
|||
.eval = &eval, |
|||
.load_noise = &load_noise, |
|||
.load_residual_resist = &load_residual_resist, |
|||
.load_residual_react = &load_residual_react, |
|||
.load_spice_rhs_dc = &load_spice_rhs_dc, |
|||
.load_spice_rhs_tran = &load_spice_rhs_tran, |
|||
.load_jacobian_resist = &load_jacobian_resist, |
|||
.load_jacobian_react = &load_jacobian_react, |
|||
.load_jacobian_tran = &load_jacobian_tran, |
|||
}}; |
|||
@ -1,180 +0,0 @@ |
|||
""" test OSDI simulation of resistor |
|||
""" |
|||
import os, shutil |
|||
import numpy as np |
|||
import subprocess |
|||
import pandas as pd |
|||
|
|||
import sys |
|||
sys.path.append( |
|||
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) |
|||
|
|||
from testing import prepare_test |
|||
|
|||
|
|||
# This test runs a DC, AC and Transient Simulation of a simple resistor. |
|||
# The capacitor is available as a C file and needs to be compiled to a shared object |
|||
# and then bet put into /usr/local/share/ngspice/osdi: |
|||
# |
|||
# > make osdi_resistor |
|||
# > cp resistor_osdi.so /usr/local/share/ngspice/osdi/resistor_osdi.so |
|||
# |
|||
# The integration test proves the functioning of the OSDI interface. |
|||
# Future tests will target Verilog-A models like HICUM/L2 that should yield exactly the same results as the Ngspice implementation. |
|||
|
|||
directory = os.path.dirname(__file__) |
|||
|
|||
|
|||
def test_ngspice(): |
|||
dir_osdi, dir_built_in = prepare_test(directory) |
|||
|
|||
# read DC simulation results |
|||
dc_data_osdi = pd.read_csv(os.path.join(dir_osdi, "dc_sim.ngspice"), sep="\\s+") |
|||
dc_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "dc_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
|
|||
# read AC simulation results |
|||
ac_data_osdi = pd.read_csv(os.path.join(dir_osdi, "ac_sim.ngspice"), sep="\\s+") |
|||
ac_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "ac_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# read TR simulation results |
|||
tr_data_osdi = pd.read_csv(os.path.join(dir_osdi, "tr_sim.ngspice"), sep="\\s+") |
|||
tr_data_built_in = pd.read_csv( |
|||
os.path.join(dir_built_in, "tr_sim.ngspice"), sep="\\s+" |
|||
) |
|||
|
|||
# test simulation results |
|||
id_osdi = dc_data_osdi["i(vsense)"].to_numpy() |
|||
id_built_in = dc_data_built_in["i(vsense)"].to_numpy() |
|||
np.testing.assert_allclose(id_osdi[0:20], id_built_in[0:20], rtol=0.01) |
|||
|
|||
return ( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
( |
|||
dc_data_osdi, |
|||
dc_data_built_in, |
|||
ac_data_osdi, |
|||
ac_data_built_in, |
|||
tr_data_osdi, |
|||
tr_data_built_in, |
|||
) = test_ngspice() |
|||
|
|||
import matplotlib.pyplot as plt |
|||
|
|||
# DC Plot |
|||
pd_built_in = dc_data_built_in["v(d)"] * dc_data_built_in["i(vsense)"] |
|||
pd_osdi = dc_data_osdi["v(d)"] * dc_data_osdi["i(vsense)"] |
|||
fig, ax1 = plt.subplots() |
|||
ax1.plot( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
ax1.plot( |
|||
dc_data_built_in["v(d)"], |
|||
dc_data_built_in["v(d)"] / 10 * 1e3, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
ax1.plot( |
|||
dc_data_osdi["v(d)"], |
|||
dc_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
ax1.set_ylabel(r"$I_{\mathrm{P}} (\mathrm{mA})$") |
|||
ax1.set_xlabel(r"$V_{\mathrm{PM}}(\mathrm{V})$") |
|||
plt.legend() |
|||
|
|||
# AC Plot |
|||
omega = 2 * np.pi * ac_data_osdi["frequency"] |
|||
z_analytical = 1 / 10 |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
np.ones_like(ac_data_built_in["frequency"]) * z_analytical * 1e3, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], ac_data_osdi["i(vsense)"] * 1e3, label="OSDI" |
|||
) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Re \\left\{ Y_{11} \\right\} (\\mathrm{mS})$") |
|||
plt.legend() |
|||
fig = plt.figure() |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
ac_data_built_in["i(vsense).1"] * 1e12 / omega, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_built_in["frequency"], |
|||
np.zeros_like(ac_data_built_in["i(vsense).1"]) * 1e12 / omega, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
plt.semilogx( |
|||
ac_data_osdi["frequency"], |
|||
ac_data_osdi["i(vsense).1"] * 1e12 / omega, |
|||
label="OSDI", |
|||
) |
|||
plt.ylim(-1, 1) |
|||
plt.xlabel("$f(\\mathrm{H})$") |
|||
plt.ylabel("$\\Im\\left\{Y_{11}\\right\}/(\\omega) (\\mathrm{pF})$") |
|||
plt.legend() |
|||
|
|||
# TR plot |
|||
fig = plt.figure() |
|||
plt.plot( |
|||
tr_data_built_in["time"] * 1e9, |
|||
tr_data_built_in["i(vsense)"] * 1e3, |
|||
label="built-in", |
|||
linestyle=" ", |
|||
marker="x", |
|||
) |
|||
plt.plot( |
|||
tr_data_built_in["time"] * 1e9, |
|||
tr_data_built_in["v(d)"] / 10 * 1e3, |
|||
label="analytical", |
|||
linestyle="--", |
|||
marker="s", |
|||
) |
|||
plt.plot( |
|||
tr_data_osdi["time"] * 1e9, |
|||
tr_data_osdi["i(vsense)"] * 1e3, |
|||
label="OSDI", |
|||
) |
|||
plt.xlabel(r"$t(\mathrm{nS})$") |
|||
plt.ylabel(r"$I_{\mathrm{D}}(\mathrm{mA})$") |
|||
plt.legend() |
|||
|
|||
plt.show() |
|||
@ -1,641 +0,0 @@ |
|||
* model parameters fron BSIMBULK 106.2 |
|||
.model BSIMBULK_osdi_N bsimbulk |
|||
+level=77 |
|||
+TYPE = 1 |
|||
+GEOMOD = 0 |
|||
+RGEOMOD = 0 |
|||
+COVMOD = 1 |
|||
+RDSMOD = 0 |
|||
+GIDLMOD = 1 |
|||
+IGCMOD = 0 |
|||
+IGBMOD = 0 |
|||
+LLONG = 2e-6 |
|||
+WWIDE = 1e-5 |
|||
+XL = -1.7e-8 |
|||
+XW = 1.1e-8 |
|||
+LINT = 0 |
|||
+WINT = 0 |
|||
+DLC = 0 |
|||
+DWC = 0 |
|||
+TOXE = 1.74e-9 |
|||
+TOXP = 1.7e-9 |
|||
+NDEP = 4.6e23 |
|||
+NSD = 1e26 |
|||
+NGATE = 8.5e25 |
|||
+VFB = -1.02 |
|||
+EPSROX = 3.9 |
|||
+EPSRSUB = 11.9 |
|||
+NI0SUB = 1.1e16 |
|||
+XJ = 1.5e-7 |
|||
+DMCG = 0 |
|||
+DMDG = 0 |
|||
+DMCGT = 0 |
|||
+CIT = 1e-8 |
|||
+CDSCD = 0.001 |
|||
+CDSCB = 0 |
|||
+CDSCBL = 0.007 |
|||
+CDSCBLEXP = 1 |
|||
+NFACTOR = 0.002 |
|||
+NFACTORL = 2.1e-8 |
|||
+NFACTORLEXP = 6.264 |
|||
+NDEPL1 = 0.096 |
|||
+NDEPLEXP1 = 1 |
|||
+NDEPL2 = -0.0032 |
|||
+NDEPLEXP2 = 2.05 |
|||
+DVTP0 = 7.5e-7 |
|||
+DVTP1 = -4.4e-7 |
|||
+NDEPW = -0.1548 |
|||
+NDEPWEXP = 0.7441 |
|||
+NDEPWL = 0 |
|||
+NDEPWLEXP = 0.2 |
|||
+K2W = 0 |
|||
+AGIDL = 3.728e-8 |
|||
+AGIDLL = -0.04815 |
|||
+AGIDLW = -0.0341 |
|||
+BGIDL = 8.123e9 |
|||
+CGIDL = 1.21e-6 |
|||
+EGIDL = -2.952 |
|||
+PHIN = 0.05 |
|||
+K2L = 0.001636 |
|||
+K2 = -0.014 |
|||
+ETA0 = 8.416e-6 |
|||
+ETAB = -5.561e-5 |
|||
+ETABEXP = 2.155 |
|||
+DSUB = 3 |
|||
+VSAT = 6.4e4 |
|||
+VSATW = 0.05 |
|||
+VSATWEXP = 1 |
|||
+DELTA = 0.15 |
|||
+DELTAL = 0.1 |
|||
+DELTALEXP = 1e-5 |
|||
+U0 = 0.04546 |
|||
+ETAMOB = 1.5 |
|||
+U0L = 0.025 |
|||
+U0LEXP = 0.95 |
|||
+UA = 0.4007 |
|||
+UAW = 0.05 |
|||
+UAWEXP = 1 |
|||
+UAL = 0.00475 |
|||
+UALEXP = 1.118 |
|||
+EUW = -0.02 |
|||
+EUWEXP = 1 |
|||
+EUL = 0.001 |
|||
+EULEXP = 1 |
|||
+EU = 1.9 |
|||
+UDL = 1e-15 |
|||
+UDLEXP = 1 |
|||
+UD = 1.042e-5 |
|||
+UCS = 2 |
|||
+UCW = 0 |
|||
+UCWEXP = 1 |
|||
+UC = 1e-07 |
|||
+UCL = 2.5e4 |
|||
+UCLEXP = 1 |
|||
+PCLM = 0.15 |
|||
+PCLML = 0.01 |
|||
+PCLMLEXP = 0.4 |
|||
+PCLMG = 0 |
|||
+PSCBE1 = 5 |
|||
+PSCBE2 = 1.29e-12 |
|||
+PDITS = 0 |
|||
+PDITSL = 0 |
|||
+PDITSD = 0 |
|||
+RSWMIN = 0 |
|||
+RSW = 100 |
|||
+RDWMIN = 0 |
|||
+RDW = 100 |
|||
+RDSW = 20 |
|||
+RDSWMIN = 0 |
|||
+PRWG = 1 |
|||
+PRWB = 0 |
|||
+WR = 1 |
|||
+RSH = 0 |
|||
+PDIBLCB = 0 |
|||
+PDIBLC = 0.01 |
|||
+PDIBLCL = 1e-5 |
|||
+PDIBLCLEXP = 1e-6 |
|||
+PVAG = 0 |
|||
+PTWG = 0.2 |
|||
+PTWGL = 3e4 |
|||
+PTWGLEXP = 5e-6 |
|||
+FPROUT = 0 |
|||
+CF = 0 |
|||
+CFRCOEFF = 1 |
|||
+CGSO = 2.5e-10 |
|||
+CGDO = 2.5e-10 |
|||
+CGSL = 1.2e-10 |
|||
+CGDL = 1.2e-10 |
|||
+CKAPPAS = 1.25 |
|||
+CKAPPAD = 1.25 |
|||
+CGBO = 0 |
|||
+ADOS = 0 |
|||
+BDOS = 1 |
|||
+QM0 = 0.001 |
|||
+ETAQM = 0.54 |
|||
+NDEPCV = 8e23 |
|||
+VFBCV = -0.95 |
|||
+VSATCV = 1e5 |
|||
+PCLMCV = 0 |
|||
+PSAT = 0.46 |
|||
+PSATL = 6 |
|||
+PSATLEXP = 0.06 |
|||
+TNFACTOR = 0 |
|||
+TETA0 = 0 |
|||
+UTE = -1.4 |
|||
+UTEL = -0.001 |
|||
+UA1 = -0.0011 |
|||
+UA1L = 0 |
|||
+UC1 = 0 |
|||
+UD1 = 0 |
|||
+UD1L = 0 |
|||
+UCSTE = -0.005 |
|||
+PRT = 0 |
|||
+AT = -0.05 |
|||
+ATL = -0.1 |
|||
+TDELTA = -0.0048 |
|||
+PTWGT = -0.002 |
|||
+PTWGTL = 0.01 |
|||
+KT1 = -0.115 |
|||
+KT1EXP = 1 |
|||
+KT1L = 1.286e-9 |
|||
+KT2 = -0.003157 |
|||
+K2LEXP = 1.698 |
|||
+K2WEXP = 0.005 |
|||
+TBGASUB = 0 |
|||
+AIGS = 0.0136 |
|||
+BIGS = 0.00171 |
|||
+CIGS = 0.075 |
|||
+AIGSL = 0 |
|||
+AIGD = 0.0136 |
|||
+BIGD = 0.00171 |
|||
+CIGD = 0.075 |
|||
+AIGDL = 0 |
|||
+AIGC = 0.01285 |
|||
+LAIGC = 2.132e-6 |
|||
+BIGC = 0.0013 |
|||
+CIGC = 0.013 |
|||
+AIGCL = -0.01227 |
|||
+PIGCD = 1 |
|||
+PIGCDL = 6.196 |
|||
+AIGBINV = 0.015 |
|||
+BIGBINV = 0.000949 |
|||
+CIGBINV = 0.006 |
|||
+EIGBINV = 1.1 |
|||
+NIGBINV = 3 |
|||
+AIGBACC = 0.01751 |
|||
+BIGBACC = 8.307 |
|||
+CIGBACC = -898.7 |
|||
+NIGBACC = 1 |
|||
+LPSAT = 0 |
|||
+WPSAT = 0 |
|||
+PPSAT = 0 |
|||
+PSATB = 0 |
|||
+PSATX = 3 |
|||
+WVSAT = 0 |
|||
+PVSAT = 0 |
|||
+WPTWG = 0 |
|||
+PPTWG = 0 |
|||
+TNOM = 25 |
|||
+WDVTP0 = 0 |
|||
+WDVTP1 = 0 |
|||
+LUTE = 0.04574 |
|||
+LUA1 = 8.365e-5 |
|||
+LAT = 0 |
|||
+DVTP2 = 0 |
|||
+DVTP3 = 0 |
|||
+DVTP4 = 0 |
|||
+DVTP5 = 0 |
|||
+VSATL = 1350 |
|||
+VSATLEXP = 0.00033 |
|||
+SCA = 0 |
|||
+SCB = 0 |
|||
+SCC = 0 |
|||
+SC = 0 |
|||
|
|||
.model BSIMBULK_osdi_P bsimbulk |
|||
+level=77 |
|||
+TYPE = -1 |
|||
+GEOMOD = 0 |
|||
+RGEOMOD = 0 |
|||
+RGATEMOD = 0 |
|||
+RBODYMOD = 0 |
|||
+IGCMOD = 0 |
|||
+IGBMOD = 0 |
|||
+COVMOD = 1 |
|||
+RDSMOD = 2 |
|||
+GIDLMOD = 0 |
|||
+TNOIMOD = 0 |
|||
+SHMOD = 0 |
|||
+TOXE = 2.34e-9 |
|||
+TOXP = 1.925e-9 |
|||
+DTOX = 0 |
|||
+EPSROX = 3.9 |
|||
+TNOM = 25 |
|||
+XL = 0 |
|||
+XW = 0 |
|||
+LINT = 0 |
|||
+LLONG = 1000000 |
|||
+LL = 0 |
|||
+LW = 0 |
|||
+LWL = 0 |
|||
+LLN = 1 |
|||
+LWN = 1 |
|||
+WINT = -9.0134104e-9 |
|||
+WL = 0 |
|||
+WW = 0 |
|||
+WWL = 0 |
|||
+WLN = 1 |
|||
+WWN = 1 |
|||
+WWIDE = 1000000 |
|||
+DLC = 0 |
|||
+LLC = 0 |
|||
+LWC = 0 |
|||
+LWLC = 0 |
|||
+DWC = 0 |
|||
+WLC = 0 |
|||
+WWC = 0 |
|||
+WWLC = 0 |
|||
+JSS = 0.0001 |
|||
+JSD = 0.0001 |
|||
+JSWS = 0 |
|||
+JSWD = 0 |
|||
+JSWGS = 0 |
|||
+JSWGD = 0 |
|||
+NJS = 1 |
|||
+NJD = 1 |
|||
+IJTHSFWD = 0.1 |
|||
+IJTHDFWD = 0.1 |
|||
+IJTHSREV = 0.1 |
|||
+IJTHDREV = 0.1 |
|||
+BVS = 10 |
|||
+BVD = 10 |
|||
+XJBVS = 1 |
|||
+XJBVD = 1 |
|||
+JTSS = 0 |
|||
+JTSD = 0 |
|||
+JTSSWS = 0 |
|||
+JTSSWD = 0 |
|||
+JTSSWGS = 0 |
|||
+JTSSWGD = 0 |
|||
+JTWEFF = 0 |
|||
+NJTS = 20 |
|||
+NJTSD = 20 |
|||
+NJTSSW = 20 |
|||
+NJTSSWD = 20 |
|||
+NJTSSWG = 20 |
|||
+NJTSSWGD = 20 |
|||
+VTSS = 10 |
|||
+VTSD = 10 |
|||
+VTSSWS = 10 |
|||
+VTSSWD = 10 |
|||
+VTSSWGS = 10 |
|||
+VTSSWGD = 10 |
|||
+CJS = 0.0005 |
|||
+CJD = 0.0005 |
|||
+CJSWS = 5e-10 |
|||
+CJSWD = 5e-10 |
|||
+CJSWGS = 0 |
|||
+CJSWGD = 0 |
|||
+PBS = 1 |
|||
+PBD = 1 |
|||
+PBSWS = 1 |
|||
+PBSWD = 1 |
|||
+PBSWGS = 1 |
|||
+PBSWGD = 1 |
|||
+MJS = 0.5 |
|||
+MJD = 0.5 |
|||
+MJSWS = 0.33 |
|||
+MJSWD = 0.33 |
|||
+MJSWGS = 0.33 |
|||
+MJSWGD = 0.33 |
|||
+TPB = 0 |
|||
+TCJ = 0 |
|||
+TPBSW = 0 |
|||
+TCJSW = 0 |
|||
+TPBSWG = 0 |
|||
+TCJSWG = 0 |
|||
+XTIS = 3 |
|||
+XTID = 3 |
|||
+XTSS = 0.02 |
|||
+XTSD = 0.02 |
|||
+XTSSWS = 0.02 |
|||
+XTSSWD = 0.02 |
|||
+XTSSWGS = 0.02 |
|||
+XTSSWGD = 0.02 |
|||
+TNJTS = 0 |
|||
+TNJTSD = 0 |
|||
+TNJTSSW = 0 |
|||
+TNJTSSWD = 0 |
|||
+TNJTSSWG = 0 |
|||
+TNJTSSWGD = 0 |
|||
+NOIA = 6.25e40 |
|||
+NOIB = 3.125e25 |
|||
+NOIC = 8.75e8 |
|||
+EM = 41000000 |
|||
+EF = 1 |
|||
+LINTNOI = 0 |
|||
+NTNOI = 1 |
|||
+TNOIA = 0 |
|||
+TNOIB = 0 |
|||
+TNOIC = 0 |
|||
+RNOIA = 0.577 |
|||
+RNOIB = 0.5164 |
|||
+RNOIC = 0.395 |
|||
+DWJ = 0 |
|||
+DMCG = 0 |
|||
+DMCI = 0 |
|||
+DMDG = 0 |
|||
+DMCGT = 0 |
|||
+XGW = 0 |
|||
+XGL = 0 |
|||
+GBMIN = 1e-12 |
|||
+RSHG = 0.1 |
|||
+RBPB = 50 |
|||
+RBPD = 50 |
|||
+RBPS = 50 |
|||
+RBDB = 50 |
|||
+RBSB = 50 |
|||
+RBPS0 = 50 |
|||
+RBPSL = 0 |
|||
+RBPSW = 0 |
|||
+RBPSNF = 0 |
|||
+RBPD0 = 50 |
|||
+RBPDL = 0 |
|||
+RBPDW = 0 |
|||
+RBPDNF = 0 |
|||
+RBPBX0 = 100 |
|||
+RBPBXL = 0 |
|||
+RBPBXW = 0 |
|||
+RBPBXNF = 0 |
|||
+RBPBY0 = 100 |
|||
+RBPBYL = 0 |
|||
+RBPBYW = 0 |
|||
+RBPBYNF = 0 |
|||
+RBSBX0 = 100 |
|||
+RBSBY0 = 100 |
|||
+RBDBX0 = 100 |
|||
+RBDBY0 = 100 |
|||
+RBSDBXL = 0 |
|||
+RBSDBXW = 0 |
|||
+RBSDBXNF = 0 |
|||
+RBSDBYL = 0 |
|||
+RBSDBYW = 0 |
|||
+RBSDBYNF = 0 |
|||
+XRCRG1 = 12 |
|||
+XRCRG2 = 1 |
|||
+NGCON = 1 |
|||
+NDEP = 8.062e23 |
|||
+NDEPL1 = 1.2139 |
|||
+NDEPLEXP1 = 1.9088 |
|||
+NDEPL2 = -1.1825 |
|||
+NDEPLEXP2 = 1.9173 |
|||
+NDEPW = 0.065035 |
|||
+NDEPWEXP = 0.48882 |
|||
+NDEPWL = 0.00040893 |
|||
+NDEPWLEXP = 1.3273 |
|||
+EASUB = 4.05 |
|||
+NI0SUB = 1.1e16 |
|||
+BG0SUB = 1.17 |
|||
+EPSRSUB = 11.9 |
|||
+XJ = 1.5e-7 |
|||
+VFB = -1.2108 |
|||
+VFBSDOFF = 0 |
|||
+NSD = 1e26 |
|||
+DVTP0 = 1.8335e-7 |
|||
+DVTP1 = 220.59 |
|||
+DVTP2 = 9.6351e-10 |
|||
+DVTP3 = 0.89017 |
|||
+DVTP4 = 98.728 |
|||
+DVTP5 = 5.1435e-17 |
|||
+PHIN = 0.045 |
|||
+ETA0 = 0.0051075 |
|||
+ETAB = -0.010908157 |
|||
+ETABEXP = 0.09999 |
|||
+DSUB = 1.0667 |
|||
+K2 = -0.093146 |
|||
+K2L = 0.065574 |
|||
+K2LEXP = 0.79778 |
|||
+K2W = 0.030809 |
|||
+K2WEXP = 0.87253 |
|||
+CIT = 1.0136148e-5 |
|||
+CDSCD = 0.0011509049 |
|||
+CDSCDL = -0.00048388809 |
|||
+CDSCDLEXP = 0.13963388 |
|||
+CDSCB = 9.9995516e-6 |
|||
+CDSCBL = 1.4756534e-9 |
|||
+CDSCBLEXP = 1 |
|||
+NFACTOR = 0.0017201 |
|||
+NFACTORL = 1.7832e-6 |
|||
+NFACTORLEXP = 0.99988 |
|||
+NFACTORW = 0.11149 |
|||
+NFACTORWEXP = 0.8993 |
|||
+NFACTORWL = -0.01386 |
|||
+U0 = 0.04004 |
|||
+U0L = 0.58676 |
|||
+U0LEXP = 0.11151 |
|||
+ETAMOB = 4.0947 |
|||
+UA = 0.4298 |
|||
+UAL = -0.0087246 |
|||
+UALEXP = 1.3647 |
|||
+UAW = 0.11575 |
|||
+UAWEXP = 0.4385 |
|||
+UAWL = -7.027e-5 |
|||
+EU = 1.3371 |
|||
+EUL = 0.0021948 |
|||
+EULEXP = 1.4769 |
|||
+EUW = -0.0031666 |
|||
+EUWEXP = 1.9366 |
|||
+EUWL = -0.00013929 |
|||
+UD = 0.0093995 |
|||
+UDL = 0.067484 |
|||
+UDLEXP = 0.099452 |
|||
+UCS = 0.9999 |
|||
+UC = 4.91e-6 |
|||
+UCL = 0.001096 |
|||
+UCLEXP = 0.0015937 |
|||
+VSAT = 9609100 |
|||
+VSATL = 6.8282 |
|||
+VSATLEXP = 0.086396 |
|||
+VSATW = 0.016834 |
|||
+VSATWEXP = 3.0172 |
|||
+VSATCVL = 0 |
|||
+VSATCVLEXP = 1 |
|||
+VSATCVW = 0 |
|||
+VSATCVWEXP = 1 |
|||
+DELTA = 0.1779 |
|||
+DELTAL = 0.1269 |
|||
+DELTALEXP = 0.18156 |
|||
+PCLM = 0 |
|||
+PCLML = 0 |
|||
+PCLMLEXP = 1e-13 |
|||
+PCLMG = 0 |
|||
+PCLMCVL = 0 |
|||
+PCLMCVLEXP = 1 |
|||
+PSCBE1 = 4.24e8 |
|||
+PSCBE2 = 1e-8 |
|||
+PDITS = 0.85536 |
|||
+PDITSL = 8473.9 |
|||
+PDITSD = 0 |
|||
+PDIBLC = 0.005 |
|||
+PDIBLCL = 0 |
|||
+PDIBLCLEXP = 1 |
|||
+PDIBLCB = -0.49995 |
|||
+PVAG = 1 |
|||
+FPROUT = 0 |
|||
+FPROUTL = 0 |
|||
+FPROUTLEXP = 1 |
|||
+PTWG = 0.09999 |
|||
+PTWGL = 0.069993 |
|||
+PTWGLEXP = 0.0009999 |
|||
+PSAT = 1e-13 |
|||
+PSATL = 0 |
|||
+PSATLEXP = 1 |
|||
+PSATB = 0.9999 |
|||
+PSATX = 1e-13 |
|||
+RSH = 0 |
|||
+PRWG = 1 |
|||
+PRWB = 0.010098993 |
|||
+PRWBL = 0.00070000265 |
|||
+PRWBLEXP = 1 |
|||
+WR = 1 |
|||
+RSWMIN = 0 |
|||
+RSW = 10 |
|||
+RSWL = 0 |
|||
+RSWLEXP = 1 |
|||
+RDWMIN = 0 |
|||
+RDW = 10 |
|||
+RDWL = 0 |
|||
+RDWLEXP = 1 |
|||
+RDSWMIN = 0 |
|||
+RDSW = 0 |
|||
+RDSWL = 0.0007 |
|||
+RDSWLEXP = 1e-7 |
|||
+ALPHA0 = 0 |
|||
+ALPHA0L = 0 |
|||
+ALPHA0LEXP = 1 |
|||
+BETA0 = 0 |
|||
+AGIDL = 0 |
|||
+AGIDLL = 0 |
|||
+AGIDLW = 0 |
|||
+BGIDL = 2.3e9 |
|||
+CGIDL = 0.5 |
|||
+EGIDL = 0.8 |
|||
+AGISL = 0 |
|||
+AGISLL = 0 |
|||
+AGISLW = 0 |
|||
+BGISL = 2.3e9 |
|||
+CGISL = 0.5 |
|||
+EGISL = 0.00171 |
|||
+AIGBACC = 0.00171 |
|||
+BIGBACC = 0.00171 |
|||
+CIGBACC = 0.075 |
|||
+NIGBACC = 1 |
|||
+AIGBINV = 0.0111 |
|||
+BIGBINV = 0.000949 |
|||
+CIGBINV = 0.006 |
|||
+EIGBINV = 1.1 |
|||
+NIGBINV = 3 |
|||
+AIGC = 0.0136 |
|||
+AIGCL = 3 |
|||
+AIGCW = 0.0136 |
|||
+BIGC = 0.00171 |
|||
+CIGC = 0.075 |
|||
+AIGS = 0.0136 |
|||
+AIGSL = 0.075 |
|||
+AIGSW = 0.0136 |
|||
+AIGD = 0.0136 |
|||
+AIGDL = 0 |
|||
+AIGDW = 0.0136 |
|||
+BIGS = 0.00171 |
|||
+BIGD = 0.00171 |
|||
+CIGS = 0.075 |
|||
+CIGD = 0.075 |
|||
+TOXREF = 0.075 |
|||
+NTOX = 1 |
|||
+POXEDGE = 1 |
|||
+PIGCD = 1 |
|||
+PIGCDL = 1 |
|||
+NDEPCV = 4.598e23 |
|||
+NDEPCVL1 = 0 |
|||
+NDEPCVLEXP1 = 1 |
|||
+NDEPCVL2 = 0 |
|||
+NDEPCVLEXP2 = 2 |
|||
+NDEPCVW = 0 |
|||
+NDEPCVWEXP = 1 |
|||
+NDEPCVWL = 0 |
|||
+NDEPCVWLEXP = 1 |
|||
+NGATE = 7.764e25 |
|||
+CF = 0 |
|||
+CFRCOEFF = 1 |
|||
+CGSO = 187.0e-12 |
|||
+CGDO = 187.0e-12 |
|||
+CGBO = 0 |
|||
+CGSL = 130.0e-12 |
|||
+CGDL = 130.0e-12 |
|||
+CKAPPAS = 1.6 |
|||
+CKAPPAD = 1.6 |
|||
+ADOS = 221.4 |
|||
+BDOS = 1.350 |
|||
+QM0 = 405.7e-6 |
|||
+ETAQM = 848.5e-3 |
|||
+VFBCV = -996.0e-3 |
|||
+VFBCVL = 0 |
|||
+VFBCVLEXP = 1 |
|||
+VFBCVW = 0 |
|||
+VFBCVWEXP = 1 |
|||
+VFBCVWL = 0 |
|||
+VFBCVWLEXP = 1 |
|||
+TBGASUB = 0.000473 |
|||
+TBGBSUB = 636 |
|||
+TDELTA = 0 |
|||
+PTWGT = 0 |
|||
+IIT = 0 |
|||
+TGIDL = 0 |
|||
+IGT = 0 |
|||
+KT1 = -0.11 |
|||
+KT1L = 0 |
|||
+KT2 = 0.022 |
|||
+KT1EXP = 1 |
|||
+UTE = -1.5 |
|||
+UA1 = 0.001 |
|||
+UD1 = 0 |
|||
+UC1 = -5.6e-11 |
|||
+UCSTE = -0.004775 |
|||
+PRT = 0 |
|||
+AT = -0.00156 |
|||
+SCA = 0 |
|||
+SCB = 0 |
|||
+SCC = 0 |
|||
+SC = 0 |
|||
+KU0WE = 0 |
|||
+KVTH0WE = 0 |
|||
+K2WE = 0 |
|||
+WEB = 0 |
|||
+WEC = 0 |
|||
+SCREF = 1e-6 |
|||
+SA = 0 |
|||
+SB = 0 |
|||
+SD = 0 |
|||
+SAREF = 1e-6 |
|||
+SBREF = 1e-6 |
|||
+WLOD = 0 |
|||
+KVSAT = 0 |
|||
+KU0 = 0 |
|||
+TKU0 = 0 |
|||
+LKU0 = 0 |
|||
+WKU0 = 0 |
|||
+PKU0 = 0 |
|||
+LLODKU0 = 0 |
|||
+WLODKU0 = 0 |
|||
+KVTH0 = 0 |
|||
+LKVTH0 = 0 |
|||
+WKVTH0 = 0 |
|||
+PKVTH0 = 0 |
|||
+LLODVTH = 0 |
|||
+WLODVTH = 0 |
|||
+STK2 = 0 |
|||
+LODK2 = 1 |
|||
+STETA0 = 0 |
|||
+LODETA0 = 1 |
|||
+RTH0 = 1e7 |
|||
+MOBSCALE = 1 |
|||
@ -1,29 +0,0 @@ |
|||
OSDI BSIMBULK NMOS Test |
|||
*.options abstol=1e-15 |
|||
|
|||
* one voltage source per MOS terminal: |
|||
VD dd 0 1 |
|||
VG gg 0 1 |
|||
VS ss 0 0 |
|||
VB bb 0 0 |
|||
|
|||
* model definitions: |
|||
*.model BSIMBULK_osdi_N bsimbulk type=1 |
|||
.include Modelcards/model.l |
|||
|
|||
*OSDI BSIMBULK: |
|||
* Where to put instance parameters channel width and length? |
|||
N1 dd gg ss bb BSIMBULK_osdi_N W=5e-6 L=0.5e-6 |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimbulk107.osdi |
|||
set xbrushwidth=3 |
|||
* a DC sweep: drain, gate |
|||
dc Vd 1.8 0 -0.01 VG 0.2 1.8 0.2 ; Kennlinie nicht o.k. |
|||
*dc Vd 0 1.6 0.01 VG 0.2 1.6 0.2 ; gar nicht o.k. |
|||
* plot source current |
|||
plot i(VS) |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,30 +0,0 @@ |
|||
OSDI BSIMBULK PMOS Test |
|||
*.options abstol=1e-15 |
|||
|
|||
* one voltage source per MOS terminal: |
|||
VD dd 0 -1 |
|||
VG gg 0 -1 |
|||
VS ss 0 0 |
|||
VB bb 0 0 |
|||
|
|||
* model definitions: |
|||
*.model BSIMBULK_osdi_P bsimbulk type=-1 |
|||
.include Modelcards/model.l |
|||
|
|||
*OSDI BSIMBULK: |
|||
* |
|||
N1 dd gg ss bb BSIMBULK_osdi_P W=5e-6 L=5e-7 |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimbulk106.osdi |
|||
set xbrushwidth=3 |
|||
* a DC sweep: drain, gate |
|||
*op |
|||
dc Vd -1.8 0 0.01 VG -0.2 -1.8 -0.2 ; o.k. |
|||
*dc Vd 0 -1.8 -0.01 VG -0.2 -1.8 -0.2 ; not o.k. |
|||
* plot source current |
|||
plot i(VS) |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 10nm HSPICE Model Card for HP NFET |
|||
** Nominal VDD=0.75V |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 6.8e-010 eotbox = 1.4e-007 tfin = 8e-009 toxp = 1.2e-009 |
|||
+nbody = 2.5e+022 phig = 4.4212 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 6e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.1e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 6e-13 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 8e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.032 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.6778 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.0568 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 132000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.8e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 10nm HSPICE Model Card for HP PFET |
|||
** Nominal VDD=0.75 |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 6.8e-010 eotbox = 1.4e-007 tfin = 8e-009 toxp = 1.2e-009 |
|||
+nbody = 2.5e+022 phig = 4.7509 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 6e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.1e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 7e-13 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 8e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.032 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.93 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.0376 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 129000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.8e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 14nm HSPICE Model Card for HP NFET |
|||
** Nominal VDD=0.8V |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 7.5e-010 eotbox = 1.4e-007 tfin = 1e-008 toxp = 1.3e-009 |
|||
+nbody = 5e+022 phig = 4.4187 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.8e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 1.5e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.3e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 8e-009 rhoc = 8e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2.5e-009 epsrsp = 3.9 tgate = 8.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0226 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.5063 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.052 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 110000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 3.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 14nm HSPICE Model Card for HP PFET |
|||
** Nominal VDD=0.8V |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 7.5e-010 eotbox = 1.4e-007 tfin = 1e-008 toxp = 1.3e-009 |
|||
+nbody = 5e+022 phig = 4.7518 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.8e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 1.5e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.3e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 8e-009 rhoc = 9e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2.5e-009 epsrsp = 3.9 tgate = 8.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0226 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.767 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.0336 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 105000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 3.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 16nm HSPICE Model Card for HP NFET |
|||
** Nominal VDD=0.85V |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8e-010 eotbox = 1.4e-007 tfin = 1.2e-008 toxp = 1.35e-009 |
|||
+nbody = 1e+023 phig = 4.4061 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 1e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.6e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 9e-009 rhoc = 1.5e-12 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 9e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.018 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.5261 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.0448 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 90000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 4.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 16nm HSPICE Model Card for HP PFET |
|||
** Nominal VDD=0.85V |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8e-010 eotbox = 1.4e-007 tfin = 1.2e-008 toxp = 1.35e-009 |
|||
+nbody = 1e+023 phig = 4.7642 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 1e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.6e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 9e-009 rhoc = 2e-012 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 9e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.018 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.778 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.03 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 88000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 4.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 20nm HSPICE Model Card for HP NFET |
|||
** Nominal VDD=0.9V |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 2.4e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8.4e-010 eotbox = 1.4e-007 tfin = 1.5e-008 toxp = 1.4e-009 |
|||
+nbody = 5e+023 phig = 4.3752 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 1e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 1e-008 |
|||
*======================== geometry ========================* |
|||
+tsili = 1e-008 rhoc = 4e-012 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 1e-008 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0132 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.5063 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.038 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 85000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 6e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 20nm HSPICE Model Card for HP PFET |
|||
** Nominal VDD=0.9V |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 2.4e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8.4e-010 eotbox = 1.4e-007 tfin = 1.5e-008 toxp = 1.4e-009 |
|||
+nbody = 5e+023 phig = 4.7976 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 1e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 1e-008 |
|||
*======================== geometry ========================* |
|||
+tsili = 1e-008 rhoc = 5e-12 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 1e-008 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0132 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.71 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.026 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 84000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 6e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 7nm HSPICE Model Card for HP NFET |
|||
** Nominal VDD=0.7V |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 6.2e-010 eotbox = 1.4e-007 tfin = 6.5e-009 toxp = 1.15e-009 |
|||
+nbody = 1e+022 phig = 4.4243 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.1e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 2e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 1.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 4e-13 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 7.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 9e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.039 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.6785 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.065 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 160000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG 7nm HSPICE Model Card for HP PFET |
|||
** Nominal VDD=0.7 |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 6.2e-010 eotbox = 1.4e-007 tfin = 6.5e-009 toxp = 1.15e-009 |
|||
+nbody = 1e+022 phig = 4.7467 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.1e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 2e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 1.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 5e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 7.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 9e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.039 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.97 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.042 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 153000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 10nm LSTP NFET |
|||
** Nominal VDD=0.75 |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8.8e-010 eotbox = 1.4e-007 tfin = 8e-009 toxp = 1.2e-009 |
|||
+nbody = 2.5e+022 phig = 4.6043 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 0 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.1e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 6e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 8e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.022 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.4079 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.0568 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 132000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.8e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 10nm LSTP PFET |
|||
** Nominal VDD=0.75 |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8.8e-010 eotbox = 1.4e-007 tfin = 8e-009 toxp = 1.2e-009 |
|||
+nbody = 2.5e+022 phig = 4.5662 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 0 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.1e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 7e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 8e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.024 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.57 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.036 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 129000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.8e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 14nm LSTP NFET |
|||
** Nominal VDD=0.8 |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 9.2e-010 eotbox = 1.4e-007 tfin = 1e-008 toxp = 1.3e-009 |
|||
+nbody = 5e+022 phig = 4.6030 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.8e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 2.5e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.3e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 8e-009 rhoc = 8e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2.5e-009 epsrsp = 3.9 tgate = 8.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0216 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.5141 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.052 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 110000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 3.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 14nm LSTP PFET |
|||
** Nominal VDD=0.8 |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 9.2e-010 eotbox = 1.4e-007 tfin = 1e-008 toxp = 1.3e-009 |
|||
+nbody = 5e+022 phig = 4.5743 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.8e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = 2.5e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.3e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 8e-009 rhoc = 9e-13 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2.5e-009 epsrsp = 3.9 tgate = 8.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 6e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0216 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.74 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.033 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 105000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 3.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 16nm LSTP NFET |
|||
** Nominal VDD=0.85 |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 1e-009 eotbox = 1.4e-007 tfin = 1.2e-008 toxp = 1.35e-009 |
|||
+nbody = 1e+023 phig = 4.5887 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = -1e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.6e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 9e-009 rhoc = 1.5e-012 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 9e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.021 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.7358 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.0448 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 90000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 4.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 16nm LSTP PFET |
|||
** Nominal VDD=0.85 |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 1e-009 eotbox = 1.4e-007 tfin = 1.2e-008 toxp = 1.35e-009 |
|||
+nbody = 1e+023 phig = 4.5885 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = -1e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.6e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 9.5e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 9e-009 rhoc = 2e-012 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 9e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.021 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.9925 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.03 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 88000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 4.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 20nm LSTP NFET |
|||
** Nominal VDD=0.9V |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 2.4e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 1.1e-009 eotbox = 1.4e-007 tfin = 1.5e-008 toxp = 1.4e-009 |
|||
+nbody = 5e+023 phig = 4.5568 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = -1.5e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 1e-008 |
|||
*======================== geometry ========================* |
|||
+tsili = 1e-008 rhoc = 4e-012 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 1e-008 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.01695 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.6656 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.038 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 85000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 6e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 20nm LSTP PFET |
|||
** Nominal VDD=0.9V |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 2.4e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 1.1e-009 eotbox = 1.4e-007 tfin = 1.5e-008 toxp = 1.4e-009 |
|||
+nbody = 5e+023 phig = 4.6215 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 2.4e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = -1.5e-009 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 2.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 1e-008 |
|||
*======================== geometry ========================* |
|||
+tsili = 1e-008 rhoc = 5e-012 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 3e-009 epsrsp = 3.9 tgate = 1e-008 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 3e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.01695 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.85 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.026 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 84000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 6e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 7nm LSTP NFET |
|||
** Nominal VDD=0.7 |
|||
|
|||
.model nfet nmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8.4e-010 eotbox = 1.4e-007 tfin = 6.5e-009 toxp = 1.15e-009 |
|||
+nbody = 1e+022 phig = 4.6136 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.1e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = -2.5e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 1.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 4e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 7.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 9e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0252 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.39 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.065 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 160000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,146 +0,0 @@ |
|||
** PTM-MG HSPICE Model Card for 7nm LSTP PFET |
|||
** Nominal VDD=0.7 |
|||
|
|||
.model pfet pmos level = 72 |
|||
+ bulkmod = 1 |
|||
+lmin = 1e-008 lmax = 3e-008 |
|||
************************************************************ |
|||
* general * |
|||
************************************************************ |
|||
*========================= flags ==========================* |
|||
+version = 105.03 bulkmod = 1 igcmod = 1 igbmod = 1 |
|||
+gidlmod = 0 iimod = 0 geomod = 1 rdsmod = 1 |
|||
+rgatemod= 0 rgeomod = 1 shmod = 0 nqsmod = 0 |
|||
+coremod = 0 cgeomod = 2 capmod = 0 tnom = 300.15 |
|||
*======================== process =========================* |
|||
+eot = 8.4e-010 eotbox = 1.4e-007 tfin = 6.5e-009 toxp = 1.15e-009 |
|||
+nbody = 1e+022 phig = 4.5645 epsrox = 3.9 epsrsub = 11.9 |
|||
+easub = 4.05 ni0sub = 1.1e+016 bg0sub = 1.12 nc0sub = 2.86e+025 |
|||
+nsd = 3e+026 ngate = 0 nfin = 1 d = 4e-008 |
|||
+nseg = 5 l = 1.1e-008 |
|||
*========================== w/l ===========================* |
|||
+xl = 0 lint = -2.5e-010 ll = 0 lln = 1 |
|||
+llc = 0 dlc = 0 dlbin = 0 hfin = 1.8e-008 |
|||
+fech = 1 deltaw = 0 deltawcv= 0 fechcv = 1 |
|||
+hepi = 8e-009 |
|||
*======================== geometry ========================* |
|||
+tsili = 7e-009 rhoc = 5e-013 cratio = 0.5 deltaprsd= 0 |
|||
+sdterm = 0 ldg = 2e-009 epsrsp = 3.9 tgate = 7.5e-009 |
|||
+tmask = 0 asiliend= 0 arsdend = 0 prsdend = 0 |
|||
+nsde = 9e+025 rgeoa = 1 rgeob = 0 rgeoc = 0 |
|||
+rgeod = 0 rgeoe = 0 cgeoa = 1 cgeob = 0 |
|||
+cgeoc = 0 cgeod = 0 cgeoe = 1 |
|||
*===================== model_selector =====================* |
|||
************************************************************ |
|||
* dc * |
|||
************************************************************ |
|||
+cit = 1.3e-005 |
|||
*========================== vth ===========================* |
|||
+cdsc = 0.0252 cdscd = 0.007 dvt0 = 0.01 dvt1 = 0.69 |
|||
+phin = 0.05 eta0 = 0.54 dsub = 0.9 k1rsce = 0 |
|||
+lpe0 = 5e-009 dvtshift= 0 qmfactor= 0 qmtceniv= 0 |
|||
+qmtcencv= 0 etaqm = 0.54 qm0 = 0.001143 pqm = 0.66 |
|||
+qm0acc = 0.001 pqmacc = 0.66 delvfbacc= 0 u0 = 0.04 |
|||
*======================== mobility ========================* |
|||
+etamob = 2 up = 0 lpa = 1 ua = 0.3 |
|||
+aua = 0 bua = 1e-007 eu = 1.8 ud = 0 |
|||
+aud = 0 bud = 5e-008 ucs = 0 rdswmin = 0 |
|||
*======================= resistance =======================* |
|||
+rdsw = 100 ardsw = 0 brdsw = 1e-007 prwg = 0 |
|||
+wr = 1 rswmin = 0 rsw = 0 arsw = 0 |
|||
+brsw = 1e-007 rdwmin = 0 rdw = 0 ardw = 0 |
|||
+brdw = 1e-007 rgfin = 0.001 rgext = 0 rshs = 0 |
|||
+vsat = 153000 |
|||
*======================= saturation =======================* |
|||
+deltavsat= 1 ksativ = 0.8 avsat = 0 avsat1 = 0 |
|||
+bvsat = 1e-007 bvsat1 = 1e-007 mexp = 3 amexp = 0 |
|||
+bmexp = 1 ptwg = 0 aptwg = 0 bptwg = 1e-007 |
|||
*========================== rout ==========================* |
|||
+pclm = 0.2 pclmcv = 0.013 apclm = 0 bpclm = 1e-007 |
|||
+pclmg = 0 pclmgcv = 0 vasat = 0.6 vasatcv = 0.2 |
|||
+pdibl1 = 1.3 pdibl2 = 0.0002 drout = 1.06 pvag = 1 |
|||
+fpitch = 2.2e-008 |
|||
*====================== self-heating ======================* |
|||
+rth0 = 0.01 cth0 = 1e-005 wth0 = 0 |
|||
************************************************************ |
|||
* leakage * |
|||
************************************************************ |
|||
+aigbinv = 0.0111 |
|||
*========================== igb ===========================* |
|||
+bigbinv = 0.03 cigbinv = 0.006 eigbinv = 1.1 nigbinv = 1.2 |
|||
+aigbacc = 0.0149 bigbacc = 0.000949 cigbacc = 0.075 nigbacc = 3 |
|||
+aigc = 0.0136 |
|||
*========================== igc ===========================* |
|||
+bigc = 0.00171 cigc = 0.075 nigc = 1 |
|||
*======================== igs/igd =========================* |
|||
+dlcigs = 0 dlcigd = 0 aigs = 0.0136 aigd = 0.0136 |
|||
+bigs = 0.00171 bigd = 0.00171 cigs = 0.075 cigd = 0.075 |
|||
+poxedge = 1 agidl = 5.729e-012 |
|||
*======================= gidl/gisl ========================* |
|||
+agisl = 5.729e-012 bgidl = 3e+008 bgisl = 3e+008 egidl = 0.1 |
|||
+egisl = 0.1 alpha0 = 0 |
|||
*========================== isub ==========================* |
|||
+alpha1 = 0 alphaii = 0 betaii0 = 0 betaii1 = 0 |
|||
+betaii2 = 0.1 esatii = 10000000 lii = 5e-010 sii0 = 0.5 |
|||
+sii1 = 0.1 sii2 = 0 siid = 0 beta0 = 30 |
|||
+lintigen= 0 |
|||
*================ generation/recombination ================* |
|||
+ntgen = 1 aigen = 0 bigen = 0 |
|||
************************************************************ |
|||
* rf * |
|||
************************************************************ |
|||
+xrcrg1 = 12 |
|||
*==================== nonquasi-static =====================* |
|||
+xrcrg2 = 1 |
|||
************************************************************ |
|||
* junction * |
|||
************************************************************ |
|||
*======================== current =========================* |
|||
+jss = 0.0001 jsd = 0.0001 jsws = 0 jswgs = 0 |
|||
+njs = 1 njd = 1 ijthsfwd= 0.1 ijthdfwd= 0.1 |
|||
+ijthsrev= 0.1 ijthdrev= 0.1 bvs = 10 bvd = 10 |
|||
+xjbvs = 1 xjbvd = 1 cjs = 0.0005 |
|||
*====================== capacitance =======================* |
|||
+cjd = 0.0005 cjsws = 5e-010 cjswgs = 0 pbs = 1 |
|||
+pbd = 1 pbsws = 1 mjs = 0.5 mjd = 0.5 |
|||
+mjsws2 = 0.33 mjswd2 = 0.33 mjsws = 0.33 sjs = 0 |
|||
+sjsws = 0 sjswgs = 0 mjs2 = 0.125 mjd2 = 0.125 |
|||
************************************************************ |
|||
* capacitance * |
|||
************************************************************ |
|||
*====================== capacitance =======================* |
|||
+cgsp = 0 cgdp = 0 cdsp = 0 cfs = 2.56e-011 |
|||
+cfd = 2.65e-011 covs = 2.5e-011 covd = 2.5e-011 cgsl = 0 |
|||
+ckappas = 0.6 cgbo = 0 cgbl = 0 |
|||
************************************************************ |
|||
* temperature * |
|||
************************************************************ |
|||
+tbgasub = 0.000702 |
|||
*======================== process =========================* |
|||
+tbgbsub = 1108 kt1 = 0 |
|||
*========================== vth ===========================* |
|||
+kt1l = 0 ute = 0 |
|||
*======================== mobility ========================* |
|||
+utl = -0.0015 ua1 = 0.001032 ud1 = 0 ucste = -0.00478 |
|||
+at = -0.00156 |
|||
*========================== vsat ==========================* |
|||
+ptwgt = 0.004 tmexp = 0 prt = 0.001 |
|||
*======================== resistor ========================* |
|||
+iit = -0.5 |
|||
*========================== isub ==========================* |
|||
+tii = 0 tgidl = -0.0003 |
|||
*========================== gidl ==========================* |
|||
+igt = 2.5 |
|||
*====================== gatecurrent =======================* |
|||
*======================== junction ========================* |
|||
+tcj = 0 tcjsw = 0 tcjswg = 0 tpb = 0 |
|||
+tpbsw = 0 tpbswg = 0 xtis = 3 xtid = 3 |
|||
+xtss = 0.02 xtssws = 0.02 xtsswgs = 0.02 tnjts = 0 |
|||
+tnjtssw = 0 tnjtsswg= 0 |
|||
************************************************************ |
|||
* noise * |
|||
************************************************************ |
|||
+ef = 1 |
|||
*========================== 1/f ===========================* |
|||
+lintnoi = 0 em = 41000000 noia = 6.25e+039 noib = 3.125e+024 |
|||
+noic = 87500000 ntnoi = 1 |
|||
@ -1,191 +0,0 @@ |
|||
*************ITRS 2011 aligned PTM-MG FinFET models (for Public Release)*********** |
|||
* PTM-MG FET Models ITRS Version 2.0 |
|||
* NOTES: |
|||
* This is the beta version of the ITRS 2011 aligned MG (multi-gate) models. |
|||
* The parameters are based on BSIM-CMG 105.03 models for bulk FinFET devices. |
|||
* Parameters are set from ITRS 2011 PIDS tables. |
|||
* LSTP nodes in the models target Ioff=0.1 nA/um where Weff=2*fin_height+fin_width. |
|||
* HP nodes in the models target Ioff=100 nA/um. |
|||
|
|||
* |
|||
* USAGE: |
|||
* Point to the models library file with the tags: PTM<NODE><TYPE> |
|||
* where <NODE> = 20 / 16 / 14 / 10 / 7 |
|||
* and <TYPE> = lstp / hp |
|||
* Example: .lib '..PATH../models/itrs_rev2/models' ptm20lstp |
|||
* This will call the FETs for 20nm LSTP node. |
|||
* |
|||
* Transistor calls can be made as follows: |
|||
* The param.inc file contains variables to calculate Effective Width and provide |
|||
* nominal supply voltage. The included variables are: |
|||
* vdd = supply voltage |
|||
* fin_height = Height of the Fin (HFIN) |
|||
* fin_width = Thickness of the Fin (TFIN) |
|||
* lg = Gate Length |
|||
*********************************************************************************** |
|||
.LIB ptm20lstp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/20nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/20pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 20nm |
|||
|
|||
.ENDL ptm20lstp |
|||
*********************************************************************************** |
|||
.LIB ptm16lstp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/16nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/16pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 16nm |
|||
|
|||
.ENDL ptm16lstp |
|||
*********************************************************************************** |
|||
.LIB ptm14lstp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/14nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/14pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 14nm |
|||
|
|||
.ENDL ptm14lstp |
|||
*********************************************************************************** |
|||
.LIB ptm10lstp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/10nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/10pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 10nm |
|||
|
|||
.ENDL ptm10lstp |
|||
*********************************************************************************** |
|||
.LIB ptm7lstp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/7nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/lstp/7pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 7nm |
|||
|
|||
.ENDL ptm7lstp |
|||
|
|||
*********************************************************************************** |
|||
.LIB ptm20hp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/20nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/20pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 20nm |
|||
|
|||
.ENDL ptm20hp |
|||
|
|||
*********************************************************************************** |
|||
.LIB ptm16hp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/16nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/16pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 16nm |
|||
|
|||
.ENDL ptm16hp |
|||
|
|||
*********************************************************************************** |
|||
.LIB ptm14hp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/14nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/14pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 14nm |
|||
|
|||
.ENDL ptm14hp |
|||
|
|||
*********************************************************************************** |
|||
.LIB ptm10hp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/10nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/10pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 10nm |
|||
|
|||
.ENDL ptm10hp |
|||
|
|||
*********************************************************************************** |
|||
.LIB ptm7hp |
|||
|
|||
.subckt nfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/7nfet.pm' |
|||
mnfet d g s x nfet L=l NFIN=nfin |
|||
.ends nfet |
|||
|
|||
.subckt pfet d g s x l=lg nfin=1 |
|||
.include '../modelfiles/hp/7pfet.pm' |
|||
mpfet d g s x pfet L=l NFIN=nfin |
|||
.ends pfet |
|||
|
|||
.lib '../param.inc' 7nm |
|||
|
|||
.ENDL ptm7hp |
|||
*********************************************************************************** |
|||
|
|||
@ -1,41 +0,0 @@ |
|||
* Temporary parameter list file for ITRS 2011 ver2 models |
|||
.lib 20nm |
|||
.param vdd=0.9 |
|||
.param vddp=-0.9 |
|||
.param fin_height=28n |
|||
.param fin_width=15n |
|||
.param lg=24n |
|||
.endl |
|||
|
|||
.lib 16nm |
|||
.param vdd=0.85 |
|||
.param vddp=-0.85 |
|||
.param fin_height=26n |
|||
.param fin_width=12n |
|||
.param lg=20n |
|||
.endl |
|||
|
|||
.lib 14nm |
|||
.param vdd=0.8 |
|||
.param vddp=-0.8 |
|||
.param fin_height=23n |
|||
.param fin_width=10n |
|||
.param lg=18n |
|||
.endl |
|||
|
|||
.lib 10nm |
|||
.param vdd=0.75 |
|||
.param vddp=-0.75 |
|||
.param fin_height=21n |
|||
.param fin_width=9n |
|||
.param lg=14n |
|||
.endl |
|||
|
|||
.lib 7nm |
|||
.param vdd=0.7 |
|||
.param vddp=-0.7 |
|||
.param fin_height=18n |
|||
.param fin_width=7n |
|||
.param lg=11n |
|||
.endl |
|||
|
|||
@ -1,137 +0,0 @@ |
|||
******** BSIM-MG 105 Sample Modelcard for NMOS ******** |
|||
|
|||
** The BSIM-MG sample modelcard below was not extracted/obtained |
|||
** from/based on any real technologies. It should not be used for any |
|||
** other purposes except for benchmarking the implementation of BSIM-MG |
|||
** against BSIM Team's standard results |
|||
|
|||
.model BSIMCMG_osdi_N BSIMCMG_va |
|||
+ BULKMOD = 1 |
|||
+ CGEOMOD = 0 |
|||
+ TYPE = 1 |
|||
+ GEOMOD = 0 |
|||
+ GIDLMOD = 1 |
|||
+ IGBMOD = 0 |
|||
+ IGCMOD = 1 |
|||
+ IIMOD = 0 |
|||
+ NGATE = 0 |
|||
+ NQSMOD = 0 |
|||
+ RDSMOD = 0 |
|||
+ RGATEMOD = 0 |
|||
+ RGEOMOD = 0 |
|||
+ NSEG = 5 |
|||
+ SDTERM = 0 |
|||
+ SHMOD = 0 |
|||
+ AGIDL = 1.00E-12 |
|||
+ AGISL = 1.00E-12 |
|||
+ AIGC = 0.014 |
|||
+ AIGD = 0.0115 |
|||
+ AIGS = 0.0115 |
|||
+ AT = 0.001 |
|||
+ BG0SUB = 1.17 |
|||
+ BGIDL = 1.00E+07 |
|||
+ BGISL = 1.00E+07 |
|||
+ BIGC = 0.005 |
|||
+ BIGD = 0.00332 |
|||
+ BIGS = 0.00332 |
|||
+ CDSC = 0.01 |
|||
+ CDSCD = 0.01 |
|||
+ CFD = 0.20E-10 |
|||
+ CFS = 0.20E-10 |
|||
+ CGBL = 0 |
|||
+ CGBO = 0 |
|||
+ CGDL = 0 |
|||
+ CGDO = 1e-10 |
|||
+ CGSL = 0 |
|||
+ CGSO = 1e-10 |
|||
+ CIGC = 0.25 |
|||
+ CIGD = 0.35 |
|||
+ CIGS = 0.35 |
|||
+ CIT = 0 |
|||
+ CKAPPAD = 0.6 |
|||
+ CKAPPAS = 0.6 |
|||
+ CTH0 = 0.000001243 |
|||
+ DELTAVSAT = 0.5 |
|||
+ DELTAW = 0 |
|||
+ DELTAWCV = 0 |
|||
+ DLBIN = 0 |
|||
+ DLC = 0 |
|||
+ DLCIGD = 1.00E-09 |
|||
+ DLCIGS = 1.00E-09 |
|||
+ DROUT = 1 |
|||
+ DSUB = 0.5 |
|||
+ DVT0 = 0.05 |
|||
+ DVT1 = 0.5 |
|||
+ DVTSHIFT = 0 |
|||
+ EASUB = 4.05 |
|||
+ EGIDL = 0.35 |
|||
+ EGISL = 0.35 |
|||
+ EOT = 1.50E-09 |
|||
+ EOTACC = 1.00E-10 |
|||
+ EOTBOX = 1.40E-07 |
|||
+ EPSROX = 3.9 |
|||
+ EPSRSP = 3.9 |
|||
+ EPSRSUB = 11.9 |
|||
+ ETA0 = 0.05 |
|||
+ ETAMOB = 2 |
|||
+ ETAQM = 0.54 |
|||
+ EU = 1.2 |
|||
+ HFIN = 3.00E-08 |
|||
+ IGT = 2.5 |
|||
+ K1RSCE = 0 |
|||
+ KSATIV = 2 |
|||
+ KT1 = 0 |
|||
+ KT1L = 0 |
|||
+ LINT = -2.00E-09 |
|||
+ LPE0 = 0 |
|||
+ LCDSCD = 5.00E-05 |
|||
+ LCDSCDR = 5.00E-05 |
|||
+ LRDSW = 0.2 |
|||
+ LVSAT = 0 |
|||
+ MEXP = 4 |
|||
+ NBODY = 1.00E+22 |
|||
+ NC0SUB = 2.86E+25 |
|||
+ NI0SUB = 1.10E+16 |
|||
+ NSD = 2.00E+26 |
|||
+ PCLM = 0.05 |
|||
+ PCLMCV = 0.013 |
|||
+ PCLMG = 0 |
|||
+ PDIBL1 = 0 |
|||
+ PDIBL2 = 0.002 |
|||
+ PHIG = 4.39 |
|||
+ PHIN = 0.05 |
|||
+ POXEDGE = 1.1 |
|||
+ PQM = 0.66 |
|||
+ PRT = 0 |
|||
+ PTWG = 0 |
|||
+ PTWGT = 0.004 |
|||
+ PVAG = 0 |
|||
+ QM0 = 0.001 |
|||
+ QMFACTOR = 2.5 |
|||
+ RDSW = 200 |
|||
+ RDSWMIN = 0 |
|||
+ RDWMIN = 0 |
|||
+ RSHD = 0 |
|||
+ RSHS = 0 |
|||
+ RSWMIN = 0 |
|||
+ RTH0 = 0.225 |
|||
+ TBGASUB = 0.000473 |
|||
+ TBGBSUB = 636 |
|||
+ TGIDL = -0.007 |
|||
+ TMEXP = 0 |
|||
+ TNOM = 25 |
|||
+ TOXP = 2.10E-09 |
|||
+ U0 = 0.025 |
|||
+ UA = 0.55 |
|||
+ UA1 = 0.001032 |
|||
+ UCS = 1 |
|||
+ UCSTE = -0.004775 |
|||
+ UD = 0 |
|||
+ UD1 = 0 |
|||
+ UP = 0 |
|||
+ UTE = -0.7 |
|||
+ UTL = 0 |
|||
+ VSAT = 80000 |
|||
+ WR = 1 |
|||
+ WTH0 = 2.60E-07 |
|||
+ XL = 0 |
|||
@ -1,138 +0,0 @@ |
|||
******** BSIM-MG 105 Sample Modelcard for PMOS ******** |
|||
|
|||
** The BSIM-MG sample modelcard below was not extracted/obtained |
|||
** from/based on any real technologies. It should not be used for any |
|||
** other purposes except for benchmarking the implementation of BSIM-MG |
|||
** against BSIM Team's standard results |
|||
|
|||
*.model pmos1 PMOS level=17 |
|||
.model BSIMCMG_osdi_P BSIMCMG_va |
|||
+BULKMOD = 1 |
|||
+ CGEOMOD = 0 |
|||
+ TYPE = 0 |
|||
+ GEOMOD = 0 |
|||
+ GIDLMOD = 1 |
|||
+ IGBMOD = 0 |
|||
+ IGCMOD = 1 |
|||
+ IIMOD = 0 |
|||
+ NGATE = 0 |
|||
+ NQSMOD = 0 |
|||
+ RDSMOD = 0 |
|||
+ RGATEMOD = 0 |
|||
+ RGEOMOD = 0 |
|||
+ NSEG = 5 |
|||
+ SDTERM = 0 |
|||
+ SHMOD = 0 |
|||
+ AGIDL = 2E-12 |
|||
+ AGISL = 2E-12 |
|||
+ AIGC = 0.007 |
|||
+ AIGD = 0.006 |
|||
+ AIGS = 0.006 |
|||
+ AT = 0.0008234 |
|||
+ BG0SUB = 1.17 |
|||
+ BGIDL = 1.50E+08 |
|||
+ BGISL = 1.50E+08 |
|||
+ BIGC = 0.0015 |
|||
+ BIGD = 0.001944 |
|||
+ BIGS = 0.001944 |
|||
+ CDSC = 0.003469 |
|||
+ CDSCD = 0.001486 |
|||
+ CFD = 0.2e-10 |
|||
+ CFS = 0.2e-10 |
|||
+ CGBL = 0 |
|||
+ CGBO = 0 |
|||
+ CGDL = 0 |
|||
+ CGDO = 1E-10 |
|||
+ CGSL = 0 |
|||
+ CGSO = 1E-10 |
|||
+ CIGC = 1 |
|||
+ CIGD = 1 |
|||
+ CIGS = 1 |
|||
+ CIT = 0 |
|||
+ CKAPPAD = 0.6 |
|||
+ CKAPPAS = 0.6 |
|||
+ CTH0 = 1.243E-06 |
|||
+ DELTAVSAT = 11.56 |
|||
+ DELTAW = 0 |
|||
+ DELTAWCV = -1.00E-08 |
|||
+ DLBIN = 0 |
|||
+ DLC = -9.2E-09 |
|||
+ DLCIGD = 5.00E-09 |
|||
+ DLCIGS = 5.00E-09 |
|||
+ DROUT = 4.97 |
|||
+ DSUB = 0.5 |
|||
+ DVT0 = 0.05006 |
|||
+ DVT1 = 0.4 |
|||
+ DVTSHIFT = 0 |
|||
+ EASUB = 4.05 |
|||
+ EGIDL = 1.142 |
|||
+ EGISL = 1.142 |
|||
+ EOT = 2.10E-09 |
|||
+ EOTACC = 3.00E-10 |
|||
+ EOTBOX = 1.40E-07 |
|||
+ EPSROX = 3.9 |
|||
+ EPSRSP = 3.9 |
|||
+ EPSRSUB = 11.9 |
|||
+ ETA0 = 0.03952 |
|||
+ ETAMOB = 4 |
|||
+ ETAQM = 0.54 |
|||
+ EU = 0.05 |
|||
+ HFIN = 3.00E-08 |
|||
+ IGT = 3.5 |
|||
+ K1RSCE = 0 |
|||
+ KSATIV = 1.592 |
|||
+ KT1 = 0.08387 |
|||
+ KT1L = 0 |
|||
+ LINT = -2.5E-09 |
|||
+ LPE0 = 0 |
|||
+ LCDSCD = 0 |
|||
+ LCDSCDR = 0 |
|||
+ LRDSW = 1.3 |
|||
+ LVSAT = 1441 |
|||
+ MEXP = 2.491 |
|||
+ NBODY = 1E+22 |
|||
+ NC0SUB = 2.86E+25 |
|||
+ NI0SUB = 1.1E+16 |
|||
+ NSD = 2E+26 |
|||
+ PCLM = 0.01 |
|||
+ PCLMCV = 0.013 |
|||
+ PCLMG = 1 |
|||
+ PDIBL1 = 800 |
|||
+ PDIBL2 = 0.005704 |
|||
+ PHIG = 4.678 |
|||
+ PHIN = 0.05 |
|||
+ POXEDGE = 1.152 |
|||
+ PQM = 0.66 |
|||
+ PRT = 0.002477 |
|||
+ PTWG = 6.322 |
|||
+ PTWGT = 0.0015 |
|||
+ PVAG = 200 |
|||
+ QM0 = 2.183E-12 |
|||
+ QMFACTOR = 0 |
|||
+ RDSW = 190.6 |
|||
+ RDSWMIN = 0 |
|||
+ RDWMIN = 0 |
|||
+ RSHD = 0 |
|||
+ RSHS = 0 |
|||
+ RSWMIN = 0 |
|||
+ RTH0 = 0.15 |
|||
+ TBGASUB = 0.000473 |
|||
+ TBGBSUB = 636 |
|||
+ TGIDL = -0.01 |
|||
+ TMEXP = 0 |
|||
+ TNOM = 25 |
|||
+ TOXP = 2.1E-09 |
|||
+ U0 = 0.02935 |
|||
+ UA = 1.133 |
|||
+ UA1 = 0.00134 |
|||
+ UCS = 0.2672 |
|||
+ UCSTE = 0 |
|||
+ UD = 0.0105 |
|||
+ UD1 = 0 |
|||
+ UP = 0 |
|||
+ UTE = 0 |
|||
+ UTL = 0.001 |
|||
+ VSAT = 48390 |
|||
+ WR = 1 |
|||
+ WTH0 = 2.60E-07 |
|||
+ XL = 0 |
|||
@ -1,38 +0,0 @@ |
|||
*Sample netlist for BSIM-CMG |
|||
|
|||
*Ring Oscillator |
|||
|
|||
.include Modelcards/modelcard.nmos |
|||
.include Modelcards/modelcard.pmos |
|||
|
|||
* --- Voltage Sources --- |
|||
vdd supply 0 dc=1.0 |
|||
Vss ss 0 0 |
|||
|
|||
* --- Inverter Subcircuit --- |
|||
.subckt mg_inv vin vout vdd gnd |
|||
NP1 vout vin vdd vdd BSIMCMG_osdi_P |
|||
NN1 vout vin gnd gnd BSIMCMG_osdi_N |
|||
.ends |
|||
|
|||
* --- Inverter --- |
|||
Xinv1 vi 1 supply ss mg_inv |
|||
Xinv2 1 2 supply ss mg_inv |
|||
Xinv3 2 3 supply ss mg_inv |
|||
Xinv4 3 4 supply ss mg_inv |
|||
Xinv5 4 vi supply ss mg_inv |
|||
|
|||
Xinv6 vi vo supply 0 mg_inv |
|||
|
|||
* --- Transient Analysis --- |
|||
.tran 0.5p 5n |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimcmg.osdi |
|||
set xbrushwidth=3 |
|||
run |
|||
plot v(vo) |
|||
plot i(vss) i(vdd) |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,36 +0,0 @@ |
|||
*Sample netlist for BSIM-CMG |
|||
* (exec-spice "ngspice %s" t) |
|||
*Inverter Transient |
|||
|
|||
.include Modelcards/modelcard.nmos |
|||
.include Modelcards/modelcard.pmos |
|||
* --- Voltage Sources --- |
|||
vdd supply 0 dc=1.0 |
|||
vsig vi 0 dc=0.5 sin (0.5 0.5 1MEG) |
|||
|
|||
* --- Inverter Subcircuit --- |
|||
.subckt mg_inv vin vout vdd gnd |
|||
NP1 vout vin vdd vdd BSIMCMG_osdi_P |
|||
NN1 vout vin gnd gnd BSIMCMG_osdi_N |
|||
.ends |
|||
|
|||
* --- Inverter --- |
|||
Xinv1 vi 1 supply 0 mg_inv |
|||
Xinv2 1 2 supply 0 mg_inv |
|||
Xinv3 2 3 supply 0 mg_inv |
|||
Xinv4 3 4 supply 0 mg_inv |
|||
Xinv5 4 vo supply 0 mg_inv |
|||
|
|||
* --- Transient Analysis --- |
|||
.tran 20n 5u |
|||
|
|||
.print tran v(vi) v(vo) |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimcmg.osdi |
|||
set xbrushwidth=3 |
|||
run |
|||
plot v(vi) v(vo) |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,28 +0,0 @@ |
|||
OSDI BSIMCMG Test |
|||
*.options abstol=1e-15 |
|||
|
|||
* one voltage source per MOS terminal: |
|||
VD dd 0 1 |
|||
VG gg 0 1 |
|||
VS ss 0 0 |
|||
VB bb 0 0 |
|||
|
|||
* model definitions: |
|||
*.model bsim4_osdi bsim4va |
|||
.include Modelcards/modelcard.nmos |
|||
|
|||
*OSDI BSIM4: |
|||
* Where to put instance parameters channel width and length? |
|||
N1 dd gg ss bb BSIMCMG_osdi_N ; W=5u L=0.2u |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimcmg.osdi |
|||
set xbrushwidth=3 |
|||
* a DC sweep: drain, gate |
|||
dc Vd 0 2.5 0.01 VG 0 2.5 0.5 |
|||
* plot source current |
|||
plot i(VS) |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,28 +0,0 @@ |
|||
OSDI BSIMCMG Test |
|||
*.options abstol=1e-15 |
|||
|
|||
* one voltage source per MOS terminal: |
|||
VD dd 0 -1 |
|||
VG gg 0 -1 |
|||
VS ss 0 0 |
|||
VB bb 0 0 |
|||
|
|||
* model definitions: |
|||
* |
|||
.include Modelcards/modelcard.pmos |
|||
|
|||
*OSDI BSIMCMG: |
|||
* Where to put instance parameters channel width and length? |
|||
N1 dd gg ss bb BSIMCMG_osdi_P |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimcmg.osdi |
|||
set xbrushwidth=3 |
|||
* a DC sweep: drain, gate |
|||
dc Vd 0 -1.8 -0.01 VG 0 -1.8 -0.3 |
|||
* plot source current |
|||
plot i(VS) |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
@ -1,47 +0,0 @@ |
|||
*Samle netlist for BSIM-MG |
|||
* (exec-spice "ngspice %s" t) |
|||
* Drain Noise Simulation |
|||
|
|||
.option abstol=1e-6 reltol=1e-6 post ingold |
|||
.temp 27 |
|||
|
|||
*.hdl "bsimcmg.va" |
|||
.include Modelcards/modelcard.nmos |
|||
|
|||
* --- Voltage Sources --- |
|||
vds 1 0 dc=1v |
|||
vgs gate 0 dc=0.5v ac=1 |
|||
vbs bulk 0 dc=0v |
|||
|
|||
* --- Circuit --- |
|||
lbias 1 drain 1m |
|||
cload drain 2 1m |
|||
rload 2 0 R=1 noise=0 |
|||
NM1 drain gate 0 bulk 0 BSIMCMG_osdi_N TFIN=15n L=30n NFIN=10 NRS=1 NRD=1 |
|||
+ FPITCH = 4.00E-08 |
|||
|
|||
* --- Analysis --- |
|||
*.op |
|||
**.dc vgs -0.5 1.5 0.01 |
|||
**.print dc i(lbias) |
|||
*.ac dec 11 1k 100g |
|||
*.noise v(drain) vgs 1 |
|||
**.print ac i(cload) |
|||
*.print ac v(drain) |
|||
*.print noise inoise onoise |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimcmg.osdi |
|||
op |
|||
|
|||
ac dec 11 1k 100g |
|||
plot vdb(drain) |
|||
|
|||
noise v(drain) vgs dec 11 1k 100g |
|||
print all |
|||
echo "silence in the studio, no noise today" |
|||
|
|||
.endc |
|||
|
|||
.end |
|||
|
|||
@ -1,54 +0,0 @@ |
|||
*Sample netlist for BSIM-MG |
|||
* (exec-spice "ngspice %s" t) |
|||
*17-stage ring oscillator |
|||
|
|||
.include Modelcards/modelcard.nmos |
|||
.include Modelcards/modelcard.pmos |
|||
|
|||
* --- Voltage Sources --- |
|||
vdd supply 0 dc=1.0 |
|||
|
|||
* --- Inverter Subcircuit --- |
|||
.subckt mg_inv vin vout vdd gnd |
|||
NP1 vout vin vdd vdd BSIMCMG_osdi_P |
|||
NN1 vout vin gnd gnd BSIMCMG_osdi_N |
|||
.ends |
|||
|
|||
* --- 17 Stage Ring oscillator --- |
|||
Xinv1 1 2 supply 0 mg_inv |
|||
Xinv2 2 3 supply 0 mg_inv |
|||
Xinv3 3 4 supply 0 mg_inv |
|||
Xinv4 4 5 supply 0 mg_inv |
|||
Xinv5 5 6 supply 0 mg_inv |
|||
Xinv6 6 7 supply 0 mg_inv |
|||
Xinv7 7 8 supply 0 mg_inv |
|||
Xinv8 8 9 supply 0 mg_inv |
|||
Xinv9 9 10 supply 0 mg_inv |
|||
Xinv10 10 11 supply 0 mg_inv |
|||
Xinv11 11 12 supply 0 mg_inv |
|||
Xinv12 12 13 supply 0 mg_inv |
|||
Xinv13 13 14 supply 0 mg_inv |
|||
Xinv14 14 15 supply 0 mg_inv |
|||
Xinv15 15 16 supply 0 mg_inv |
|||
Xinv16 16 17 supply 0 mg_inv |
|||
Xinv17 17 1 supply 0 mg_inv |
|||
|
|||
* --- Initial Condition --- |
|||
.ic v(1)=1 |
|||
|
|||
.tran 1p 1n |
|||
|
|||
.measure tran t1 when v(1)=0.5 cross=1 |
|||
.measure tran t2 when v(1)=0.5 cross=7 |
|||
.measure tran period param='(t2-t1)/3' |
|||
.measure tran frequency param='3/(t2-t1)' |
|||
.measure tran delay_per_stage param='period/34' |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimcmg.osdi |
|||
set xbrushwidth=3 |
|||
run |
|||
plot v(1) |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,27 +0,0 @@ |
|||
*Sample netlist for BSIM-CMG |
|||
* (exec-spice "ngspice %s" t) |
|||
*Inverter DC |
|||
|
|||
.include Modelcards/modelcard.nmos |
|||
.include Modelcards/modelcard.pmos |
|||
* --- Voltage Sources --- |
|||
vdd supply 0 dc=1.0 |
|||
vsig vin 0 dc=0.5 sin (0.5 0.5 1MEG) |
|||
|
|||
NP1 vout vin supply supply BSIMCMG_osdi_P |
|||
NN1 vout vin 0 0 BSIMCMG_osdi_N |
|||
|
|||
* --- DC Analysis --- |
|||
*.dc vsig 0 1 0.01 |
|||
|
|||
* --- Transient Analysis --- |
|||
.tran 10n 2u |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/bsimcmg.osdi |
|||
set xbrushwidth=3 |
|||
run |
|||
plot v(vout) v(vin) |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,253 +0,0 @@ |
|||
* PSP 102.5 |
|||
* https://www.cea.fr/cea-tech/leti/pspsupport/Documents/Level%20102.5.0/psp_VA_and_CMC_ref_data.tar.gz |
|||
.model nch psp102va ; level=45 |
|||
+TR=27.0 |
|||
+DTA=0 |
|||
+QMC=1.0 |
|||
+LVARO=-10.0E-9 |
|||
+LVARL=0 |
|||
+LVARW=0 |
|||
+LAP=10.0E-9 |
|||
+WVARO=10.0E-9 |
|||
+WVARL=0 |
|||
+WVARW=0 |
|||
+WOT=0 |
|||
+DLQ=0 |
|||
+DWQ=0 |
|||
+VFBO=-1.1 |
|||
+VFBL=0 |
|||
+VFBW=0 |
|||
+VFBLW=0 |
|||
+STVFBO=5.0E-4 |
|||
+STVFBL=0 |
|||
+STVFBW=0 |
|||
+STVFBLW=0 |
|||
+TOXO=1.5E-9 |
|||
+EPSROXO=3.9 |
|||
+NSUBO=3.0E+23 |
|||
+NSUBW=0 |
|||
+WSEG=1.5E-10 |
|||
+NPCK=1.0E+24 |
|||
+NPCKW=0 |
|||
+WSEGP=0.9E-8 |
|||
+LPCK=5.5E-8 |
|||
+LPCKW=0 |
|||
+FOL1=2.0E-2 |
|||
+FOL2=5.0E-6 |
|||
+VNSUBO=0 |
|||
+NSLPO=0.05 |
|||
+DNSUBO=0 |
|||
+DPHIBO=0 |
|||
+DPHIBL=0 |
|||
+DPHIBLEXP=1.0 |
|||
+DPHIBW=0 |
|||
+DPHIBLW=0 |
|||
+NPO=1.5E+26 |
|||
+NPL=10.0E-18 |
|||
+CTO=5.0E-15 |
|||
+CTL=4.0E-2 |
|||
+CTLEXP=0.6 |
|||
+CTW=0 |
|||
+CTLW=0 |
|||
+TOXOVO=1.5E-9 |
|||
+TOXOVDO=2.0E-9 |
|||
+LOV=10.0E-9 |
|||
+LOVD=0 |
|||
+NOVO=7.5E+25 |
|||
+NOVDO=5.0e+25 |
|||
+CFL=3.0E-4 |
|||
+CFLEXP=2.0 |
|||
+CFW=5.0E-3 |
|||
+CFBO=0.3 |
|||
+UO=3.5E-2 |
|||
+FBET1=-0.3 |
|||
+FBET1W=0.15 |
|||
+LP1=1.5E-7 |
|||
+LP1W=-2.5E-2 |
|||
+FBET2=50.0 |
|||
+LP2=8.5E-10 |
|||
+BETW1=5.0E-2 |
|||
+BETW2=-2.0E-2 |
|||
+WBET=5.0E-10 |
|||
+STBETO=1.75 |
|||
+STBETL=-2.0E-2 |
|||
+STBETW=-2.0E-3 |
|||
+STBETLW=-3.0E-3 |
|||
+MUEO=0.6 |
|||
+MUEW=-1.2E-2 |
|||
+STMUEO=0.5 |
|||
+THEMUO=2.75 |
|||
+STTHEMUO=-0.1 |
|||
+CSO=1.0E-2 |
|||
+CSL=0 |
|||
+CSLEXP=1 |
|||
+CSW=0 |
|||
+CSLW=0 |
|||
+STCSO=-5.0 |
|||
+XCORO=0.15 |
|||
+XCORL=2.0E-3 |
|||
+XCORW=-3.0E-2 |
|||
+XCORLW=-3.5E-3 |
|||
+STXCORO=1.25 |
|||
+FETAO=1 |
|||
+RSW1=50 |
|||
+RSW2=5.0E-2 |
|||
+STRSO=-2.0 |
|||
+RSBO=0 |
|||
+RSGO=0 |
|||
+THESATO=1.0E-6 |
|||
+THESATL=0.6 |
|||
+THESATLEXP=0.75 |
|||
+THESATW=-1.0E-2 |
|||
+THESATLW=0 |
|||
+STTHESATO=1.5 |
|||
+STTHESATL=-2.5E-2 |
|||
+STTHESATW=-2.0E-2 |
|||
+STTHESATLW=-5.0E-3 |
|||
+THESATBO=0.15 |
|||
+THESATGO=0.75 |
|||
+AXO=20 |
|||
+AXL=0.2 |
|||
+ALPL=7.0E-3 |
|||
+ALPLEXP=0.6 |
|||
+ALPW=5.0E-2 |
|||
+ALP1L1=2.5E-2 |
|||
+ALP1LEXP=0.4 |
|||
+ALP1L2=0.1 |
|||
+ALP1W=8.5E-3 |
|||
+ALP2L1=0.5 |
|||
+ALP2LEXP=0 |
|||
+ALP2L2=0.5 |
|||
+ALP2W=-0.2 |
|||
+VPO=0.25 |
|||
+A1O=1.0 |
|||
+A1L=0 |
|||
+A1W=0 |
|||
+A2O=10.0 |
|||
+STA2O=-0.5 |
|||
+A3O=1.0 |
|||
+A3L=0 |
|||
+A3W=0 |
|||
+A4O=0 |
|||
+A4L=0 |
|||
+A4W=0 |
|||
+GCOO=5.0 |
|||
+IGINVLW=50.0 |
|||
+IGOVW=10.0 |
|||
+IGOVDW=0 |
|||
+STIGO=1.5 |
|||
+GC2O=1.0 |
|||
+GC3O=-1.0 |
|||
+CHIBO=3.1 |
|||
+AGIDLW=50.0 |
|||
+AGIDLDW=0 |
|||
+BGIDLO=35.0 |
|||
+BGIDLDO=41 |
|||
+STBGIDLO=-5.0E-4 |
|||
+STBGIDLDO=0 |
|||
+CGIDLO=0.15 |
|||
+CGIDLDO=0 |
|||
+CGBOVL=0 |
|||
+CFRW=5.0E-17 |
|||
+CFRDW=0 |
|||
+FNTO=1 |
|||
+NFALW=8.0E+22 |
|||
+NFBLW=3.0E7 |
|||
+NFCLW=0 |
|||
+RGO=0 |
|||
+RINT=0 |
|||
+RVPOLY=0 |
|||
+RSHG=0 |
|||
+DLSIL=0 |
|||
+RBULKO=0 |
|||
+RWELLO=0 |
|||
+RJUNDO=0 |
|||
+RJUNSO=0 |
|||
+TRJ=27.0 |
|||
+IMAX=1.0E3 |
|||
+VJUNREF=2.5 |
|||
+FJUNQ=0.03 |
|||
+CJORBOT=1.0E-3 |
|||
+CJORSTI=1.0E-9 |
|||
+CJORGAT=0.5E-9 |
|||
+VBIRBOT=0.75 |
|||
+VBIRSTI=1.0 |
|||
+VBIRGAT=0.75 |
|||
+PBOT=0.35 |
|||
+PSTI=0.35 |
|||
+PGAT=0.6 |
|||
+PHIGBOT=1.16 |
|||
+PHIGSTI=1.16 |
|||
+PHIGGAT=1.16 |
|||
+IDSATRBOT=5.0E-9 |
|||
+IDSATRSTI=1.0E-18 |
|||
+IDSATRGAT=1.0E-18 |
|||
+CSRHBOT=5.0E2 |
|||
+CSRHSTI=0 |
|||
+CSRHGAT=1.0E3 |
|||
+XJUNSTI=1.0E-8 |
|||
+XJUNGAT=1.0E-9 |
|||
+CTATBOT=5.0E2 |
|||
+CTATSTI=0 |
|||
+CTATGAT=1.0E3 |
|||
+MEFFTATBOT=0.25 |
|||
+MEFFTATSTI=0.25 |
|||
+MEFFTATGAT=0.25 |
|||
+CBBTBOT=1.0E-12 |
|||
+CBBTSTI=1.0E-18 |
|||
+CBBTGAT=1.0E-18 |
|||
+FBBTRBOT=1.0E9 |
|||
+FBBTRSTI=1.0E9 |
|||
+FBBTRGAT=1.0E9 |
|||
+STFBBTBOT=-1.0E-3 |
|||
+STFBBTSTI=-1.0E-3 |
|||
+STFBBTGAT=-1.0E-2 |
|||
+VBRBOT=10.0 |
|||
+VBRSTI=10.0 |
|||
+VBRGAT=10.0 |
|||
+PBRBOT=3 |
|||
+PBRSTI=4 |
|||
+PBRGAT=3 |
|||
+VJUNREFD=2.5 |
|||
+FJUNQD=0.03 |
|||
+CJORBOTD=1.0E-3 |
|||
+CJORSTID=1.0E-9 |
|||
+CJORGATD=1.0E-9 |
|||
+VBIRBOTD=1.0 |
|||
+VBIRSTID=1.0 |
|||
+VBIRGATD=1.0 |
|||
+PBOTD=0.5 |
|||
+PSTID=0.5 |
|||
+PGATD=0.5 |
|||
+PHIGBOTD=1.16 |
|||
+PHIGSTID=1.16 |
|||
+PHIGGATD=1.16 |
|||
+IDSATRBOTD=1.0E-12 |
|||
+IDSATRSTID=1.0E-18 |
|||
+IDSATRGATD=1.0E-18 |
|||
+CSRHBOTD=1.0E+2 |
|||
+CSRHSTID=1.0E-4 |
|||
+CSRHGATD=1.0E-4 |
|||
+XJUNSTID=1.0E-7 |
|||
+XJUNGATD=1.0E-7 |
|||
+CTATBOTD=1.0E+2 |
|||
+CTATSTID=1.0E-4 |
|||
+CTATGATD=1.0E-4 |
|||
+MEFFTATBOTD=0.25 |
|||
+MEFFTATSTID=0.25 |
|||
+MEFFTATGATD=0.25 |
|||
+CBBTBOTD=1.0E-12 |
|||
+CBBTSTID=1.0E-18 |
|||
+CBBTGATD=1.0E-18 |
|||
+FBBTRBOTD=1.0E9 |
|||
+FBBTRSTID=1.0E9 |
|||
+FBBTRGATD=1.0E9 |
|||
+STFBBTBOTD=-1.0E-3 |
|||
+STFBBTSTID=-1.0E-3 |
|||
+STFBBTGATD=-1.0E-3 |
|||
+VBRBOTD=10.0 |
|||
+VBRSTID=10.0 |
|||
+VBRGATD=10.0 |
|||
+PBRBOTD=4 |
|||
+PBRSTID=4 |
|||
+PBRGATD=4 |
|||
@ -1,253 +0,0 @@ |
|||
* PSP 102.5 |
|||
* https://www.cea.fr/cea-tech/leti/pspsupport/Documents/Level%20102.5.0/psp_VA_and_CMC_ref_data.tar.gz |
|||
.model pch pmos level=45 |
|||
+TR=27.0 |
|||
+DTA=0 |
|||
+QMC=1.0 |
|||
+LVARO=-10.0E-9 |
|||
+LVARL=0 |
|||
+LVARW=0 |
|||
+LAP=10.0E-9 |
|||
+WVARO=10.0E-9 |
|||
+WVARL=0 |
|||
+WVARW=0 |
|||
+WOT=0 |
|||
+DLQ=0 |
|||
+DWQ=0 |
|||
+VFBO=-1.1 |
|||
+VFBL=0 |
|||
+VFBW=0 |
|||
+VFBLW=0 |
|||
+STVFBO=5.0E-4 |
|||
+STVFBL=0 |
|||
+STVFBW=0 |
|||
+STVFBLW=0 |
|||
+TOXO=1.5E-9 |
|||
+EPSROXO=3.9 |
|||
+NSUBO=3.0E+23 |
|||
+NSUBW=0 |
|||
+WSEG=1.5E-10 |
|||
+NPCK=1.0E+24 |
|||
+NPCKW=0 |
|||
+WSEGP=0.9E-8 |
|||
+LPCK=5.5E-8 |
|||
+LPCKW=0 |
|||
+FOL1=2.0E-2 |
|||
+FOL2=5.0E-6 |
|||
+VNSUBO=0 |
|||
+NSLPO=0.05 |
|||
+DNSUBO=0 |
|||
+DPHIBO=0 |
|||
+DPHIBL=0 |
|||
+DPHIBLEXP=1.0 |
|||
+DPHIBW=0 |
|||
+DPHIBLW=0 |
|||
+NPO=1.5E+26 |
|||
+NPL=10.0E-18 |
|||
+CTO=5.0E-15 |
|||
+CTL=4.0E-2 |
|||
+CTLEXP=0.6 |
|||
+CTW=0 |
|||
+CTLW=0 |
|||
+TOXOVO=1.5E-9 |
|||
+TOXOVDO=2.0E-9 |
|||
+LOV=10.0E-9 |
|||
+LOVD=0 |
|||
+NOVO=7.5E+25 |
|||
+NOVDO=5.0e+25 |
|||
+CFL=3.0E-4 |
|||
+CFLEXP=2.0 |
|||
+CFW=5.0E-3 |
|||
+CFBO=0.3 |
|||
+UO=3.5E-2 |
|||
+FBET1=-0.3 |
|||
+FBET1W=0.15 |
|||
+LP1=1.5E-7 |
|||
+LP1W=-2.5E-2 |
|||
+FBET2=50.0 |
|||
+LP2=8.5E-10 |
|||
+BETW1=5.0E-2 |
|||
+BETW2=-2.0E-2 |
|||
+WBET=5.0E-10 |
|||
+STBETO=1.75 |
|||
+STBETL=-2.0E-2 |
|||
+STBETW=-2.0E-3 |
|||
+STBETLW=-3.0E-3 |
|||
+MUEO=0.6 |
|||
+MUEW=-1.2E-2 |
|||
+STMUEO=0.5 |
|||
+THEMUO=2.75 |
|||
+STTHEMUO=-0.1 |
|||
+CSO=1.0E-2 |
|||
+CSL=0 |
|||
+CSLEXP=1 |
|||
+CSW=0 |
|||
+CSLW=0 |
|||
+STCSO=-5.0 |
|||
+XCORO=0.15 |
|||
+XCORL=2.0E-3 |
|||
+XCORW=-3.0E-2 |
|||
+XCORLW=-3.5E-3 |
|||
+STXCORO=1.25 |
|||
+FETAO=1 |
|||
+RSW1=50 |
|||
+RSW2=5.0E-2 |
|||
+STRSO=-2.0 |
|||
+RSBO=0 |
|||
+RSGO=0 |
|||
+THESATO=1.0E-6 |
|||
+THESATL=0.6 |
|||
+THESATLEXP=0.75 |
|||
+THESATW=-1.0E-2 |
|||
+THESATLW=0 |
|||
+STTHESATO=1.5 |
|||
+STTHESATL=-2.5E-2 |
|||
+STTHESATW=-2.0E-2 |
|||
+STTHESATLW=-5.0E-3 |
|||
+THESATBO=0.15 |
|||
+THESATGO=0.75 |
|||
+AXO=20 |
|||
+AXL=0.2 |
|||
+ALPL=7.0E-3 |
|||
+ALPLEXP=0.6 |
|||
+ALPW=5.0E-2 |
|||
+ALP1L1=2.5E-2 |
|||
+ALP1LEXP=0.4 |
|||
+ALP1L2=0.1 |
|||
+ALP1W=8.5E-3 |
|||
+ALP2L1=0.5 |
|||
+ALP2LEXP=0 |
|||
+ALP2L2=0.5 |
|||
+ALP2W=-0.2 |
|||
+VPO=0.25 |
|||
+A1O=1.0 |
|||
+A1L=0 |
|||
+A1W=0 |
|||
+A2O=10.0 |
|||
+STA2O=-0.5 |
|||
+A3O=1.0 |
|||
+A3L=0 |
|||
+A3W=0 |
|||
+A4O=0 |
|||
+A4L=0 |
|||
+A4W=0 |
|||
+GCOO=5.0 |
|||
+IGINVLW=50.0 |
|||
+IGOVW=10.0 |
|||
+IGOVDW=0 |
|||
+STIGO=1.5 |
|||
+GC2O=1.0 |
|||
+GC3O=-1.0 |
|||
+CHIBO=3.1 |
|||
+AGIDLW=50.0 |
|||
+AGIDLDW=0 |
|||
+BGIDLO=35.0 |
|||
+BGIDLDO=41 |
|||
+STBGIDLO=-5.0E-4 |
|||
+STBGIDLDO=0 |
|||
+CGIDLO=0.15 |
|||
+CGIDLDO=0 |
|||
+CGBOVL=0 |
|||
+CFRW=5.0E-17 |
|||
+CFRDW=0 |
|||
+FNTO=1 |
|||
+NFALW=8.0E+22 |
|||
+NFBLW=3.0E7 |
|||
+NFCLW=0 |
|||
+RGO=0 |
|||
+RINT=0 |
|||
+RVPOLY=0 |
|||
+RSHG=0 |
|||
+DLSIL=0 |
|||
+RBULKO=0 |
|||
+RWELLO=0 |
|||
+RJUNDO=0 |
|||
+RJUNSO=0 |
|||
+TRJ=27.0 |
|||
+IMAX=1.0E3 |
|||
+VJUNREF=2.5 |
|||
+FJUNQ=0.03 |
|||
+CJORBOT=1.0E-3 |
|||
+CJORSTI=1.0E-9 |
|||
+CJORGAT=0.5E-9 |
|||
+VBIRBOT=0.75 |
|||
+VBIRSTI=1.0 |
|||
+VBIRGAT=0.75 |
|||
+PBOT=0.35 |
|||
+PSTI=0.35 |
|||
+PGAT=0.6 |
|||
+PHIGBOT=1.16 |
|||
+PHIGSTI=1.16 |
|||
+PHIGGAT=1.16 |
|||
+IDSATRBOT=5.0E-9 |
|||
+IDSATRSTI=1.0E-18 |
|||
+IDSATRGAT=1.0E-18 |
|||
+CSRHBOT=5.0E2 |
|||
+CSRHSTI=0 |
|||
+CSRHGAT=1.0E3 |
|||
+XJUNSTI=1.0E-8 |
|||
+XJUNGAT=1.0E-9 |
|||
+CTATBOT=5.0E2 |
|||
+CTATSTI=0 |
|||
+CTATGAT=1.0E3 |
|||
+MEFFTATBOT=0.25 |
|||
+MEFFTATSTI=0.25 |
|||
+MEFFTATGAT=0.25 |
|||
+CBBTBOT=1.0E-12 |
|||
+CBBTSTI=1.0E-18 |
|||
+CBBTGAT=1.0E-18 |
|||
+FBBTRBOT=1.0E9 |
|||
+FBBTRSTI=1.0E9 |
|||
+FBBTRGAT=1.0E9 |
|||
+STFBBTBOT=-1.0E-3 |
|||
+STFBBTSTI=-1.0E-3 |
|||
+STFBBTGAT=-1.0E-2 |
|||
+VBRBOT=10.0 |
|||
+VBRSTI=10.0 |
|||
+VBRGAT=10.0 |
|||
+PBRBOT=3 |
|||
+PBRSTI=4 |
|||
+PBRGAT=3 |
|||
+VJUNREFD=2.5 |
|||
+FJUNQD=0.03 |
|||
+CJORBOTD=1.0E-3 |
|||
+CJORSTID=1.0E-9 |
|||
+CJORGATD=1.0E-9 |
|||
+VBIRBOTD=1.0 |
|||
+VBIRSTID=1.0 |
|||
+VBIRGATD=1.0 |
|||
+PBOTD=0.5 |
|||
+PSTID=0.5 |
|||
+PGATD=0.5 |
|||
+PHIGBOTD=1.16 |
|||
+PHIGSTID=1.16 |
|||
+PHIGGATD=1.16 |
|||
+IDSATRBOTD=1.0E-12 |
|||
+IDSATRSTID=1.0E-18 |
|||
+IDSATRGATD=1.0E-18 |
|||
+CSRHBOTD=1.0E+2 |
|||
+CSRHSTID=1.0E-4 |
|||
+CSRHGATD=1.0E-4 |
|||
+XJUNSTID=1.0E-7 |
|||
+XJUNGATD=1.0E-7 |
|||
+CTATBOTD=1.0E+2 |
|||
+CTATSTID=1.0E-4 |
|||
+CTATGATD=1.0E-4 |
|||
+MEFFTATBOTD=0.25 |
|||
+MEFFTATSTID=0.25 |
|||
+MEFFTATGATD=0.25 |
|||
+CBBTBOTD=1.0E-12 |
|||
+CBBTSTID=1.0E-18 |
|||
+CBBTGATD=1.0E-18 |
|||
+FBBTRBOTD=1.0E9 |
|||
+FBBTRSTID=1.0E9 |
|||
+FBBTRGATD=1.0E9 |
|||
+STFBBTBOTD=-1.0E-3 |
|||
+STFBBTSTID=-1.0E-3 |
|||
+STFBBTGATD=-1.0E-3 |
|||
+VBRBOTD=10.0 |
|||
+VBRSTID=10.0 |
|||
+VBRGATD=10.0 |
|||
+PBRBOTD=4 |
|||
+PBRSTID=4 |
|||
+PBRGATD=4 |
|||
89237
test_cases/test-psp102/c7552_ann_psp.net
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,39 +0,0 @@ |
|||
* PSP models |
|||
* simple inverter |
|||
|
|||
.param Vcc = 1.2 |
|||
.csparam vcc='Vcc' |
|||
|
|||
* Path to the models |
|||
.include psp102_nmos.mod |
|||
.include psp102_pmos.mod |
|||
|
|||
* the voltage sources: |
|||
Vdd vdd gnd DC 'Vcc' |
|||
V1 in gnd pulse(0 'Vcc' 0p 200p 100p 1n 2n) |
|||
Vmeas vss 0 0 |
|||
|
|||
Xnot1 in vdd vss out not1 |
|||
*Rout out 0 1k |
|||
|
|||
.subckt not1 a vdd vss z |
|||
m01 z a vdd vdd pch l=0.1u w=1u as=0.26235 ad=0.26235 ps=2.51 pd=2.51 |
|||
m02 z a vss vss nch l=0.1u w=0.5u as=0.131175 ad=0.131175 ps=1.52 pd=1.52 |
|||
c3 a vss 0.384f |
|||
c2 z vss 0.576f |
|||
.ends |
|||
|
|||
* simulation command: |
|||
.tran 10ps 10ns |
|||
.dc V1 0 'vcc' 'vcc/100' |
|||
|
|||
.control |
|||
run |
|||
*set nolegend |
|||
plot in out |
|||
plot dc1.out |
|||
plot dc1.i(Vmeas) |
|||
rusage |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,33 +0,0 @@ |
|||
psp102 nch output |
|||
* |
|||
vd d 0 dc 0.05 |
|||
vg g 0 dc 0.0 |
|||
vs s 0 dc 0.0 |
|||
vb b 0 dc 0.0 |
|||
am1 d g s b nch |
|||
+L=0.1u |
|||
+W=1u |
|||
+sa=0.0e+00 |
|||
*+sb=0.0e+00 |
|||
*+absource=1.0e-12 |
|||
*+lssource=1.0e-06 |
|||
*+lgsource=1.0e-06 |
|||
*+abdrain=1.0e-12 |
|||
*+lsdrain=1.0e-06 |
|||
*+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
* |
|||
.option temp=21 |
|||
|
|||
*.include Modelcards/psp103_nmos-2.mod |
|||
.include Modelcards/psp102_nmos.mod |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/psp102.osdi |
|||
dc vd 0 2.0 0.05 vg 0 1.5 0.25 |
|||
plot i(vs) |
|||
dc vg 0 1.5 0.05 vb 0 -3.0 -1 |
|||
plot i(vs) |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,33 +0,0 @@ |
|||
psp103 pch output |
|||
* |
|||
vd d 0 dc -0.1 |
|||
vg g 0 dc 0.0 |
|||
vs s 0 dc 0.0 |
|||
vb b 0 dc 0.0 |
|||
am1 d g s b pch |
|||
+l=1u |
|||
+w=10u |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
* |
|||
.option temp=21 |
|||
.control |
|||
pre_osdi test_osdi_win/psp103.osdi |
|||
dc vd 0 -2.0 -0.05 vg 0 -1.5 -0.25 ; saturation |
|||
plot i(vs) |
|||
dc vg 0 -1.5 -0.05 vb 0 3.0 1 |
|||
plot i(vs) |
|||
.endc |
|||
* |
|||
|
|||
.include Modelcards/psp103_pmos-2.mod |
|||
|
|||
|
|||
.end |
|||
@ -1,41 +0,0 @@ |
|||
* PSP models |
|||
* simple 5-stage ring oscillator |
|||
|
|||
.param Vcc = 1.2 |
|||
.csparam vcc='Vcc' |
|||
|
|||
* Path to the models |
|||
.include psp102_nmos.mod |
|||
.include psp102_pmos.mod |
|||
|
|||
* the voltage sources: |
|||
Vdd vdd gnd DC 'Vcc' |
|||
V1 in gnd pulse(0 'Vcc' 0p 200p 100p 1n 2n) |
|||
Vmeas vss 0 0 |
|||
|
|||
Xnot1 in vdd vss in2 not1 |
|||
Xnot2 in2 vdd vss in3 not1 |
|||
Xnot3 in3 vdd vss in4 not1 |
|||
Xnot4 in4 vdd vss in5 not1 |
|||
Xnot5 in5 vdd vss in not1 |
|||
|
|||
*Rout out 0 1k |
|||
|
|||
.subckt not1 a vdd vss z |
|||
m01 z a vdd vdd pch l=0.1u w=1u as=0.26235 ad=0.26235 ps=2.51 pd=2.51 |
|||
m02 z a vss vss nch l=0.1u w=0.5u as=0.131175 ad=0.131175 ps=1.52 pd=1.52 |
|||
c3 a vss 0.384f |
|||
c2 z vss 0.576f |
|||
.ends |
|||
|
|||
* simulation command: |
|||
.tran 10p 10n uic |
|||
|
|||
.control |
|||
run |
|||
set xbrushwidth=3 |
|||
plot in |
|||
rusage |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,30 +0,0 @@ |
|||
psp102 nch transfer |
|||
* |
|||
vd d 0 dc 0.1 |
|||
vg g 0 dc 0.0 |
|||
vs s 0 dc 0.0 |
|||
vb b 0 dc 0.0 |
|||
m1 d g s b nch |
|||
+l=1.0e-06 |
|||
+w=10.0e-06 |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
* |
|||
.option temp=21 |
|||
.control |
|||
dc vg 0 1.5 0.02 vb -3 0 0.5 |
|||
plot abs(i(vd)) |
|||
dc vg 0 1.5 0.01 vb -3 0 0.5 |
|||
plot abs(i(vd)) ylog ylimit 1e-12 1e-03 |
|||
.endc |
|||
* |
|||
.include psp102_nmos.mod |
|||
|
|||
.end |
|||
@ -1,283 +0,0 @@ |
|||
* psp_VA_and_CMC_ref_data 103.3.0 asym_nmos_t |
|||
* LEVEL=103.0 |
|||
* https://www.cea.fr/cea-tech/leti/pspsupport/Documents/Level%20103.3.3/psp_VA_and_CMC_ref_data.tar.gz |
|||
.model nch psp103va level=69 |
|||
+type=1 |
|||
+TR=27.0 |
|||
+DTA=0 |
|||
+SWGEO=1 |
|||
+QMC=1.0 |
|||
+LVARO=-10.0E-9 |
|||
+LVARL=0 |
|||
+LVARW=0 |
|||
+LAP=10.0E-9 |
|||
+WVARO=10.0E-9 |
|||
+WVARL=0 |
|||
+WVARW=0 |
|||
+WOT=0 |
|||
+DLQ=0 |
|||
+DWQ=0 |
|||
+VFBO=-1.1 |
|||
+VFBL=0 |
|||
+VFBW=0 |
|||
+VFBLW=0 |
|||
+STVFBO=5.0E-4 |
|||
+STVFBL=0 |
|||
+STVFBW=0 |
|||
+STVFBLW=0 |
|||
+TOXO=1.5E-9 |
|||
+EPSROXO=3.9 |
|||
+NSUBO=3.0E+23 |
|||
+NSUBW=0 |
|||
+WSEG=1.5E-10 |
|||
+NPCK=1.0E+24 |
|||
+NPCKW=0 |
|||
+WSEGP=0.9E-8 |
|||
+LPCK=5.5E-8 |
|||
+LPCKW=0 |
|||
+FOL1=2.0E-2 |
|||
+FOL2=5.0E-6 |
|||
+FACNEFFACO=0.8 |
|||
+FACNEFFACL=0 |
|||
+FACNEFFACW=0 |
|||
+FACNEFFACLW=0 |
|||
+GFACNUDO=0.1 |
|||
+GFACNUDL=0 |
|||
+GFACNUDLEXP=1 |
|||
+GFACNUDW=0 |
|||
+GFACNUDLW=0 |
|||
+VSBNUDO=0 |
|||
+DVSBNUDO=1 |
|||
+VNSUBO=0 |
|||
+NSLPO=0.05 |
|||
+DNSUBO=0 |
|||
+DPHIBO=0 |
|||
+DPHIBL=0 |
|||
+DPHIBLEXP=1.0 |
|||
+DPHIBW=0 |
|||
+DPHIBLW=0 |
|||
+DELVTACO=0 |
|||
+DELVTACL=0 |
|||
+DELVTACLEXP=1 |
|||
+DELVTACW=0 |
|||
+DELVTACLW=0 |
|||
+NPO=1.5E+26 |
|||
+NPL=10.0E-18 |
|||
+CTO=5.0E-15 |
|||
+CTL=4.0E-2 |
|||
+CTLEXP=0.6 |
|||
+CTW=0 |
|||
+CTLW=0 |
|||
+TOXOVO=1.5E-9 |
|||
+TOXOVDO=2.0E-9 |
|||
+LOV=10.0E-9 |
|||
+LOVD=0 |
|||
+NOVO=7.5E+25 |
|||
+NOVDO=5.0e+25 |
|||
+CFL=3.0E-4 |
|||
+CFLEXP=2.0 |
|||
+CFW=5.0E-3 |
|||
+CFBO=0.3 |
|||
+UO=3.5E-2 |
|||
+FBET1=-0.3 |
|||
+FBET1W=0.15 |
|||
+LP1=1.5E-7 |
|||
+LP1W=-2.5E-2 |
|||
+FBET2=50.0 |
|||
+LP2=8.5E-10 |
|||
+BETW1=5.0E-2 |
|||
+BETW2=-2.0E-2 |
|||
+WBET=5.0E-10 |
|||
+STBETO=1.75 |
|||
+STBETL=-2.0E-2 |
|||
+STBETW=-2.0E-3 |
|||
+STBETLW=-3.0E-3 |
|||
+MUEO=0.6 |
|||
+MUEW=-1.2E-2 |
|||
+STMUEO=0.5 |
|||
+THEMUO=2.75 |
|||
+STTHEMUO=-0.1 |
|||
+CSO=1.0E-2 |
|||
+CSL=0 |
|||
+CSLEXP=1 |
|||
+CSW=0 |
|||
+CSLW=0 |
|||
+STCSO=-5.0 |
|||
+XCORO=0.15 |
|||
+XCORL=2.0E-3 |
|||
+XCORW=-3.0E-2 |
|||
+XCORLW=-3.5E-3 |
|||
+STXCORO=1.25 |
|||
+FETAO=1 |
|||
+RSW1=50 |
|||
+RSW2=5.0E-2 |
|||
+STRSO=-2.0 |
|||
+RSBO=0 |
|||
+RSGO=0 |
|||
+THESATO=1.0E-6 |
|||
+THESATL=0.6 |
|||
+THESATLEXP=0.75 |
|||
+THESATW=-1.0E-2 |
|||
+THESATLW=0 |
|||
+STTHESATO=1.5 |
|||
+STTHESATL=-2.5E-2 |
|||
+STTHESATW=-2.0E-2 |
|||
+STTHESATLW=-5.0E-3 |
|||
+THESATBO=0.15 |
|||
+THESATGO=0.75 |
|||
+AXO=20 |
|||
+AXL=0.2 |
|||
+ALPL=7.0E-3 |
|||
+ALPLEXP=0.6 |
|||
+ALPW=5.0E-2 |
|||
+ALP1L1=2.5E-2 |
|||
+ALP1LEXP=0.4 |
|||
+ALP1L2=0.1 |
|||
+ALP1W=8.5E-3 |
|||
+ALP2L1=0.5 |
|||
+ALP2LEXP=0 |
|||
+ALP2L2=0.5 |
|||
+ALP2W=-0.2 |
|||
+VPO=0.25 |
|||
+A1O=1.0 |
|||
+A1L=0 |
|||
+A1W=0 |
|||
+A2O=10.0 |
|||
+STA2O=-0.5 |
|||
+A3O=1.0 |
|||
+A3L=0 |
|||
+A3W=0 |
|||
+A4O=0 |
|||
+A4L=0 |
|||
+A4W=0 |
|||
+GCOO=5.0 |
|||
+IGINVLW=50.0 |
|||
+IGOVW=10.0 |
|||
+IGOVDW=0 |
|||
+STIGO=1.5 |
|||
+GC2O=1.0 |
|||
+GC3O=-1.0 |
|||
+CHIBO=3.1 |
|||
+AGIDLW=50.0 |
|||
+AGIDLDW=0 |
|||
+BGIDLO=35.0 |
|||
+BGIDLDO=41 |
|||
+STBGIDLO=-5.0E-4 |
|||
+STBGIDLDO=0 |
|||
+CGIDLO=0.15 |
|||
+CGIDLDO=0 |
|||
+CGBOVL=0 |
|||
+CFRW=5.0E-17 |
|||
+CFRDW=0 |
|||
+FNTO=1 |
|||
+NFALW=8.0E+22 |
|||
+NFBLW=3.0E7 |
|||
+NFCLW=0 |
|||
+RGO=0 |
|||
+RINT=0 |
|||
+RVPOLY=0 |
|||
+RSHG=0 |
|||
+DLSIL=0 |
|||
+RBULKO=0 |
|||
+RWELLO=0 |
|||
+RJUNDO=0 |
|||
+RJUNSO=0 |
|||
+SWJUNEXP=0 |
|||
+TRJ=27.0 |
|||
+IMAX=1.0E3 |
|||
+VJUNREF=2.5 |
|||
+FJUNQ=0.03 |
|||
+CJORBOT=1.0E-3 |
|||
+CJORSTI=1.0E-9 |
|||
+CJORGAT=0.5E-9 |
|||
+VBIRBOT=0.75 |
|||
+VBIRSTI=1.0 |
|||
+VBIRGAT=0.75 |
|||
+PBOT=0.35 |
|||
+PSTI=0.35 |
|||
+PGAT=0.6 |
|||
+PHIGBOT=1.16 |
|||
+PHIGSTI=1.16 |
|||
+PHIGGAT=1.16 |
|||
+IDSATRBOT=5.0E-9 |
|||
+IDSATRSTI=1.0E-18 |
|||
+IDSATRGAT=1.0E-18 |
|||
+CSRHBOT=5.0E2 |
|||
+CSRHSTI=0 |
|||
+CSRHGAT=1.0E3 |
|||
+XJUNSTI=1.0E-8 |
|||
+XJUNGAT=1.0E-9 |
|||
+CTATBOT=5.0E2 |
|||
+CTATSTI=0 |
|||
+CTATGAT=1.0E3 |
|||
+MEFFTATBOT=0.25 |
|||
+MEFFTATSTI=0.25 |
|||
+MEFFTATGAT=0.25 |
|||
+CBBTBOT=1.0E-12 |
|||
+CBBTSTI=1.0E-18 |
|||
+CBBTGAT=1.0E-18 |
|||
+FBBTRBOT=1.0E9 |
|||
+FBBTRSTI=1.0E9 |
|||
+FBBTRGAT=1.0E9 |
|||
+STFBBTBOT=-1.0E-3 |
|||
+STFBBTSTI=-1.0E-3 |
|||
+STFBBTGAT=-1.0E-2 |
|||
+VBRBOT=10.0 |
|||
+VBRSTI=10.0 |
|||
+VBRGAT=10.0 |
|||
+PBRBOT=3 |
|||
+PBRSTI=4 |
|||
+PBRGAT=3 |
|||
+VJUNREFD=2.5 |
|||
+FJUNQD=0.03 |
|||
+CJORBOTD=1.0E-3 |
|||
+CJORSTID=1.0E-9 |
|||
+CJORGATD=1.0E-9 |
|||
+VBIRBOTD=1.0 |
|||
+VBIRSTID=1.0 |
|||
+VBIRGATD=1.0 |
|||
+PBOTD=0.5 |
|||
+PSTID=0.5 |
|||
+PGATD=0.5 |
|||
+PHIGBOTD=1.16 |
|||
+PHIGSTID=1.16 |
|||
+PHIGGATD=1.16 |
|||
+IDSATRBOTD=1.0E-12 |
|||
+IDSATRSTID=1.0E-18 |
|||
+IDSATRGATD=1.0E-18 |
|||
+CSRHBOTD=1.0E+2 |
|||
+CSRHSTID=1.0E-4 |
|||
+CSRHGATD=1.0E-4 |
|||
+XJUNSTID=1.0E-7 |
|||
+XJUNGATD=1.0E-7 |
|||
+CTATBOTD=1.0E+2 |
|||
+CTATSTID=1.0E-4 |
|||
+CTATGATD=1.0E-4 |
|||
+MEFFTATBOTD=0.25 |
|||
+MEFFTATSTID=0.25 |
|||
+MEFFTATGATD=0.25 |
|||
+CBBTBOTD=1.0E-12 |
|||
+CBBTSTID=1.0E-18 |
|||
+CBBTGATD=1.0E-18 |
|||
+FBBTRBOTD=1.0E9 |
|||
+FBBTRSTID=1.0E9 |
|||
+FBBTRGATD=1.0E9 |
|||
+STFBBTBOTD=-1.0E-3 |
|||
+STFBBTSTID=-1.0E-3 |
|||
+STFBBTGATD=-1.0E-3 |
|||
+VBRBOTD=10.0 |
|||
+VBRSTID=10.0 |
|||
+VBRGATD=10.0 |
|||
+PBRBOTD=4 |
|||
+PBRSTID=4 |
|||
+PBRGATD=4 |
|||
* thermal parameters |
|||
*+RTHO=1.1E4 |
|||
*+RTHW1=990.5 |
|||
*+RTHW2=14.4 |
|||
*+RTHLW=15.0 |
|||
*+CTHO =1.0E-7 |
|||
*+CTHW1=1.0e-8 |
|||
*+CTHW2=1.5 |
|||
*+CTHLW=4.0 |
|||
*+STRTHO=1.3 |
|||
@ -1,283 +0,0 @@ |
|||
* psp_VA_and_CMC_ref_data 103.3.0 asym_pmos_t |
|||
* LEVEL=103.0 |
|||
* https://www.cea.fr/cea-tech/leti/pspsupport/Documents/Level%20103.3.3/psp_VA_and_CMC_ref_data.tar.gz |
|||
.model pch psp103va level=69 |
|||
+TYPE=-1 |
|||
+TR=27.0 |
|||
+DTA=0 |
|||
+SWGEO=1 |
|||
+QMC=1.0 |
|||
+LVARO=-10.0E-9 |
|||
+LVARL=0 |
|||
+LVARW=0 |
|||
+LAP=10.0E-9 |
|||
+WVARO=10.0E-9 |
|||
+WVARL=0 |
|||
+WVARW=0 |
|||
+WOT=0 |
|||
+DLQ=0 |
|||
+DWQ=0 |
|||
+VFBO=-1.1 |
|||
+VFBL=0 |
|||
+VFBW=0 |
|||
+VFBLW=0 |
|||
+STVFBO=5.0E-4 |
|||
+STVFBL=0 |
|||
+STVFBW=0 |
|||
+STVFBLW=0 |
|||
+TOXO=1.5E-9 |
|||
+EPSROXO=3.9 |
|||
+NSUBO=3.0E+23 |
|||
+NSUBW=0 |
|||
+WSEG=1.5E-10 |
|||
+NPCK=1.0E+24 |
|||
+NPCKW=0 |
|||
+WSEGP=0.9E-8 |
|||
+LPCK=5.5E-8 |
|||
+LPCKW=0 |
|||
+FOL1=2.0E-2 |
|||
+FOL2=5.0E-6 |
|||
+FACNEFFACO=0.8 |
|||
+FACNEFFACL=0 |
|||
+FACNEFFACW=0 |
|||
+FACNEFFACLW=0 |
|||
+GFACNUDO=0.1 |
|||
+GFACNUDL=0 |
|||
+GFACNUDLEXP=1 |
|||
+GFACNUDW=0 |
|||
+GFACNUDLW=0 |
|||
+VSBNUDO=0 |
|||
+DVSBNUDO=1 |
|||
+VNSUBO=0 |
|||
+NSLPO=0.05 |
|||
+DNSUBO=0 |
|||
+DPHIBO=0 |
|||
+DPHIBL=0 |
|||
+DPHIBLEXP=1.0 |
|||
+DPHIBW=0 |
|||
+DPHIBLW=0 |
|||
+DELVTACO=0 |
|||
+DELVTACL=0 |
|||
+DELVTACLEXP=1 |
|||
+DELVTACW=0 |
|||
+DELVTACLW=0 |
|||
+NPO=1.5E+26 |
|||
+NPL=10.0E-18 |
|||
+CTO=5.0E-15 |
|||
+CTL=4.0E-2 |
|||
+CTLEXP=0.6 |
|||
+CTW=0 |
|||
+CTLW=0 |
|||
+TOXOVO=1.5E-9 |
|||
+TOXOVDO=2.0E-9 |
|||
+LOV=10.0E-9 |
|||
+LOVD=0 |
|||
+NOVO=7.5E+25 |
|||
+NOVDO=5.0e+25 |
|||
+CFL=3.0E-4 |
|||
+CFLEXP=2.0 |
|||
+CFW=5.0E-3 |
|||
+CFBO=0.3 |
|||
+UO=3.5E-2 |
|||
+FBET1=-0.3 |
|||
+FBET1W=0.15 |
|||
+LP1=1.5E-7 |
|||
+LP1W=-2.5E-2 |
|||
+FBET2=50.0 |
|||
+LP2=8.5E-10 |
|||
+BETW1=5.0E-2 |
|||
+BETW2=-2.0E-2 |
|||
+WBET=5.0E-10 |
|||
+STBETO=1.75 |
|||
+STBETL=-2.0E-2 |
|||
+STBETW=-2.0E-3 |
|||
+STBETLW=-3.0E-3 |
|||
+MUEO=0.6 |
|||
+MUEW=-1.2E-2 |
|||
+STMUEO=0.5 |
|||
+THEMUO=2.75 |
|||
+STTHEMUO=-0.1 |
|||
+CSO=1.0E-2 |
|||
+CSL=0 |
|||
+CSLEXP=1 |
|||
+CSW=0 |
|||
+CSLW=0 |
|||
+STCSO=-5.0 |
|||
+XCORO=0.15 |
|||
+XCORL=2.0E-3 |
|||
+XCORW=-3.0E-2 |
|||
+XCORLW=-3.5E-3 |
|||
+STXCORO=1.25 |
|||
+FETAO=1 |
|||
+RSW1=50 |
|||
+RSW2=5.0E-2 |
|||
+STRSO=-2.0 |
|||
+RSBO=0 |
|||
+RSGO=0 |
|||
+THESATO=1.0E-6 |
|||
+THESATL=0.6 |
|||
+THESATLEXP=0.75 |
|||
+THESATW=-1.0E-2 |
|||
+THESATLW=0 |
|||
+STTHESATO=1.5 |
|||
+STTHESATL=-2.5E-2 |
|||
+STTHESATW=-2.0E-2 |
|||
+STTHESATLW=-5.0E-3 |
|||
+THESATBO=0.15 |
|||
+THESATGO=0.75 |
|||
+AXO=20 |
|||
+AXL=0.2 |
|||
+ALPL=7.0E-3 |
|||
+ALPLEXP=0.6 |
|||
+ALPW=5.0E-2 |
|||
+ALP1L1=2.5E-2 |
|||
+ALP1LEXP=0.4 |
|||
+ALP1L2=0.1 |
|||
+ALP1W=8.5E-3 |
|||
+ALP2L1=0.5 |
|||
+ALP2LEXP=0 |
|||
+ALP2L2=0.5 |
|||
+ALP2W=-0.2 |
|||
+VPO=0.25 |
|||
+A1O=1.0 |
|||
+A1L=0 |
|||
+A1W=0 |
|||
+A2O=10.0 |
|||
+STA2O=-0.5 |
|||
+A3O=1.0 |
|||
+A3L=0 |
|||
+A3W=0 |
|||
+A4O=0 |
|||
+A4L=0 |
|||
+A4W=0 |
|||
+GCOO=5.0 |
|||
+IGINVLW=50.0 |
|||
+IGOVW=10.0 |
|||
+IGOVDW=0 |
|||
+STIGO=1.5 |
|||
+GC2O=1.0 |
|||
+GC3O=-1.0 |
|||
+CHIBO=3.1 |
|||
+AGIDLW=50.0 |
|||
+AGIDLDW=0 |
|||
+BGIDLO=35.0 |
|||
+BGIDLDO=41 |
|||
+STBGIDLO=-5.0E-4 |
|||
+STBGIDLDO=0 |
|||
+CGIDLO=0.15 |
|||
+CGIDLDO=0 |
|||
+CGBOVL=0 |
|||
+CFRW=5.0E-17 |
|||
+CFRDW=0 |
|||
+FNTO=1 |
|||
+NFALW=8.0E+22 |
|||
+NFBLW=3.0E7 |
|||
+NFCLW=0 |
|||
+RGO=0 |
|||
+RINT=0 |
|||
+RVPOLY=0 |
|||
+RSHG=0 |
|||
+DLSIL=0 |
|||
+RBULKO=0 |
|||
+RWELLO=0 |
|||
+RJUNDO=0 |
|||
+RJUNSO=0 |
|||
+SWJUNEXP=0 |
|||
+TRJ=27.0 |
|||
+IMAX=1.0E3 |
|||
+VJUNREF=2.5 |
|||
+FJUNQ=0.03 |
|||
+CJORBOT=1.0E-3 |
|||
+CJORSTI=1.0E-9 |
|||
+CJORGAT=0.5E-9 |
|||
+VBIRBOT=0.75 |
|||
+VBIRSTI=1.0 |
|||
+VBIRGAT=0.75 |
|||
+PBOT=0.35 |
|||
+PSTI=0.35 |
|||
+PGAT=0.6 |
|||
+PHIGBOT=1.16 |
|||
+PHIGSTI=1.16 |
|||
+PHIGGAT=1.16 |
|||
+IDSATRBOT=5.0E-9 |
|||
+IDSATRSTI=1.0E-18 |
|||
+IDSATRGAT=1.0E-18 |
|||
+CSRHBOT=5.0E2 |
|||
+CSRHSTI=0 |
|||
+CSRHGAT=1.0E3 |
|||
+XJUNSTI=1.0E-8 |
|||
+XJUNGAT=1.0E-9 |
|||
+CTATBOT=5.0E2 |
|||
+CTATSTI=0 |
|||
+CTATGAT=1.0E3 |
|||
+MEFFTATBOT=0.25 |
|||
+MEFFTATSTI=0.25 |
|||
+MEFFTATGAT=0.25 |
|||
+CBBTBOT=1.0E-12 |
|||
+CBBTSTI=1.0E-18 |
|||
+CBBTGAT=1.0E-18 |
|||
+FBBTRBOT=1.0E9 |
|||
+FBBTRSTI=1.0E9 |
|||
+FBBTRGAT=1.0E9 |
|||
+STFBBTBOT=-1.0E-3 |
|||
+STFBBTSTI=-1.0E-3 |
|||
+STFBBTGAT=-1.0E-2 |
|||
+VBRBOT=10.0 |
|||
+VBRSTI=10.0 |
|||
+VBRGAT=10.0 |
|||
+PBRBOT=3 |
|||
+PBRSTI=4 |
|||
+PBRGAT=3 |
|||
+VJUNREFD=2.5 |
|||
+FJUNQD=0.03 |
|||
+CJORBOTD=1.0E-3 |
|||
+CJORSTID=1.0E-9 |
|||
+CJORGATD=1.0E-9 |
|||
+VBIRBOTD=1.0 |
|||
+VBIRSTID=1.0 |
|||
+VBIRGATD=1.0 |
|||
+PBOTD=0.5 |
|||
+PSTID=0.5 |
|||
+PGATD=0.5 |
|||
+PHIGBOTD=1.16 |
|||
+PHIGSTID=1.16 |
|||
+PHIGGATD=1.16 |
|||
+IDSATRBOTD=1.0E-12 |
|||
+IDSATRSTID=1.0E-18 |
|||
+IDSATRGATD=1.0E-18 |
|||
+CSRHBOTD=1.0E+2 |
|||
+CSRHSTID=1.0E-4 |
|||
+CSRHGATD=1.0E-4 |
|||
+XJUNSTID=1.0E-7 |
|||
+XJUNGATD=1.0E-7 |
|||
+CTATBOTD=1.0E+2 |
|||
+CTATSTID=1.0E-4 |
|||
+CTATGATD=1.0E-4 |
|||
+MEFFTATBOTD=0.25 |
|||
+MEFFTATSTID=0.25 |
|||
+MEFFTATGATD=0.25 |
|||
+CBBTBOTD=1.0E-12 |
|||
+CBBTSTID=1.0E-18 |
|||
+CBBTGATD=1.0E-18 |
|||
+FBBTRBOTD=1.0E9 |
|||
+FBBTRSTID=1.0E9 |
|||
+FBBTRGATD=1.0E9 |
|||
+STFBBTBOTD=-1.0E-3 |
|||
+STFBBTSTID=-1.0E-3 |
|||
+STFBBTGATD=-1.0E-3 |
|||
+VBRBOTD=10.0 |
|||
+VBRSTID=10.0 |
|||
+VBRGATD=10.0 |
|||
+PBRBOTD=4 |
|||
+PBRSTID=4 |
|||
+PBRGATD=4 |
|||
* thermal parameters |
|||
*+RTHO=1.1E4 |
|||
*+RTHW1=990.5 |
|||
*+RTHW2=14.4 |
|||
*+RTHLW=15.0 |
|||
*+CTHO =1.0E-7 |
|||
*+CTHW1=1.0e-8 |
|||
*+CTHW2=1.5 |
|||
*+CTHLW=4.0 |
|||
*+STRTHO=1.3 |
|||
89240
test_cases/test-psp103/c7552_ann_psp.net
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,65 +0,0 @@ |
|||
* PSP models |
|||
* simple inverter |
|||
|
|||
.param Vcc = 1.2 |
|||
.csparam vcc='Vcc' |
|||
|
|||
* Path to the models |
|||
.include Modelcards/psp103_nmos.mod |
|||
.include Modelcards/psp103_pmos-2.mod |
|||
|
|||
* the voltage sources: |
|||
Vdd vdd gnd DC 'Vcc' |
|||
V1 in gnd pulse(0 'Vcc' 0p 200p 100p 1n 2n) |
|||
Vmeas vss 0 0 |
|||
|
|||
Xnot1 in vdd vss out not1 |
|||
*Rout out 0 1k |
|||
|
|||
.subckt not1 a vdd vss z |
|||
*m01 z a vdd vdd pch l=0.1u w=1u as=0.26235 ad=0.26235 ps=2.51 pd=2.51 |
|||
nmp1 z a vdd vdd pch |
|||
+l=0.1u |
|||
+w=1u |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
|
|||
*m02 z a vss vss nch l=0.1u w=0.5u as=0.131175 ad=0.131175 ps=1.52 pd=1.52 |
|||
nmn1 z a vss vss nch |
|||
+l=0.1u |
|||
+w=1u |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
c3 a vss 0.384f |
|||
c2 z vss 0.576f |
|||
.ends |
|||
|
|||
* simulation command: |
|||
.tran 10ps 10ns |
|||
.dc V1 0 'vcc' 'vcc/100' |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/psp103.osdi |
|||
run |
|||
*set nolegend |
|||
plot in out |
|||
plot dc1.out |
|||
plot dc1.i(Vmeas) |
|||
rusage |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,33 +0,0 @@ |
|||
psp103 nch output |
|||
* |
|||
vd d 0 dc 0.05 |
|||
vg g 0 dc 0.0 |
|||
vs s 0 dc 0.0 |
|||
vb b 0 dc 0.0 |
|||
nm1 d g s b nch |
|||
+l=0.1u |
|||
+w=1u |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
* |
|||
.option temp=21 |
|||
|
|||
.include Modelcards/psp103_nmos-2.mod |
|||
*.include Modelcards/psp103_nmos.mod |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/psp103.osdi |
|||
dc vd 0 2.0 0.05 vg 0 1.5 0.25 |
|||
plot i(vs) |
|||
dc vg 0 1.5 0.05 vb 0 -3.0 -1 |
|||
plot i(vs) |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,33 +0,0 @@ |
|||
psp103 pch output |
|||
* |
|||
vd d 0 dc -0.1 |
|||
vg g 0 dc 0.0 |
|||
vs s 0 dc 0.0 |
|||
vb b 0 dc 0.0 |
|||
nm1 d g s b pch |
|||
+l=0.1u |
|||
+w=1u |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
* |
|||
.option temp=21 |
|||
.control |
|||
pre_osdi test_osdi_win/psp103.osdi |
|||
dc vd 0 -2.0 -0.05 vg 0 -1.5 -0.25 ; saturation |
|||
plot i(vs) |
|||
dc vg 0 -1.5 -0.05 vb 0 3.0 1 |
|||
plot i(vs) |
|||
.endc |
|||
* |
|||
|
|||
.include Modelcards/psp103_pmos-2.mod |
|||
|
|||
|
|||
.end |
|||
@ -1,66 +0,0 @@ |
|||
* PSP models |
|||
* simple 5-stage ring oscillator |
|||
|
|||
.param Vcc = 1.2 |
|||
.csparam vcc='Vcc' |
|||
|
|||
* Path to the models |
|||
.include Modelcards/psp103_nmos-2.mod |
|||
.include Modelcards/psp103_pmos-2.mod |
|||
|
|||
* the voltage sources: |
|||
Vdd vdd gnd DC 'Vcc' |
|||
V1 in gnd pulse(0 'Vcc' 0p 200p 100p 1n 2n) |
|||
Vmeas vss 0 0 |
|||
|
|||
Xnot1 in vdd vss in2 not1 |
|||
Xnot2 in2 vdd vss in3 not1 |
|||
Xnot3 in3 vdd vss in4 not1 |
|||
Xnot4 in4 vdd vss in5 not1 |
|||
Xnot5 in5 vdd vss in not1 |
|||
|
|||
*Rout out 0 1k |
|||
|
|||
.subckt not1 a vdd vss z |
|||
*m01 z a vdd vdd pch l=0.1u w=1u as=0.26235 ad=0.26235 ps=2.51 pd=2.51 |
|||
nmp1 z a vdd vdd pch |
|||
+l=0.1u |
|||
+w=1u |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
*m02 z a vss vss nch l=0.1u w=0.5u as=0.131175 ad=0.131175 ps=1.52 pd=1.52 |
|||
nmn1 z a vss vss nch |
|||
+l=0.1u |
|||
+w=1u |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
c3 a vss 0.384f |
|||
c2 z vss 0.576f |
|||
.ends |
|||
|
|||
* simulation command: |
|||
.tran 10p 10n uic |
|||
|
|||
.control |
|||
pre_osdi test_osdi_win/psp103.osdi |
|||
run |
|||
set xbrushwidth=3 |
|||
plot in |
|||
rusage |
|||
.endc |
|||
|
|||
.end |
|||
@ -1,31 +0,0 @@ |
|||
psp103 nch transfer |
|||
* |
|||
vd d 0 dc 0.1 |
|||
vg g 0 dc 0.0 |
|||
vs s 0 dc 0.0 |
|||
vb b 0 dc 0.0 |
|||
nm1 d g s b nch |
|||
+l=1.0e-06 |
|||
+w=10.0e-06 |
|||
+sa=0.0e+00 |
|||
+sb=0.0e+00 |
|||
+absource=1.0e-12 |
|||
+lssource=1.0e-06 |
|||
+lgsource=1.0e-06 |
|||
+abdrain=1.0e-12 |
|||
+lsdrain=1.0e-06 |
|||
+lgdrain=1.0e-06 |
|||
+mult=1.0e+00 |
|||
* |
|||
.option temp=21 |
|||
.control |
|||
pre_osdi test_osdi_win/psp103.osdi |
|||
dc vg 0 1.5 0.02 vb -3 0 0.5 |
|||
plot abs(i(vd)) |
|||
dc vg 0 1.5 0.01 vb -3 0 0.5 |
|||
plot abs(i(vd)) ylog ylimit 1e-12 1e-03 |
|||
.endc |
|||
* |
|||
.include Modelcards/psp103_nmos-2.mod |
|||
|
|||
.end |
|||
@ -1,586 +0,0 @@ |
|||
#this file defines some common routines used by the OSDI test cases |
|||
import os |
|||
import shutil |
|||
import glob |
|||
from pathlib import Path |
|||
from typing import Optional, List, Dict, Tuple |
|||
import regex as re |
|||
from subprocess import run, PIPE |
|||
import pandas as pd |
|||
import numpy as np |
|||
from math import atan2 |
|||
import sys |
|||
|
|||
# specify location of Ngspice executable to be tested |
|||
directory_testing = os.path.dirname(__file__) |
|||
ngspice_path = os.path.join(directory_testing, "../release/src/ngspice") |
|||
ngspice_path = os.path.abspath(ngspice_path) |
|||
|
|||
rtol = 0.032 |
|||
atol_dc = 1e-14 |
|||
atol_ac = 4e-19 |
|||
|
|||
twoPi = 8.0*atan2(1.0,1.0) |
|||
|
|||
def create_shared_objects(directory): |
|||
c_files = [] |
|||
for c_file in glob.glob(directory + "/*.c"): |
|||
basename = Path(c_file).stem |
|||
c_files.append(basename) |
|||
|
|||
for c_file in c_files: |
|||
run( |
|||
[ |
|||
"gcc", |
|||
"-c", |
|||
"-Wall", |
|||
"-I", |
|||
"../../src/osdi/", |
|||
"-fpic", |
|||
c_file + ".c", |
|||
"-ggdb", |
|||
], |
|||
cwd=directory, |
|||
) |
|||
run( |
|||
["gcc", "-shared", "-o", c_file + ".osdi", c_file + ".o", "-ggdb"], |
|||
cwd=directory, |
|||
) |
|||
run( |
|||
["mv", c_file + ".osdi", "test_osdi/" + c_file + ".osdi"], cwd=directory |
|||
) |
|||
run(["rm", c_file + ".o"], cwd=directory) |
|||
|
|||
# for va_file in glob.glob(directory + "/*.va"): |
|||
# result = run( |
|||
# [ |
|||
# "openvaf","-b", va_file |
|||
# ], |
|||
# # capture_output=True, |
|||
# cwd=directory, |
|||
# ) |
|||
|
|||
# run( |
|||
# ["cp", result.stdout[:-1], "test_osdi/" + Path(va_file).stem + ".osdi"], cwd=directory |
|||
# ) |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
def prepare_dirs(directory): |
|||
# directories for test cases |
|||
dir_osdi = os.path.join(directory, "test_osdi") |
|||
dir_built_in = os.path.join(directory, "test_built_in") |
|||
|
|||
for directory_i in [dir_osdi, dir_built_in]: |
|||
# remove old results |
|||
shutil.rmtree(directory_i, ignore_errors=True) |
|||
# make new directories |
|||
os.makedirs(directory_i, exist_ok=True) |
|||
|
|||
|
|||
return dir_osdi, dir_built_in |
|||
|
|||
def prepare_netlists(directory): |
|||
path_netlist = os.path.join(directory, "netlist.sp") |
|||
|
|||
# directories for test cases |
|||
dir_osdi = os.path.join(directory, "test_osdi") |
|||
dir_built_in = os.path.join(directory, "test_built_in") |
|||
|
|||
# open netlist and activate Ngspice devices |
|||
with open(path_netlist) as netlist_handle: |
|||
netlist_raw = netlist_handle.read() |
|||
|
|||
netlist_osdi = netlist_raw.replace("*OSDI_ACTIVATE*", "") |
|||
netlist_built_in = netlist_raw.replace("*BUILT_IN_ACTIVATE*", "") |
|||
|
|||
# write netlists |
|||
with open(os.path.join(dir_osdi, "netlist.sp"), "w") as netlist_handle: |
|||
netlist_handle.write(netlist_osdi) |
|||
|
|||
with open(os.path.join(dir_built_in, "netlist.sp"), "w") as netlist_handle: |
|||
netlist_handle.write(netlist_built_in) |
|||
|
|||
def run_simulations(dirs): |
|||
for dir_i in dirs: |
|||
run( |
|||
[ |
|||
ngspice_path, |
|||
"netlist.sp", |
|||
"-b", |
|||
], |
|||
cwd=dir_i, |
|||
) |
|||
|
|||
def prepare_test(directory): |
|||
dir_osdi, dir_built_in = prepare_dirs(directory) |
|||
create_shared_objects(directory) |
|||
prepare_netlists(directory) |
|||
run_simulations([dir_osdi, dir_built_in]) |
|||
|
|||
return dir_osdi, dir_built_in |
|||
|
|||
|
|||
|
|||
def parse_list(line): |
|||
return (val for val in re.split(r"\s+", line) if val != '') |
|||
|
|||
def parse_temps(line): |
|||
return [temp for temp in parse_list(line)] |
|||
|
|||
|
|||
class TestInfo: |
|||
biases: Optional[Dict[str, str]] = None |
|||
bias_list: Optional[Tuple[str, List[str]]] = None |
|||
bias_sweep = None |
|||
temps: Optional[List[str]] = None |
|||
freqs: Optional[str] = None |
|||
dc_outputs: Optional[List[Tuple[str, str]]] = None |
|||
ac_outputs: Optional[Dict[str,List[Tuple[str, str, bool, str, str]]]] = None |
|||
instanceParameters: str= "" |
|||
modelParameters: str = "" |
|||
line: str = "" |
|||
|
|||
def __init__(self, name, lines, parent): |
|||
self.name = name |
|||
self.lines= lines |
|||
self.parse() |
|||
if self.temps is None: |
|||
self.temps = parent.temps |
|||
self.pins = parent.pins |
|||
self.floating = parent.floating |
|||
|
|||
|
|||
|
|||
def parse_temps(self): |
|||
temps = parse_temps(self.line) |
|||
if self.temps is None: |
|||
self.temps = temps |
|||
else: |
|||
self.temps += temps |
|||
|
|||
def parse_model_params(self): |
|||
for param in parse_list(self.line): |
|||
path = Path(param) |
|||
if path.exists(): |
|||
self.modelParameters = path.read_text() |
|||
else: |
|||
self.modelParameters += f"+ {param}\n" |
|||
|
|||
def parse_instance_params(self): |
|||
for param in parse_list(self.line): |
|||
self.instanceParameters += f" {param}" |
|||
|
|||
|
|||
def parse_bias_list(self): |
|||
if self.bias_list: |
|||
raise ValueError(f"ERROR second bias_list spec {self.line}") |
|||
res = re.match(r"V\s*\(\s*(\w+)\s*\)\s*=", self.line) |
|||
pin = res[1] |
|||
vals = self.line[res.end():].strip() |
|||
vals = [val for val in re.split(r"\s*,\s*", vals)] |
|||
self.bias_list = (pin, vals) |
|||
|
|||
|
|||
def parse_biases(self): |
|||
if self.biases: |
|||
raise ValueError(f"ERROR second biases spec {self.line}") |
|||
self.biases = {} |
|||
for bias in parse_list(self.line): |
|||
res = re.match(r"V\s*\(\s*(\w+)\s*\)\s*=", bias) |
|||
pin = res[1] |
|||
val = bias[res.end():].strip() |
|||
self.biases[pin] = val |
|||
|
|||
def parse_outputs(self): |
|||
for output in parse_list(self.line): |
|||
res = re.match(r"([IV])\s*\(\s*(\w+)\s*\)", output) |
|||
if res: |
|||
pin = res[2] |
|||
if res[1] == "I": |
|||
output = f"i(v{pin})", f"I({pin})" |
|||
else: |
|||
output = f"v({pin})", f"V({pin})" |
|||
if self.dc_outputs: |
|||
self.dc_outputs.append(output) |
|||
else: |
|||
self.dc_outputs = [output] |
|||
continue |
|||
|
|||
|
|||
res = re.match(r"([CG])\s*\(\s*(\w+)\s*,\s*(\w+)\s*\)", output) |
|||
if res: |
|||
kind = res[1] |
|||
pin1 = res[2] |
|||
pin2 = res[3] |
|||
|
|||
if kind == "G": |
|||
output = f"real(i(v{pin1}))", f"g({pin1},{pin2})", False, pin1, pin2 |
|||
elif kind == "C": |
|||
output = f"imag(i(v{pin1}))", f"c({pin1},{pin2})", True, pin1, pin2 |
|||
|
|||
if self.ac_outputs: |
|||
if pin2 in self.ac_outputs: |
|||
self.ac_outputs[pin2].append(output) |
|||
else: |
|||
self.ac_outputs[pin2] = [output] |
|||
else: |
|||
self.ac_outputs = {pin2: [output]} |
|||
continue |
|||
|
|||
def parse_frequency(self): |
|||
res = re.match(r"(lin|oct|dec)\s+(\S+)\s+(\S+)\s+(\S+)\s*", self.line) |
|||
kind = res[1] |
|||
num_steps = int(res[2]) |
|||
start = res[3] |
|||
end = res[4] |
|||
if start != end: |
|||
|
|||
if kind == "lin": |
|||
num_points = num_steps + 1 |
|||
else: |
|||
num_points = num_steps |
|||
else: |
|||
assert num_steps == 1 |
|||
num_points = 1 |
|||
self.freqs = f"{kind} {num_points} {start} {end}" |
|||
|
|||
|
|||
def parse_bias_sweep(self): |
|||
res = re.match(r"V\s*\(\s*(\w+)\s*\)\s*=", self.line) |
|||
pin = res[1] |
|||
args = self.line[res.end():] |
|||
args = [float(arg) for arg in re.split(r"\s*,\s*", args)] |
|||
if len(args) != 3: |
|||
raise ValueError(f"bias sweep must have 3 arguments found {args} in {self.line}") |
|||
self.bias_sweep = (pin, args) |
|||
|
|||
|
|||
def try_parse(self, prefix: str, f): |
|||
if self.line.startswith(prefix): |
|||
self.line = self.line[len(prefix):].strip() |
|||
f() |
|||
|
|||
def parse_line(self): |
|||
if self.try_parse("temperature", self.parse_temps): |
|||
return |
|||
if self.try_parse("modelParameters", self.parse_model_params): |
|||
return |
|||
if self.try_parse("instanceParameters", self.parse_instance_params): |
|||
return |
|||
if self.try_parse("biasList", self.parse_bias_list): |
|||
return |
|||
if self.try_parse("listBias", self.parse_bias_list): |
|||
return |
|||
if self.try_parse("biases", self.parse_biases): |
|||
return |
|||
if self.try_parse("output", self.parse_outputs): |
|||
return |
|||
if self.try_parse("outputs", self.parse_outputs): |
|||
return |
|||
if self.try_parse("biasSweep", self.parse_bias_sweep): |
|||
return |
|||
if self.try_parse("freq", self.parse_frequency): |
|||
return |
|||
if self.try_parse("frequency", self.parse_frequency): |
|||
return |
|||
|
|||
def parse(self): |
|||
for line in self.lines: |
|||
self.line = line |
|||
self.parse_line() |
|||
|
|||
def gen_netlist(self, osdi_file, va_module, type_arg): |
|||
if self.bias_list: |
|||
bias_start = f"foreach bias {' '.join(self.bias_list[1])}\nalter v{self.bias_list[0]}=$bias" |
|||
bias_end = "end" |
|||
else: |
|||
bias_start = bias_end = "" |
|||
|
|||
if self.dc_outputs: |
|||
if not self.bias_sweep: |
|||
raise ValueError("dc bias sweep msising") |
|||
outputs = " ".join(output for output, _ in self.dc_outputs) |
|||
sweep = f"dc v{self.bias_sweep[0]} {self.bias_sweep[1][0]} {self.bias_sweep[1][1]} {self.bias_sweep[1][2]}\n wrdata {self.dc_results_path()} {outputs}" |
|||
elif self.ac_outputs: |
|||
freqs = self.freqs |
|||
if not self.freqs: |
|||
freqs = f"lin 1 {1/twoPi} {1/twoPi}" |
|||
if self.bias_sweep: |
|||
if self.bias_list: |
|||
bias_start += "\n" |
|||
bias_end += "\n" |
|||
vals = np.arange(self.bias_sweep[1][0], self.bias_sweep[1][1] + self.bias_sweep[1][2]*0.1, self.bias_sweep[1][2]) |
|||
vals = [str(val) for val in vals] |
|||
bias_start += f"foreach bias {' '.join(vals)}\nalter v{self.bias_sweep[0]}=$bias" |
|||
bias_end += "end" |
|||
|
|||
sweep = "" |
|||
for pin, outputs in self.ac_outputs.items(): |
|||
sweep += f"alter v{pin} ac = 1\nac {freqs}\n" |
|||
outputs = " ".join(output[0] for output in outputs) |
|||
sweep += f"wrdata {self.ac_results_path(pin)} {outputs}\n" |
|||
sweep += f"alter v{pin} ac = 0\n" |
|||
else: |
|||
return "" |
|||
|
|||
biases = self.biases |
|||
if not biases: |
|||
biases = dict() |
|||
|
|||
source = "\n".join(f"v{pin} {pin} {0} dc={biases.get(pin, 0)}" for pin in self.pins if not pin in self.floating) |
|||
source += "".join(f"\nr{i} {pin} {0} r=1G" for i,pin in enumerate(self.floating)) |
|||
|
|||
return f"""CMC testsuite {self.name} |
|||
.options abstol=1e-15 |
|||
|
|||
{source} |
|||
|
|||
.model test_model {va_module} |
|||
{self.modelParameters} {type_arg} |
|||
|
|||
A1 {' '.join(self.pins)} test_model {self.instanceParameters} |
|||
|
|||
.control |
|||
pre_osdi {osdi_file} |
|||
|
|||
set filetype=ascii |
|||
set wr_vecnames |
|||
set wr_singlescale |
|||
set appendwrite |
|||
|
|||
foreach tamb {' '.join(self.temps)} |
|||
set temp=$tamb |
|||
{bias_start} |
|||
{sweep} |
|||
{bias_end} |
|||
end |
|||
quit 0 |
|||
.endc |
|||
.end |
|||
""" |
|||
|
|||
def dc_results_path(self, old=False) -> Path: |
|||
dir = "results" |
|||
if old: |
|||
dir = "results_old" |
|||
return Path(dir)/f"{self.name}.ngspice" |
|||
|
|||
def ac_results_path(self, pin: str, old=False) -> Path: |
|||
dir = "results" |
|||
if old: |
|||
dir = "results_old" |
|||
return Path(dir)/f"{self.name}_{pin}.ngspice" |
|||
|
|||
def run(self, osdi_file, va_module, type_arg, old_sim_ref=False, capture=True, check=True): |
|||
if not (self.dc_outputs or self.ac_outputs): |
|||
return |
|||
|
|||
print(f"running {self.name}...") |
|||
|
|||
netlist_path = Path("netlists")/f"{self.name}.sp" |
|||
netlist = self.gen_netlist(osdi_file, va_module, type_arg) |
|||
Path(netlist_path).write_text(netlist) |
|||
|
|||
res = run([ngspice_path, netlist_path, "-b"], capture_output=capture) |
|||
res.check_returncode() |
|||
# res.check_returncode() |
|||
|
|||
reference_path = Path("reference")/f"{self.name}.standard" |
|||
references = pd.read_csv(reference_path, sep="\\s+") |
|||
|
|||
if not check: |
|||
return |
|||
|
|||
if self.dc_outputs: |
|||
results_path = self.dc_results_path() |
|||
|
|||
if not results_path.exists(): |
|||
print(f"ERROR check failed for {self.name}\nsimulation file is missing - likely convergence issues!") |
|||
return |
|||
|
|||
results = pd.read_csv(results_path, sep="\\s+") |
|||
results = results.apply(pd.to_numeric, errors='coerce') |
|||
firstcol = results.iloc[:,1].to_numpy() |
|||
results = results[np.bitwise_not(np.isnan(firstcol))] |
|||
|
|||
if old_sim_ref: |
|||
ref_path = self.dc_results_path(old=True) |
|||
references = pd.read_csv(ref_path, sep="\\s+") |
|||
references = references.apply(pd.to_numeric, errors='coerce') |
|||
firstcol = references.iloc[:,1].to_numpy() |
|||
references = references[np.bitwise_not(np.isnan(firstcol))] |
|||
|
|||
for result_col, ref_col in self.dc_outputs: |
|||
reference = references[ref_col].to_numpy() |
|||
result = results[result_col].to_numpy() |
|||
if "I(" in ref_col: |
|||
result = -result |
|||
|
|||
adiff = np.abs(result-reference) |
|||
rdiff = adiff/np.abs(reference) |
|||
err = np.bitwise_not(np.bitwise_or(rdiff < rtol, adiff < atol_dc)) |
|||
if not np.any(err): |
|||
continue |
|||
maxatol = np.max(adiff[err]) |
|||
maxrtol = np.max(rdiff[err]) |
|||
print(f"ERROR check failed for {ref_col}\nrtol={maxrtol} atol={maxatol}\nresult:\n{result[err]}\nreference:\n{reference[err]}\nrtol:\n{rdiff[err]}") |
|||
|
|||
elif self.ac_outputs: |
|||
for pin, outputs in self.ac_outputs.items(): |
|||
results_path = self.ac_results_path(pin) |
|||
if not results_path.exists(): |
|||
print(f"ERROR check failed for {self.name} (ac {pin})\nsimulation file is missing - likely convergence issues!") |
|||
continue |
|||
|
|||
results = pd.read_csv(results_path, sep="\\s+") |
|||
results = results.apply(pd.to_numeric, errors='coerce') |
|||
firstcol = results.iloc[:,1].to_numpy() |
|||
results = results[np.bitwise_not(np.isnan(firstcol))] |
|||
|
|||
if old_sim_ref: |
|||
ref_path = self.ac_results_path(pin, old=True) |
|||
references = pd.read_csv(ref_path, sep="\\s+") |
|||
references = references.apply(pd.to_numeric, errors='coerce') |
|||
firstcol = references.iloc[:,1].to_numpy() |
|||
references = references[np.bitwise_not(np.isnan(firstcol))] |
|||
|
|||
for result_col, ref_col, is_cap, pin1, pin2 in outputs: |
|||
result = results[result_col].to_numpy() |
|||
if old_sim_ref: |
|||
reference = references[result_col].to_numpy() |
|||
# print(ref_col) |
|||
# print(references) |
|||
# print(results) |
|||
else: |
|||
reference = references[ref_col].to_numpy() |
|||
if not old_sim_ref: |
|||
if is_cap: |
|||
if"Freq" in references: |
|||
result = result /(twoPi*results["frequency"]) |
|||
if pin1 == pin2: |
|||
result = -result |
|||
else: |
|||
result = -result |
|||
|
|||
adiff = np.abs(result-reference) |
|||
rdiff = adiff/np.abs(reference) |
|||
err = np.bitwise_not(np.bitwise_or(rdiff < rtol, adiff < atol_ac)) |
|||
if not np.any(err): |
|||
continue |
|||
maxatol = np.max(adiff[err]) |
|||
maxrtol = np.max(rdiff[err]) |
|||
print(f"ERROR check failed for {ref_col}\nrtol={maxrtol} atol={maxatol}\nresult:\n{result[err]}\nreference:\n{reference[err]}\nrtol:\n{rdiff[err]}") |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
def removeComments(string): |
|||
string = re.sub(re.compile(r"/\*.*?\*/",re.DOTALL ) ,"" ,string) # remove all occurrences streamed comments (/*COMMENT */) from string |
|||
string = re.sub(re.compile(r"//.*?\n" ) ,"" ,string) # remove all occurrence single-line comments (//COMMENT\n ) from string |
|||
return string |
|||
|
|||
class QaSpec: |
|||
temps: List[str] |
|||
pins: List[str] |
|||
floating: List[str] |
|||
tests: List[TestInfo] |
|||
dir: Path |
|||
|
|||
def __init__(self, dir: Path): |
|||
self.dir = dir |
|||
self.temps = [] |
|||
self.pins = [] |
|||
self.tests = [] |
|||
self.floating = [] |
|||
self.parse() |
|||
|
|||
def parse(self): |
|||
old_dir = os.getcwd() |
|||
os.chdir(self.dir) |
|||
qa_spec = Path("qaSpec").read_text() |
|||
qa_spec = removeComments(qa_spec) |
|||
lines = [line.strip() for line in qa_spec.split('\n')] |
|||
|
|||
i = 0 |
|||
while i < len(lines): |
|||
line = lines[i] |
|||
i+= 1 |
|||
if line.startswith("temperature"): |
|||
line = line[len("temperature"):] |
|||
self.temps = parse_temps(line) |
|||
elif line.startswith("pins"): |
|||
line = line[len("pins"):] |
|||
self.pins = [pin for pin in re.findall(r"\w+", line) if pin != "pins"] |
|||
|
|||
elif line.startswith("float") or line.startswith("floating"): |
|||
self.floating = [pin for pin in re.findall(r"\w+", line) if pin != "floating" and pin != "float"] |
|||
elif line.startswith("test"): |
|||
test_name = line[4:].strip() |
|||
start = i |
|||
while i < len(lines) and lines[i] != "": |
|||
i += 1 |
|||
end = i |
|||
|
|||
test = TestInfo(test_name, lines[start:end], self) |
|||
self.tests.append(test) |
|||
|
|||
os.chdir(old_dir) |
|||
|
|||
def run(self, va_file, va_module, type_arg, filter=None, openvaf=None, cache = None, old_sim_ref=False, capture=True, check=True): |
|||
if openvaf: |
|||
if not cache: |
|||
result = run( |
|||
["md5sum", openvaf], |
|||
stdout=PIPE, |
|||
) |
|||
result.check_returncode() |
|||
md5sum = result.stdout[:-1].decode("utf-8").split(" ")[0] |
|||
cache = f"./.cache/{md5sum}" |
|||
Path(cache).mkdir(parents=True,exist_ok=True) |
|||
else: |
|||
openvaf = "openvaf" |
|||
|
|||
args = [openvaf,"-b", va_file] |
|||
if cache: |
|||
args.append("--cache-dir") |
|||
args.append(cache) |
|||
# print(args, cache) |
|||
result = run( |
|||
args, |
|||
stdout=PIPE, |
|||
) |
|||
result.check_returncode() |
|||
osdi_file = result.stdout[:-1].decode("utf-8") |
|||
|
|||
old_dir = os.getcwd() |
|||
os.chdir(self.dir) |
|||
|
|||
|
|||
|
|||
dirpath = Path('netlists') |
|||
if dirpath.exists(): |
|||
shutil.rmtree(dirpath) |
|||
os.mkdir("netlists") |
|||
|
|||
dirpath = Path('results') |
|||
if old_sim_ref: |
|||
old_path = Path("results_old") |
|||
if old_path.exists(): |
|||
shutil.rmtree(old_path) |
|||
shutil.move(dirpath,old_path) |
|||
elif dirpath.exists(): |
|||
shutil.rmtree(dirpath) |
|||
|
|||
dirpath.mkdir(exist_ok=False) |
|||
for test in self.tests: |
|||
if filter and not test.name in filter: |
|||
continue |
|||
test.run(osdi_file, va_module, type_arg, old_sim_ref=old_sim_ref, capture=capture, check=check) |
|||
os.chdir(old_dir) |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue