hi <@U016HTY6KV4>, Sorry for delay and thank you f...
# xschem
s
hi @User, Sorry for delay and thank you for this question. sky130 mos symbols do not have any more the tcleval(....) that contains the whole spice format string for further tcl processing, since i realized that if someone puts some weird things that tcl does not understand the whole device si not netlisted. Anyway last xschem commit add a more clever way to do what yo're asking for: after updating your xschem from git this should work:
Copy code
name=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:
Copy code
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
👍 1
💯 1
✔️ 1
r
Thanks for a rapid reply in such a detail.