Hmmmm I'm trying to do LVS and at this point I'm not sure if I'm having a magic problem, a spice problem, a klayout problem, or some other problem.
I'm running
@Amro Tork’s
https://github.com/mabrains/sky130_klayout_pdk/blob/main/scripts/run_standard_lvs.py script, on my gds file
https://github.com/pepijndevos/sky130_lvds which shells out to
@Tim Edwards’s magic and netgen.
My gds is very incomplete, but I just want to get all the things working before I go all the way and have to ge back and fix a million things. So I made this dummy schematic of just the mosfets I drew
* schematic.cir
* .lib /usr/local/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt
XM3 cm V- bufneg VDD_IO sky130_fd_pr__pfet_g5v0d10v5 l=0.5 w=10 m=10
XM2 cm V+ bufpos VDD_IO sky130_fd_pr__pfet_g5v0d10v5 l=0.5 w=10 m=10
And then I ran
python ../sky130_klayout_pdk/scripts/run_standard_lvs.py lvds.gds output.txt schematic.cir report.txt TOP
which generates some
.ext
files as well as write some spice to
output.txt
* NGSPICE file created from TOP.ext - technology: sky130A
.subckt sky130_fd_pr__pfet_g5v0d10v5_VU6JZ7 a_50_n1036# w_n144_n1098# a_n50_n1062#
+ a_n108_n1036#
X0 a_50_n1036# a_n50_n1062# a_n108_n1036# w_n144_n1098# sky130_fd_pr__pfet_g5v0d10v5 ad=2.9e+12p pd=2.058e+07u as=2.9e+12p ps=2.058e+07u w=1e+07u l=500000u
.ends
.subckt TOP
Xpfet_g5v0d10v5_7x05[0|0] m1_n102_n1172# w_n1336_n1674# m1_n66_1210# m1_n102_n1172#
+ sky130_fd_pr__pfet_g5v0d10v5_VU6JZ7
Xpfet_g5v0d10v5_7x05[1|0] m1_n102_1628# w_n1336_n1674# m1_n66_4010# m1_n102_1628#
[...]
But that's where the happiness ends. There was an error message from magic, but maybe it can be ignored?
Error while reading cell "$$$CONTEXT_INFO$$$" (byte position 338): Cell "contact" was already defined in this file.
Error while reading cell "$$$CONTEXT_INFO$$$" (byte position 338): Ignoring duplicate definition
But then comes the netgen part and here it completely goes of the rails. If I add a
.lib
statement it just gives an error, and if I don't, it seems to generate a dummy device and then complain that it doesn't have any properties:
Netgen 1.5.224 compiled on vr 24 jun 2022 10:27:18 CEST
Warning: netgen command 'format' use fully-qualified name '::netgen::format'
Warning: netgen command 'global' use fully-qualified name '::netgen::global'
Reading netlist file output.txt
Call to undefined subcircuit sky130_fd_pr__pfet_g5v0d10v5
Creating placeholder cell definition.
Reading netlist file schematic.cir
Call to undefined subcircuit sky130_fd_pr__pfet_g5v0d10v5
Creating placeholder cell definition.
Reading setup file /usr/local/share/pdk/sky130A//libs.tech/netgen/sky130A_setup.tcl
Model sky130_fd_pr__pfet_g5v0d10v5 pin 1 == 3
No property mult found for device sky130_fd_pr__pfet_g5v0d10v5
No property sa found for device sky130_fd_pr__pfet_g5v0d10v5
No property sb found for device sky130_fd_pr__pfet_g5v0d10v5
No property sd found for device sky130_fd_pr__pfet_g5v0d10v5
No property nf found for device sky130_fd_pr__pfet_g5v0d10v5
No property nrd found for device sky130_fd_pr__pfet_g5v0d10v5
No property nrs found for device sky130_fd_pr__pfet_g5v0d10v5
No property area found for device sky130_fd_pr__pfet_g5v0d10v5
No property perim found for device sky130_fd_pr__pfet_g5v0d10v5
No property topography found for device sky130_fd_pr__pfet_g5v0d10v5
[...]
And then the report is just
Equate elements: no current cell.
Equate elements: no current cell.
Verify: no current cell to verify.