It looks like you're new here. If you want to get involved, click one of these buttons!
I'm trying to LVS a basic inverter in sky130 using their lylvs scripts. It seems to extract the exact same netlist, but for some reason, nothing matches. How can I go about debbugging this?
* Extracted by KLayout with SKY130 LVS runset on : 21/03/2023 19:21
.SUBCKT sky130_fd_sc_hd__inv_1 VPB A Y VPWR VGND VNB
M$1 VPWR A Y VPB sky130_fd_pr__pfet_01v8_hvt L=0.15 W=1 AS=0.26 AD=0.26 PS=2.52
+ PD=2.52
M$2 VGND A Y VNB sky130_fd_pr__nfet_01v8 L=0.15 W=0.65 AS=0.169 AD=0.169
+ PS=1.82 PD=1.82
.ENDS sky130_fd_sc_hd__inv_1
The reference netlist:
.subckt sky130_fd_sc_hd__inv_1 A VGND VNB VPB VPWR Y
X0 VGND A Y VNB sky130_fd_pr__nfet_01v8 w=650000u l=150000u
X1 VPWR A Y VPB sky130_fd_pr__pfet_01v8_hvt w=1e+06u l=150000u
.ends
I tried changing device types (X <-> M).
I'm not sure how to attach my lvsdb file to a forum.
Comments
I also tried comparing to the extracted netlist itself instead of the reference netlist, but it still didn't match.
Ah, this was a problem with the scale of the W and L, but it wasn't reported as mismatching anywhere. The extraction script had an option for device_scaling that when enabled let this pass.
Could you perhaps post a little write-up on your findings,
similar to other recent LVS-fail and -solution threads? I think
collecting "syndromes" and "cures" is valuable (worthy of
collection to the examples-pile, even. Maybe with some
curating). Think "If I'd known then, what I know now" and
there's somebody out there probably about to step in the
same tracks.
@mrg You can attach any file type to the forum if you put it inside a .zip archive.
In your case, first it is important to change the devices to "M" in the reference netlist:
Starting with version 0.28.6, KLayout supports parametrized circuits, so basically you could also supply the subcircuits wrapping the devices, like this:
Now to the matching problem: KLayout does matching based on netlist topology. In order to do so, it needs some hints. In your case, there are simply too few - the nets are symmetric with respect to device swaps (so no topological hint) and the devices do not match (so no hint coming from the nature of attached elements). Currently it does not take device model into account as a fallback without matching parameters, which is the only (weak) hint that would uniquely identify the devices and resolve ambiguities. That is why there is no further information.
Regards,
Matthias
Hello everybody,
I have another issue.
I'm trying to make an LVS, but I have a problem with my netlist extraction. I did 'Tools -> Trace_All_Net,' and I have this. I don't know what it is, but it's not the netlist corresponding to the layout.
Do you know what it is, and how to generate the netlist?
Thanks in advance.
Hi @CMeyer,
the netlist tracer is a different thing than LVS. Technically the netlist tracing is a part of the first step of LVS, but LVS is more than that: it needs to extract devices and trigger the compare step which compares against the schematic.
For this you need a proper setup. Sky130 LVS can be found here for example: https://github.com/efabless/sky130_klayout_pdk/tree/main/sky130_tech/tech/sky130/lvs
It comes wrapped in a Python script. It's probably possible to run LVS from the IDE, but there a some variables you will need to set. A simple alternative is here: https://github.com/laurentc2/SKY130_for_KLayout. This only needs an edit of the schematic netlist name in line 21.
Matthias
Hi Matthias
I successfully extracted the netlist and found the problem. The issue was with the comment on line 31 in the sky130.lvs file. The question is, why are there issues in the comment section? Now that I have resolved the issue I am happy, the next steep is launching the LVS (successfully ).
The DRC works well. Although Klayout is not as good as Cadence, it is much cheaper thanks to its creators.
@CMeyer what comment do you mean?
On https://github.com/efabless/sky130_klayout_pdk/blob/main/sky130_tech/tech/sky130/lvs/sky130.lvs, line 31 is this:
That really should not make a difference.
Matthias
Yes !
Sorry, it is not sky130.lvs, it is sky130.lylvs
There is something wrong with that file.
.lylvs
is actually XML, and the problem line is this:<https...>
is read as a XML element which it isn't. This line should be written with XML entities such as:Matthias