yrrapt
05/22/2021, 7:02 PMschematic="cell_name_${mode}"
But nothing was really working.
The use case I'm facing right now is that I have inductors in my design. For simulation I want the model to be used in the netlist, for LVS i want a short between input and output as that's what the extraction tool sees.
So I am trying to default a TCL mode
variable to sim
and then override the variable when doing the LVS netlist generation. I really want to do this with flags applied at a global level rather than having to descend the heirarchy and change the schematic=
expression for multiple cells.
Do you have any tips on how I can achieve this?Stefan Schippers
05/23/2021, 9:26 PMschematic=...
attribute only once in the inductor symbol.
Anyway if you think it is useful to add a tcl variable evaluation when parsing the schematic attribute i can add this feature. Currently the schematic attrribute is used as is, without variable expansion.yrrapt
05/24/2021, 8:07 PMStefan Schippers
05/24/2021, 9:33 PMschematic="cell_name_${mode}"
) however filenames with '$' must have $ escaped to avoid confusion. Will work on that.Stefan Schippers
06/16/2021, 10:19 PMschematic
attribute in a symbol:
schematic=tcleval(cell_name_${::mode}.sch)
the tcleval(...) construct instructs xschem to pass down the argument to tcl for evaluation. This way you can use tcl variables (use the ${::var} notation to specify global scope) to build the final schematic name. Ensure the TCL variable (set mode .....) is defined before traversing/netlisting: