From b7686bfe5cd972a06aecb82d17660f1a3f28501e Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Mon, 8 Feb 2021 02:15:15 +0100 Subject: [PATCH] ngspice annotator: avoid adding "x" to node path names if not in spice netlist mode --- src/xschem.tcl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xschem.tcl b/src/xschem.tcl index 94a44784..7554afd6 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -2068,11 +2068,13 @@ proc tclpropeval {s instname symname} { # this hook is called in translate() if whole string is contained in a tcleval(...) construct proc tclpropeval2 {s} { - global tcl_debug env + global tcl_debug env netlist_type if {$tcl_debug <=-1} {puts "tclpropeval2: $s"} set path [string range [xschem get sch_path] 1 end] - regsub {^([^xX])} $path {x\1} path - while { [regsub {\.([^xX])} $path {.x\1} path] } {} + if { $netlist_type eq {spice} } { + regsub {^([^xX])} $path {x\1} path + while { [regsub {\.([^xX])} $path {.x\1} path] } {} + } # puts "---> path=$path" regsub {^tcleval\(} $s {} s regsub {\)([ \n\t]*)$} $s {\1} s