Tobias Strauch
10/04/2022, 10:19 AMMitch Bailey
10/04/2022, 10:40 AMextract unique
will extract the nets as unconnected. I believe the default is to connect the nets. http://opencircuitdesign.com/magic/commandref/extract.html
extract unique
modifies the mag
data, so use with care.Harald Pretl
10/04/2022, 10:43 AMmagic
is connect-by-name by default? Needless to say, that is pretty dangerous, especially when running a top-level LVS check. @Tim Edwards can you confirm this?Tim Edwards
10/04/2022, 12:09 PMTobias Strauch
10/04/2022, 12:42 PMHarald Pretl
10/04/2022, 1:22 PMmagic
extract uses extract unique
? I think this would be a lot safer, also considering the fact that newcomers might stumble over this, and the warnings just vanish in a log unnoticed.Tim Edwards
10/04/2022, 1:24 PMMitch Bailey
10/04/2022, 1:36 PMscripts/magic/extract_spice.tcl
which has
extract do local
extract no capacitance
extract no coupling
extract no resistance
extract no adjust
if { ! $::env(LVS_CONNECT_BY_LABEL) } {
extract unique
}
# extract warn all
extract
so that’s connecting disconnected nets with the same label only if LVS_CONNECT_BY_LABEL
is set.
The caravel/Makefile
has an lvs-<blockname>
target that extracts the mag views.
$(LVS_BLOCKS): lvs-% : ./mag/%.mag ./verilog/gl/%.v
echo "Extracting $*"
mkdir -p ./mag/tmp
echo "addpath $(CARAVEL_ROOT)/mag/hexdigits;\
addpath $(CARAVEL_ROOT)/mag/primitives;\
addpath $(MCW_ROOT)/mag;\
addpath $(CARAVEL_ROOT)/subcells/simple_por/mag;\
addpath \$$PDKPATH/libs.ref/sky130_ml_xx_hd/mag;\
load $* -dereference;\
select top cell;\
foreach cell [cellname list children] {\
load \$$cell -dereference;\
property LEFview TRUE;\
};\
load $* -dereference;\
select top cell;\
extract no all;\
extract do local;\
extract unique;\
extract;\
ext2spice lvs;\
ext2spice $*.ext;\
feedback save extract_$*.log;\
exit;" > ./mag/extract_$*.tcl
This also has the unique option.
However, in the same caravel/Makefile
there’s a target to extract from gds lvs-gds-<blockname>
$(LVS_GDS_BLOCKS): lvs-gds-% : ./gds/%.gds ./verilog/gl/%.v
echo "Extracting $*"
mkdir -p ./gds/tmp
echo " gds flatglob \"*_example_*\";\
gds flatten true;\
gds read ./$*.gds;\
load $* -dereference;\
select top cell;\
extract no all;\
extract do local;\
extract;\
ext2spice lvs;\
ext2spice $*.ext;\
feedback save extract_$*.log;\
exit;" > ./gds/extract_$*.tcl
This one doesn’t have the unique option, so similarly labeled disconnected nets will be connected.Harald Pretl
10/04/2022, 2:45 PMMitch Bailey
10/04/2022, 2:54 PMMitch Bailey
10/05/2022, 7:05 AM