Hello, does anyone know why the lvs says that the ...
# magic
j
Hello, does anyone know why the lvs says that the circuits are black boxes?
m
For netgen compares 2 subcircuits. For the sky130 PDK, primitive mosfet devices are extracted as subckt references. (The spice lines begin with
X
. ) There is no subckt definition for these devices, so netgen compares them as black boxes - the device names and the terminal connections must match. This is normal behavior. The
equate elements: no current cell
is worrisome, though. Can you post your
inverter_mag.spice
,
inverter_spice
, and netgen command?
t
The
equate elements
output suggests that the
equate elements
command has been added to the setup file, probably in error.
equate elements
and
equate nodes
are very obscure, low-level commands that can only be used in the middle of running a comparison. They cannot be used in a setup file because the circuits have not yet been partitioned into nodes and elements.
j
Netgen -bash lvs inverter_mag.spice inverter.spice
t
I assue you mean
-batch
, not
-bash
. You also need to specify the netgen setup file, such as
/usr/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl
.
j
Yes, I’m sorry, is netgen -batch lvs inverter_mag.spice inverter.spice and route sky130A_setup.tcl
t
Please post the
comp.out
output file?
j
comp.out
inverter.spice,inverter_mag.spice
t
You are comparing a subcircuit against a top level. The simplest thing to do is to write the netlist from xschem using the "output subckt" option so that it gets a ".subckt" line and all the pins are declared (those are in the file and you can also just edit the file and remove the
**
from the
.subckt
and
.ends
lines). Then, run the LVS with the name of the subcircuit declared:
Copy code
netgen -batch lvs "inverter_mag.spice inverter" "inverter.spice inverter" /usr/share/pdk/sky130A/libs.tech/netgen/sky130A_setup.tcl
This produces a correct result from netgen.
m
@Juan Andres When you output your netlist from xschem, be sure to select
Simulation -> LVS netlist: Top level is a .subckt
j
I did this but I have the same error
@Tim Edwards For example, if I do that from the schematic where the sources are and everything, does it extract that too? or just the symbol?
If I do the lvs thing in xschem, I run the same in command, call the device?
t
You just want to make sure that the option
Top level is a .subckt
is set, and then click on
Netlist
as usual; then your netlist should have uncommented
.subckt
and
.ends
lines in it. It really is doing nothing more than just not writing the comment characters in front of those lines. Otherwise, the netlister is behaving exactly the same.
j
But I have issues in the lvs yet
t
You seem to be comparing the layout against some version of itself, not against the xschem schematic.
j
m
This should be your lvs command
Copy code
netgen -batch lvs "inverter_mag.spice inverter" "inverter.spice inverter" $PDK_ROOT/$PDK/libs.tech/netgen/${PDK}_setup.tcl