It looks like you're new here. If you want to get involved, click one of these buttons!
Hi Matthias and everyone,
I am working on a project involving Layout Dependent Effect (LDE) and Matching Analysis. To do this, I need to extract the exact physical location of every single device instance and map these coordinates to the extracted SPICE netlist.

I have performed an LVS run on a Sky130 design (see the attached image of the PMOS layout).
1. Observations regarding Coordinates:
In the results/lvs/pmos_sky130_lvs.lvsdb, I see structure definitions with coordinates (likely in DBU):
D(D$sky130_fd_pr__pfet_01v8 sky130_fd_pr__pfet_01v8
T(S R(l7 (-110 -300) (95 600)))
...
)
And in the extracted netlist .cir, I see comments with coordinates in microns:
* device instance $1 r0 *1 2.065,7.57 sky130_fd_pr__pfet_01v8
M$1 VCC VCC VCC VCC ...
2. The Problem: Device Merging / Reduction
I noticed that the LVS process seems to merge/combine extracted devices.
As shown in the attached layout image, I have a multi-finger structure (or multiple separate devices). However, the generated LVS database and the extracted netlist seem to aggregate these into fewer device entries (e.g., M$1, M$2) with combined parameters (total W, combined Areas/Perimeters).
For my analysis, I need a 1-to-1 mapping. I need the extracted netlist to represent every single physical transistor finger (or at least every contiguous active area) as a separate subcircuit instance, without merging parallel devices.
My Questions:
.lvsdb text file, is there a recommended Python/Ruby API to access the extracted device list and their specific coordinates (DTrans/Point)?I want to write a script that iterates through the LVS results and prints something like:
Device M$1 (Finger 1): x=..., y=..., W=..., L=...
Device M$2 (Finger 2): x=..., y=..., W=..., L=...
Any guidance on how to configure the LVS to stop merging devices and how to query their locations via API would be extremely helpful.
Thank you!
Comments
Hi Matthias and everyone,
Following up on my previous LVS issues, I have found the root cause regarding the mapping problem.
The Context:
I am working on Layout Dependent Effect (LDE) analysis.
m=2), which expands to two distinct parallel instances:M$1(W=3u) andM$2(W=3u).The Observation:
When I run the Sky130 LVS, the Layout Extractor automatically merges these separate parallel devices into a single device with
W=6u. It essentially performs "Parallel Reduction" during extraction.Scenario A (Default):
ERROR: Netlists don't match(unless I enable schematic simplification).Scenario B (With
--set_schematic_simplify):The Problem:
While Scenario B passes LVS, it defeats my purpose for LDE analysis. I need to extract the exact coordinates of
M$1andM$2individually. When they are merged into a single device entry in the.lvsdb(even if it internally holds the shapes of both), I lose the explicit link between the specific netlist instance (e.g., the 1st multiplier) and its specific physical location.My Questions:
.lvsdb, the merged device has multiple RegionR(...)entries.M$1vsM$2) based on their order or properties?I essentially need to achieve:
Netlist Instance M$1 (Multiplier 1)->Physical Coordinates (x1, y1)Thanks for your help!
KLayout can skip the device merge script, but the PDKs come with their own wrappers and some allow disabling the merge step and some don't.
I lost track for the sky130 development ... there used to be a lot of forks. I don't know how the consolidated after e-Fabless shutdown.
This repo seems fairly up to date: https://github.com/efabless/sky130_klayout_pdk/tree/main/tech/sky130/lvs (last commit 10 months ago by Leo), but that's the single-chunk thing I though they had abandoned.
If I read that correctly, LVS does not combine extracted devices if you skip "--set_combine" in the LVS driver script. But I may be wrong.
For parsing the .lvsdb file there is the
LayoutVsSchematicclass (https://www.klayout.de/doc-qt5/code/class_LayoutVsSchematic.html#k_1). You may be interested in the base classLayoutToNetlist. I hope the documentation is good enough as a starting point. As AI has absorbed all of my work, I am happy to delegate first level support to ChatGPT or Copilot.It's actually possible to run the extraction directly from your Python script as LVS commands are only wrappers around the KLayout API. This way you can seamlessly integrate extraction with analysis, but the price is that you need to reimplement the device and network extraction functionality of the LVS script.
Matthias