Hi <@U016EM8L91B>, may I ask a quick question here...
# openlane
t
Hi @Tim Edwards, may I ask a quick question here? I understand that LVS checks power connectivity. But does it check for floating power nets as well? Could you have power nets with the same name, but which are physically floating. Also, since power pins are bi-directional. With a lot of macros, PDN is quite a challenge it seems. Thanks in advance. Cheers, Tobias
m
For unconnected nets with the same pin names, using
extract 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.
h
Upps, good to know! This means that the netlist extract in
magic
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?
t
@Harald Pretl: Yes, that is the default, although magic will generate warnings about unconnected nets with the same name.
t
Thanks a lot guys. In other words, the default caravel flow is not safe in this regard, right? Though it is not very likely that this happens. Nevertheless, where is the best place to find info about the power routing concept ? I have 27 macros and I must optimize PDN. It just doesn’t look feasible.
h
@Tim Edwards Could you tweak the Caravel tapeout checks in a way that the
magic
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.
t
@Harald Pretl: I thought it did. If not, then please create a github issue in the caravel repo.
m
@Harald Pretl openlane uses
scripts/magic/extract_spice.tcl
which has
Copy code
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.
Copy code
$(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>
Copy code
$(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.
h
The question is, are the labels exported into the GDS, and thus this could be an issue? If there are no labels, then no connection by labels in any case, so no issue if it would be connected by the extract. This is a bit confusing, I hope you know what I mean 🙂
m
I believe pins and labels are both exported/imported between mag views and gds.
Created a (untested) pull request for this. https://github.com/efabless/caravel/pull/145