mirror of https://github.com/KLayout/klayout.git
Rewriting test for SPICE profiles
This commit is contained in:
parent
6c4a22d6da
commit
9b05f93fa7
|
|
@ -743,7 +743,7 @@ Class<db::DeviceClass> decl_dbDeviceClass ("db", "DeviceClass",
|
||||||
"@brief Defines a SPICE profile.\n"
|
"@brief Defines a SPICE profile.\n"
|
||||||
"SPICE profiles are a way to declare SPICE representations for a specific device. "
|
"SPICE profiles are a way to declare SPICE representations for a specific device. "
|
||||||
"Each device class can support multiple profiles. An empty name declares the default profile, "
|
"Each device class can support multiple profiles. An empty name declares the default profile, "
|
||||||
"'*' is the fallback profile used when there is no profile with a requested name. Profiles "
|
"'*' is the fallback profile used when there is no profile with the requested name. Profiles "
|
||||||
"are requested by the SPICE reader or writer, unless they use delegates to implement "
|
"are requested by the SPICE reader or writer, unless they use delegates to implement "
|
||||||
"a customized SPICE representation.\n"
|
"a customized SPICE representation.\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
||||||
|
|
@ -3,26 +3,21 @@ source($lvs_test_source, "RINGO")
|
||||||
|
|
||||||
report_lvs($lvs_test_target_lvsdb, true)
|
report_lvs($lvs_test_target_lvsdb, true)
|
||||||
|
|
||||||
target_netlist($lvs_test_target_cir, write_spice, "Extracted by KLayout")
|
target_netlist($lvs_test_target_cir, write_spice(spice_profile("WRITE")), "Extracted by KLayout")
|
||||||
|
|
||||||
# Register device class with a "X" element based SPICE profile
|
# Register device class with a "X" element based SPICE profile
|
||||||
|
|
||||||
# schematic only
|
# schematic only
|
||||||
xpmos = mos4_class("XPMOS")
|
xpmos = mos4_class("XPMOS")
|
||||||
sp = xpmos.spice_profile
|
xpmos.spice_profile("READ").element = "X"
|
||||||
sp.element = "X"
|
|
||||||
xpmos.set_spice_profile(sp)
|
|
||||||
|
|
||||||
# layout only
|
# layout only
|
||||||
pmos = mos4_class("PMOS")
|
pmos = mos4_class("PMOS")
|
||||||
sp = pmos.spice_profile
|
pmos.spice_profile("WRITE").element = "X"
|
||||||
sp.element = "X"
|
|
||||||
pmos.set_spice_profile(sp)
|
|
||||||
|
|
||||||
|
# both layout and schematic
|
||||||
nmos = mos4_class("NMOS")
|
nmos = mos4_class("NMOS")
|
||||||
sp = nmos.spice_profile
|
nmos.spice_profile("*").element = "X"
|
||||||
sp.element = "X"
|
|
||||||
nmos.set_spice_profile(sp)
|
|
||||||
|
|
||||||
# NOTE: this needs to come before the schematic netlist is read
|
# NOTE: this needs to come before the schematic netlist is read
|
||||||
register_device_class(xpmos)
|
register_device_class(xpmos)
|
||||||
|
|
@ -30,7 +25,7 @@ register_device_class(nmos)
|
||||||
|
|
||||||
# Read the schematic
|
# Read the schematic
|
||||||
|
|
||||||
schematic("ringo_xdevice.cir")
|
schematic("ringo_xdevice.cir", spice_profile("READ"))
|
||||||
|
|
||||||
deep
|
deep
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue