skywater-pdk icon indicating copy to clipboard operation
skywater-pdk copied to clipboard

Wrong SPICE netlist of sky130_fd_sc_hvl__lsbuflv2hv_1

Open hpretl opened this issue 3 years ago • 6 comments

Expected Behavior

LVS should match for SPICE netlist and GDS.

Actual Behavior

It ain't.

Steps to Reproduce the Problem

First extract netlist with magic.

netgen -batch lvs "sky130_fd_sc_hvl__lsbuflv2hv_1.spice sky130_fd_sc_hvl__lsbuflv2hv_1" "lvs_cell.spice sky130_fd_sc_hvl__lsbuflv2hv_1" $PDKPATH/libs.tech/netgen/sky130A_setup.tcl

Specifications

  • Version: latest
  • Platform: n/a

hpretl avatar Dec 17 '21 15:12 hpretl

It's not clear to me which netlist is being compared against which netlist. Can you please give a clear indication of where each of the netlists came from?

RTimothyEdwards avatar Dec 17 '21 15:12 RTimothyEdwards

Sorry for not being clear enough. It is this SPICE netlist

sky130_fd_sc_hvl__lsbuflv2hv_1.spice

compared against the extracted netlist from this GDS

sky130_fd_sc_hvl__lsbuflv2hv_1.gds

both from the current sky130_fd_sc_hvl library. There might be more errors in the SPICE netlists, this is the first cell I checked. It would be ideal to run an LVS script on all the sky130_fd_sc_* libs to look for mismatches. Or, alternatively, extract all SPICE netlists again with the current runsets.

hpretl avatar Dec 17 '21 16:12 hpretl

There are issues due to the fact that the SkyWater netlist uses the same names for power and ground nodes that are separate rails and therefore electrically disconnected. I'm not sure, though, why extracting without "extract unique" won't give a matching netlist. I do know that extracting with "extract unique" will give a topological match but not a pin match. What version of magic and netgen did you use?

RTimothyEdwards avatar Dec 17 '21 17:12 RTimothyEdwards

Okay, on inspection of the .spice file in the skywater-pdk repository, it somehow dissassociated the two redundant net names from their respective pins and turned them into internal nodes. The immediate solution is to not trust the SPICE from skywater-pdk and generate netlists from GDS during the open_pdks install. As a side note, this problem can only show up on a handful of cells such as the level shifters in the HVL library. I don't think any of the other libraries have any double-height standard cells.

RTimothyEdwards avatar Dec 17 '21 18:12 RTimothyEdwards

I used the most recent versions from GitHub:

magic 5e3c26c95afadfd07753bb8126fa6528afce5dd8 tag: 8.3.241 netgen de18ae85a4f0a96271a301a4704d42e7ac132963 from Dec/15

Your analysis sounds correct and fits the error. My guess is that the SPICE netlists have been created/extracted at a time when this "join nets by name" was not properly working in magic extract. With the current versions of magic and netgen it works properly, which is good.

That leaves a check and fix of the sky130 cells as to be done.

hpretl avatar Dec 18 '21 07:12 hpretl

Similar to #305.

d-m-bailey avatar Dec 24 '21 02:12 d-m-bailey