Rewriting test for SPICE profiles

This commit is contained in:
Matthias Koefferlein 2026-07-01 23:52:05 +02:00
parent 6c4a22d6da
commit 9b05f93fa7
2 changed files with 7 additions and 12 deletions

View File

@ -743,7 +743,7 @@ Class<db::DeviceClass> decl_dbDeviceClass ("db", "DeviceClass",
"@brief Defines a SPICE profile.\n"
"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, "
"'*' 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 "
"a customized SPICE representation.\n"
"\n"

View File

@ -3,26 +3,21 @@ source($lvs_test_source, "RINGO")
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
# schematic only
xpmos = mos4_class("XPMOS")
sp = xpmos.spice_profile
sp.element = "X"
xpmos.set_spice_profile(sp)
xpmos.spice_profile("READ").element = "X"
# layout only
pmos = mos4_class("PMOS")
sp = pmos.spice_profile
sp.element = "X"
pmos.set_spice_profile(sp)
pmos.spice_profile("WRITE").element = "X"
# both layout and schematic
nmos = mos4_class("NMOS")
sp = nmos.spice_profile
sp.element = "X"
nmos.set_spice_profile(sp)
nmos.spice_profile("*").element = "X"
# NOTE: this needs to come before the schematic netlist is read
register_device_class(xpmos)
@ -30,7 +25,7 @@ register_device_class(nmos)
# Read the schematic
schematic("ringo_xdevice.cir")
schematic("ringo_xdevice.cir", spice_profile("READ"))
deep