Hi, I'm trying to perform lvs with magic and netge...
# magic
a
Hi, I'm trying to perform lvs with magic and netgen on a bjt, but it fails with segfault. The lvs.sh script extracts the netlist from .sch and .gds, and netgen compares. I've validated this with klayout so I'm not sure why this is not working.
t
Netgen went into an infinite recursion for some reason. I'm investigating.
I think the PNP is self-referencing.
Actually it's a pair of looping self-references in the extracted layout:
Copy code
.subckt pnp_05p00x05p00_0 E C B
X0 E B C pnp_05p00x05p00
**devattr s=1000000,4000 d=1000000,4000
.ends

.subckt pnp_05p00x05p00 I1_default_E I1_default_B VSUBS
Xpnp_05p00x05p00_0_0 I1_default_E VSUBS I1_default_B pnp_05p00x05p00_0
.ends
Could be caused by a property not translating back from GDS into magic, which would be an issue that might require a change in the device generator in magic.
a
The layout was created with Klayout, I'm trying to validate lvs with both tools.
t
I realized that as soon as I wrote it.
Okay, the problem is that you have a subcircuit
pnp_05p00x05p00
in the middle of the hieararchy that shadows a model of the same name (where the model is also a subcircuit), which is what is causing the circularity. You need to rename it to something other than the model name.
Neither magic nor netgen catches the circularity. Klayout may be changing the bottommost subcircuit to a Q component in SPICE which would avoid the circularity, but the layout would still have issues with simulation regardless.
a
Is this problem more related to the pcell implementation? I'm going to try flattening the cap.
t
I don't know how the device is created in klayout. The hierarchy of the example is deeper than necessary. It looks like it might be calling the GF layout from the primitives library, but put a wrapper around that and gave it the same name as the device model, which would then be a mistake in the klayout pcell.
Actually, the wrapper cell is from the GF library as well. The problem is that that wrapper cell should never be used, and the klayout pcell should be instantiating the lower-level cell with the
_0
suffix, not the cell that shadows the device name. (Attn. @Amro Tork; can you confirm?)