Batch Mode LVS Fails on Sky130 with "Netlists don't match" -Even with extracted netlist as reference

Hi everyone,
I'm trying to run LVS checks for the Sky130 PDK in batch mode, but I consistently get a Netlists don't match error. I'm looking for help to understand what I might be doing wrong.

My Environment:
KLayout Version: [ -- 0.29.9 -- ]
PDK: SkyWater SKY130
The Main Problem:
No matter which design I use, the LVS comparison fails with a "Netlists don't match" result.
Here's what I have tried:
1. Custom Designs: I started with my own custom GDS files (both a simple PMOS and a transmission gate) and their corresponding SPICE netlists. They all failed.
2. Official PDK Standard Cell: To rule out errors in my own files, I used a known-good standard cell from the PDK (sky130_fd_sc_hs__and2_1.gds and its .sp netlist). This also failed with the same error.
3. Using the Extracted Netlist as a Reference: This is the most confusing part. I first ran LVS to generate an extracted netlist from the GDS file. Then, I ran LVS a second time, using this newly extracted netlist as the reference schematic. Logically, this should always pass, but it still fails with "Netlists don't match".

This last test makes me think the issue is not with the GDS or SPICE files themselves, but with my KLayout command or environment setup. It seems the comparison step is fundamentally broken for some reason.

My Question:
Why would an LVS check fail when comparing an extracted netlist against itself? What could cause this behavior? Is there a common setup mistake or a required -rd parameter for Sky130 LVS that I might be missing?

I run these commands in the klayout_sky130/lvs/ folder
python3 run_lvs.py --design="/home/OpenFASOC/openfasoc/generators/glayout/output/pmos_sky130.gds" --net="/home/OpenFASOC/openfasoc/generators/glayout/output/pmos_sky130.sp" --thr=16 --set_verbose --set_spice_comments

python3 run_lvs.py --design="/home/OpenFASOC/openfasoc/generators/glayout/output/transmission_gate_sky130.gds" --net="/home/OpenFASOC/openfasoc/generators/glayout/output/transmission_gate_sky130.sp" --thr=16 --set_verbose --set_spice_comments --lvs_sub="VSS"

python3 run_lvs.py --design="/home/OpenFASOC/openfasoc/generators/glayout/output/sky130_fd_sc_hs__and2_1.gds" --net="/home/OpenFASOC/openfasoc/generators/glayout/output/sky130_fd_sc_hs__and2_1.sp" --thr=16 --set_verbose --set_spice_comments --lvs_sub="VNB"

I have attached a zip file ([--klayout_lvs_debug.zip--]) containing the GDS, SPICE files, LVS rule deck and results, and the Python script I'm using to run the command.

Any help would be greatly appreciated. Thank you!

Comments

  • At first glance I'd say that the units are wrong. SKY130 probably establishes a convention of using metric units by default, while KLayout dumps in micrometer units by default. So your

    M$1 VCC VCC VCC VCC sky130_fd_pr__pfet_01v8 L=0.15 W=6 AS=2.85 AD=2.85 PS=13.9 PD=13.9
    

    for example, represents a device with a length of 15 cm and a width of 6 m to SKY130 LVS.

    Changing that to

    M$1 VCC VCC VCC VCC sky130_fd_pr__pfet_01v8 L=0.15U W=6U
    

    And doing the same for the other devices makes the LVS match for me for "pmos_sky130.sp" at least.

    But apart from that, using the extracted netlist for schematic input is a basic mistake. In LVS there is schematic space and layout space. But default, they are pretty equivalent, but you can establish matching rules and in KLayout you can also customize the schematic netlist reader, so all kind of differences between layout and schematic space may apply. For example, the netlist reader can be overloaded and substitute subcircuits by devices. This may be needed if you like to use simulation-targeted netlists as input for LVS. That saves you a separate netlist run for generating the LVS references, but makes schematic space conceptually much different from layout space.

    I will not again express my concerns about the Spice format, which IMHO should be abandoned better today than tomorrow and replaced by something suitable for our applications. For example, by separating circuit topology from the electrical netlist. And fixing a thousand other flaws, like the optional units ...

    Matthias

  • Hi Matthias, thank you very much for the insight regarding the unit mismatch.
    You were right—explicitly adding the 'U' suffix to the SPICE netlist solved the issue. This also pointed me in the right direction to find a cleaner solution for my workflow. I discovered that passing the --set_scale argument to run_lvs.py automatically handles unit conversion, solving the problem without requiring manual modification of the reference netlist.
    Thanks again for helping me identify the root cause!

Sign In or Register to comment.