Stefan Schippers
11/20/2020, 5:58 PMname=M1
L=0.15
W=2 ad="tcleval([expr @W * 0.29])"
as="tcleval([expr @W * 0.29])"
ps="tcleval([expr 2*(@W * @L )])"
pd="tcleval([expr 2*(@W * @L )])"
nrs="tcleval([expr 0.29/@W ])"
nrd="tcleval([expr 0.29/@W ])"
nf=1 mult=1
model=nfet_01v8_lvt
spiceprefix=X
in this case only the 'ad' attribute is passed to tcl for evaluation.
the @W is substituted by xschem and the resuling expression evaluated.
In the netlist the resulting number is printed:
XM1 net1 G1v8 S B sky130_fd_pr__nfet_01v8_lvt W=2 L=0.15 ad=0.58 pd=0.6 as=0.58 ps=0.6 nrd=0.145
+ nrs=0.145 sa=0 sb=0 sd=0 nf=1 mult=1 m=1
raphael
11/20/2020, 6:12 PM