Hi <@U01819B63HP>, might have hit an xschem bug re...
# xschem
m
Hi @Stefan Schippers, might have hit an xschem bug related to exporting netlist with lvs subckt option is on
with the option on I get this netlist
Copy code
** sch_path: /home/matt/work/asic-workshop/shuttle-2404/tt-analog-switch/xschem/tt_asw_1v8.sch
.subckt tt_asw_1v8 VPWR ctrl mod bus VGND
*.PININFO VPWR:B VGND:B mod:B bus:B ctrl:I
XM4 tgon tgon_n VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=1.5 nf=1 m=1
XM3 tgon tgon_n VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=3 nf=2 m=1
XM2 tgon_n ctrl VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=1.5 nf=1 m=1
XM1 tgon_n ctrl VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=3 nf=2 m=1
XM6 bus tgon mod VGND sky130_fd_pr__nfet_01v8_lvt L=0.5 W=12 nf=4 m=1
XM5 bus tgon_n mod VPWR sky130_fd_pr__pfet_01v8_lvt L=0.5 W=21 nf=7 m=1
.ends
.end
and when it's off i get this
Copy code
** sch_path: /home/matt/work/asic-workshop/shuttle-2404/tt_asw_1v8/xschem/tt_asw_1v8.sch
.subckt tt_asw_1v8 VPWR ctrl mod bus VGND
*.iopin VPWR
*.iopin VGND
*.iopin mod
*.iopin bus
*.ipin ctrl
XM4 tgon tgon_n VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=1.5 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
XM3 tgon tgon_n VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=3 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
XM2 tgon_n ctrl VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=1.5 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
XM1 tgon_n ctrl VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=3 nf=2 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' sa=0 sb=0 sd=0 mult=1 m=1
XM6 bus tgon mod VGND sky130_fd_pr__nfet_01v8_lvt L=0.5 W='12 * 4 ' nf=4 ad='int((nf+1)/2) * W / nf * 0.29' as='int((nf+2)/2) * W / nf * 0.29'
+ pd='2*int((nf+1)/2) * (W / nf + 0.29)' ps='2*int((nf+2)/2) * (W / nf + 0.29)' nrd='0.29 / W ' nrs='0.29 / W ' sa=0 sb=0 sd=0 mult=1
+ m=1
XM5 bus tgon_n mod VPWR sky130_fd_pr__pfet_01v8_lvt L=0.5 W='21 * 7 ' nf=7 ad='int((nf+1)/2) * W / nf * 0.29' as='int((nf+2)/2) * W / nf * 0.29'
+ pd='2*int((nf+1)/2) * (W / nf + 0.29)' ps='2*int((nf+2)/2) * (W / nf + 0.29)' nrd='0.29 / W ' nrs='0.29 / W ' sa=0 sb=0 sd=0 mult=1
+ m=1
*.ends
.end
which matches the circuit
t
(note that the error might not show up in latest version of the repo, it was back when we were using the
nf
symbols and one version of the generated .spice didn't have the expression for W multiplying the specified W by nf ...)
s
@Matt Venn @tnt thank you for reporting this bug, the W calculation for LVS is fixed upstream for *_nf symbols.
๐Ÿ™Œ 3
h
@Stefan Schippers There is a similar issue with 3 pin fets (i.e. those where the substrate connection is specified as an attribute instead of a pin). If I extract the netlist without the LVS option it works fine, but if I specify the LVS option the substrate connection is missing from the spice netlist. Do your upstream changes fix that or should I report it separately?
t
@Stefan Schippers Is the fix in xschem itself or somewhere else ? (to know what I need to update ๐Ÿ˜€ )
s
@tnt @htamas the fix is in https://github.com/StefanSchippers/xschem_sky130. This repo is usually pulled in by open_pdks, anyway this is the upstream source for sky130 symbols. I have also fixed the issue with the @body connection in 3-terminal fets. Thank you so much for pointing this out!
๐Ÿ‘ 1
t
Mmm, my PDK is always from volare, running the build every time takes forever and a lot of space. I need to figure out how to just update the symbols.
s
@tnt You can just copy the symbols from here to your installation. I do the same to avoid a looooong rebuild of open_pdks.
โœ… 1
t
Thanks.