From 2490786f4c5d77c3d3a97217bb194531feade3b0 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 19 Aug 2025 11:51:20 +0200 Subject: [PATCH] add spectre_format to simulator_commands.sym and simulator_commands_shown.sym --- xschem_library/devices/simulator_commands.sym | 12 ++++++++++-- xschem_library/devices/simulator_commands_shown.sym | 11 ++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/xschem_library/devices/simulator_commands.sym b/xschem_library/devices/simulator_commands.sym index 4e227033..6acf6e91 100644 --- a/xschem_library/devices/simulator_commands.sym +++ b/xschem_library/devices/simulator_commands.sym @@ -1,4 +1,4 @@ -v {xschem version=3.4.6 file_version=1.2 +v {xschem version=3.4.8RC file_version=1.3 * * This file is part of XSCHEM, * a schematic capture and Spice/Vhdl/Verilog netlisting tool for circuit @@ -35,9 +35,17 @@ format="tcleval( \} \} else \{ return \{\} \} ])" -} + +spectre_format="tcleval( +[if \{[catch \{sim_is_@simulator \} retval] \} \{ + return \{\} \} elseif \{$retval\} \{ return \{ +@value +\} +\} else \{ return \{\} \} +])"} V {} S {} +F {} E {} L 4 20 30 60 30 {} L 4 20 40 40 40 {} diff --git a/xschem_library/devices/simulator_commands_shown.sym b/xschem_library/devices/simulator_commands_shown.sym index 080eb041..074c382b 100644 --- a/xschem_library/devices/simulator_commands_shown.sym +++ b/xschem_library/devices/simulator_commands_shown.sym @@ -1,4 +1,4 @@ -v {xschem version=3.4.6 file_version=1.2 +v {xschem version=3.4.8RC file_version=1.3 * * This file is part of XSCHEM, * a schematic capture and Spice/Vhdl/Verilog netlisting tool for circuit @@ -34,9 +34,18 @@ format="tcleval( @value \} \} else \{ return \{\} \} +])" + +spectre_format="tcleval( +[if \{[catch \{sim_is_@simulator \} retval] \} \{ + return \{\} \} elseif \{$retval\} \{ return \{ +@value +\} +\} else \{ return \{\} \} ])"} V {} S {} +F {} E {} L 4 0 -10 70 -10 {} L 4 0 -10 0 10 {}