Hi all! I have designed a simple amplifier using X...
# analog-design
m
Hi all! I have designed a simple amplifier using Xschem+Magic. I am trying to do the LVS but as I used multiple fingers for nmos and pmos transistors, netgen does not seem to merge the devices correctly. For extraction, I used this commands:
Copy code
extract all
ext2spice hierarchy on
ext2spice scale off
ext2spice lvs
ext2spice
For running the LVS, I used this command:
Copy code
netgen -batch lvs "inv_sky130_a_v4.spice inv_sky130_a_v4" "inv_sky130_a_v4_layout.spice inv_sky130_a_v4" /usr/local/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl
That gave me this error:
Copy code
Netgen 1.5.272 compiled on Ven 15 mar 2024 17:55:20 CET
Warning: netgen command 'format' use fully-qualified name '::netgen::format'
Warning: netgen command 'global' use fully-qualified name '::netgen::global'
Reading netlist file inv_sky130_a_v4.spice
Call to undefined subcircuit sky130_fd_pr__cap_mim_m3_1
Creating placeholder cell definition.
Call to undefined subcircuit sky130_fd_pr__nfet_01v8
Creating placeholder cell definition.
Call to undefined subcircuit sky130_fd_pr__pfet_01v8
Creating placeholder cell definition.
Ignoring line starting with token: .lib
line number 13 = '.lib /usr/local/share/pdk/sky130A/libs.tech/combined/sky130.lib.spice tt'
File inv_sky130_a_v4.spice read with 1 warning.
Reading netlist file inv_sky130_a_v4_layout.spice
Call to undefined subcircuit sky130_fd_pr__nfet_01v8
Creating placeholder cell definition.
Call to undefined subcircuit sky130_fd_pr__pfet_01v8
Creating placeholder cell definition.
Call to undefined subcircuit sky130_fd_pr__cap_mim_m3_1
Creating placeholder cell definition.

Reading setup file /usr/local/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl

Model sky130_fd_pr__nfet_01v8 pin 1 == 3
No property as found for device sky130_fd_pr__nfet_01v8
No property ad found for device sky130_fd_pr__nfet_01v8
No property ps found for device sky130_fd_pr__nfet_01v8
No property pd found for device sky130_fd_pr__nfet_01v8
No property mult found for device sky130_fd_pr__nfet_01v8
No property sa found for device sky130_fd_pr__nfet_01v8
No property sb found for device sky130_fd_pr__nfet_01v8
No property sd found for device sky130_fd_pr__nfet_01v8
No property nrd found for device sky130_fd_pr__nfet_01v8
No property nrs found for device sky130_fd_pr__nfet_01v8
No property area found for device sky130_fd_pr__nfet_01v8
No property perim found for device sky130_fd_pr__nfet_01v8
No property topography found for device sky130_fd_pr__nfet_01v8
Model sky130_fd_pr__nfet_01v8 pin 1 == 3
No property mult found for device sky130_fd_pr__nfet_01v8
No property sa found for device sky130_fd_pr__nfet_01v8
No property sb found for device sky130_fd_pr__nfet_01v8
No property sd found for device sky130_fd_pr__nfet_01v8
No property nf found for device sky130_fd_pr__nfet_01v8
No property nrd found for device sky130_fd_pr__nfet_01v8
No property nrs found for device sky130_fd_pr__nfet_01v8
No property area found for device sky130_fd_pr__nfet_01v8
No property perim found for device sky130_fd_pr__nfet_01v8
No property topography found for device sky130_fd_pr__nfet_01v8
Model sky130_fd_pr__pfet_01v8 pin 1 == 3
No property as found for device sky130_fd_pr__pfet_01v8
No property ad found for device sky130_fd_pr__pfet_01v8
No property ps found for device sky130_fd_pr__pfet_01v8
No property pd found for device sky130_fd_pr__pfet_01v8
No property mult found for device sky130_fd_pr__pfet_01v8
No property sa found for device sky130_fd_pr__pfet_01v8
No property sb found for device sky130_fd_pr__pfet_01v8
No property sd found for device sky130_fd_pr__pfet_01v8
No property nrd found for device sky130_fd_pr__pfet_01v8
No property nrs found for device sky130_fd_pr__pfet_01v8
No property area found for device sky130_fd_pr__pfet_01v8
No property perim found for device sky130_fd_pr__pfet_01v8
No property topography found for device sky130_fd_pr__pfet_01v8
Model sky130_fd_pr__pfet_01v8 pin 1 == 3
No property mult found for device sky130_fd_pr__pfet_01v8
No property sa found for device sky130_fd_pr__pfet_01v8
No property sb found for device sky130_fd_pr__pfet_01v8
No property sd found for device sky130_fd_pr__pfet_01v8
No property nf found for device sky130_fd_pr__pfet_01v8
No property nrd found for device sky130_fd_pr__pfet_01v8
No property nrs found for device sky130_fd_pr__pfet_01v8
No property area found for device sky130_fd_pr__pfet_01v8
No property perim found for device sky130_fd_pr__pfet_01v8
No property topography found for device sky130_fd_pr__pfet_01v8
No property area found for device sky130_fd_pr__cap_mim_m3_1
No property value found for device sky130_fd_pr__cap_mim_m3_1
No property mult found for device sky130_fd_pr__cap_mim_m3_1
No property perim found for device sky130_fd_pr__cap_mim_m3_1
No property mf found for device sky130_fd_pr__cap_mim_m3_1
No property area found for device sky130_fd_pr__cap_mim_m3_1
No property value found for device sky130_fd_pr__cap_mim_m3_1
No property mult found for device sky130_fd_pr__cap_mim_m3_1
No property perim found for device sky130_fd_pr__cap_mim_m3_1
No property mf found for device sky130_fd_pr__cap_mim_m3_1
Comparison output logged to file comp.out
Logging to file "comp.out" enabled
Circuit sky130_fd_pr__nfet_01v8 contains no devices.
Circuit sky130_fd_pr__pfet_01v8 contains no devices.
Circuit sky130_fd_pr__cap_mim_m3_1 contains no devices.

Contents of circuit 1: Circuit: 'inv_sky130_a_v4'
Circuit inv_sky130_a_v4 contains 6 device instances.
 Class: sky130_fd_pr__nfet_01v8 instances:  4
 Class: sky130_fd_pr__cap_mim_m3_1 instances:  1
 Class: sky130_fd_pr__pfet_01v8 instances:  1
Circuit contains 12 nets.
Contents of circuit 2: Circuit: 'inv_sky130_a_v4'
Circuit inv_sky130_a_v4 contains 25 device instances.
 Class: sky130_fd_pr__nfet_01v8 instances: 16
 Class: sky130_fd_pr__cap_mim_m3_1 instances:  1
 Class: sky130_fd_pr__pfet_01v8 instances:  8
Circuit contains 27 nets.

Circuit 1 contains 6 devices, Circuit 2 contains 25 devices. *** MISMATCH ***
Circuit 1 contains 12 nets,  Circuit 2 contains 27 nets. *** MISMATCH ***


Final result: 
Netlists do not match.
Logging to file "comp.out" disabled
LVS Done.
I uploaded my spice files. Thanks for the help 🙂
m
Can you share your layout or a picture of your layout? Extracting pcells should work, but it can lead to netlists that are hard to comprehend. If you have gds, you can use a new instance of magic and use these commands
Copy code
gds flatglob sky130_fd_pr__*[A-Z]*
gds flatten yes
gds read <gds-file>

load <top-cell>
extract no all
extract unique
extract path extfiles
extract

ext2spice lvs
ext2spice merge conservative
ext2spice short resistor
ext2spice -p extfiles -o <output.spice> <top-cell>.ext
Don’t use these commands on an editable mag file - on gds data read in temporarily for extraction.
m
Sure! Here are my layout files:
Unfortunately, I tried your answer but it didn't work, I have the same as before, I don't know why
m
@Miguel Correa As per @Tim Edwards error in the other thread, it appears that your fingered devices are not connected correctly. For example, there are 10 25/1 nfets instantiated as fingers, but only the top and bottom diffusion is connected. The intention was probably a circuit equivalent to a 250/1 device, but the way it’s connected now, it’s equivalent to a 25/10 device. In the on state, the current will have to flow clear from the bottom through 10 transistors to reach the top. To connect these so that they are equivalent to a 150/1 transistor, every other diffusion should be connected to the top diffusion, and the remaining diffusion should be connected to the other diffusion. To connect 10 fingered gates in parallel, the top diffusion and the bottom diffusion need to be connected to the same net. This means that you’ll need to remove either the current top or bottom connection.