Boris Murmann
07/27/2024, 7:19 AMtcleval([xschem raw list])
Boris Murmann
07/27/2024, 7:30 AMtcleval([xschem raw index inoise_spectrum])
I get 3 as expected. But
tcleval([ xschem raw index @m.xm1.msky130_fd_pr__nfet_01v8_lvt[gm] ])
does not evaluate.
I must be missing a syntax detail or the proper way to access the gm
variable. It's clearly a somewhat different animal than the inoise_spectrum
variable, since the former is just one value that comes from the DC operating point computed as part of the noise analysis. But the waveform viewer grabs and displays this variable without any issues, so I am guessing there must be a way to do this with tcleval
, too?Boris Murmann
07/27/2024, 7:39 AMgm
value after running a standalone op
analysis (as shown in the documentation examples), so that's not what I am looking for. I want to specifically grab this gm
value stored in a noise
raw file.Stefan Schippers
07/27/2024, 9:10 AM@
character is used by xschem to substitute attributes with their values (like @symname
->`inv`), the [
and ]
characters are used by tcl for command blocks. You just need to correctly escape those characters (the "quoting hell"):
tcleval([xschem raw index \@m.xm1.msky130_fd_pr__nfet_01v8_lvt\\[gm\\]])
This string goes to a @var
translation phase, and escapes are used to differentiate a literal @
from a substitution @
token. After this translation the result is:
tcleval([xschem raw index @m.xm1.msky130_fd_pr__nfet_01v8_lvt\[gm\]])
Note the double backslashes around [
and ]
are reduced to a single backslash. This is what tcl gets when resolving tcleval(), the \[gm\]
is interpreted as a literal [gm]
string and not as a [gm]
tcl command.Boris Murmann
07/27/2024, 9:14 AM