Stefan Schippers
11/06/2020, 10:40 AM@value
token (which gets substituted by xschem with your simulation data) is then passed down to tcl for further expansion (this way you can add anything, valid tcl commands, tcl variables, shell variables (via the $env(VAR) ) . However passing things down to tcl should be done only when needed. Try to put an unknown command in your code block ( [blablabla]
, square brackets denote tcl commands) and the entire process fails and you get a nice question mark (?
) into your netlist. Passing text for further intepretation and substitution requires extra care for syntax (and perhaps some escaping to prevent unwanted execution of code / substitution) . I believe adding explicitly tcleval(@value\)
in format (instead of default format=@value
) only when needed on instance level is a good compromise.