<@U01H2JMLFLL> I tried to insert backannotation in...
# xschem
s
@User I tried to insert backannotation info (gm and id for mos transistors) directly into the mos symbols. The complex string invokes the
ngspice::annotate
tcl command to get the data, and builds the right string automatically adding the hierarchical path the mos transistor is placed into. In the bottom of the picture you see the result. There is a caveat, though, as gm data must be explicitly saved, like in (note the complex naming):
save @m.x1.xm1.msky130_fd_pr__nfet_01v8_lvt[gm]
There is no automatic way to save all transistor gm data , like
save @m*[gm]
or something like that. These changes are not committed, this was just a feasibility study. It works and no required changes are done on xschem. My opinion is that adding such information directly in the symbols is too much ngspice specific. If another simulator is used it won't work, and i want xschem to be a simulation-agnostic schematic entry tool. So i guess a decent implementation should add one indirection layer where simulator specific data is loaded and make symbols themself portable. This probably increases the required changes significantly.
t
@User thanks for looking into it. I understand why you're apprehensive to add simulator specific info. into the otherwise general symbols. BTW, there is a way of automatically saving all MOSFET data which I got from one of the Slack channels a while back. I have it baked into my default simulation card schematic symbol. it's as follows:
Copy code
unset noglob
save @m.*[*]
set noglob
Does this help in anyway?
s
@User, Thank you this is very useful info. WIll play a bit with it...
@User, after some tests it looks to me that globbing (unset noglob) affects filenames, not save/.save list of nodes. If i do a
save all
inside a
.control/.endc
sections all nodes are saved including all
@m....[id], @m...[is], @m...[ib]
currents, but no
[gm]
transconductances. I have tried your example above but i get no more saved nodes than the ones i get with '`save all`' together with '`.options savecurrents`'. Moreover if globbing is enabled [*] refers to character *, not to "anything in square brackets"