From 9b05f93fa7bfe6d5f5fdaaed0198ad954facbc5f Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 1 Jul 2026 23:52:05 +0200 Subject: [PATCH] Rewriting test for SPICE profiles --- src/db/db/gsiDeclDbNetlistDeviceClass.cc | 2 +- .../lvs/ringo_device_subcircuits_devcls.lvs | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/db/db/gsiDeclDbNetlistDeviceClass.cc b/src/db/db/gsiDeclDbNetlistDeviceClass.cc index 257fe3d0a..5dbffc8f2 100644 --- a/src/db/db/gsiDeclDbNetlistDeviceClass.cc +++ b/src/db/db/gsiDeclDbNetlistDeviceClass.cc @@ -743,7 +743,7 @@ Class 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" diff --git a/testdata/lvs/ringo_device_subcircuits_devcls.lvs b/testdata/lvs/ringo_device_subcircuits_devcls.lvs index 21c764783..1e1e12638 100644 --- a/testdata/lvs/ringo_device_subcircuits_devcls.lvs +++ b/testdata/lvs/ringo_device_subcircuits_devcls.lvs @@ -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