<@U01732WNM60>: (1) The `sky130A.magicrc` that is...
# caravan
t
@User: (1) The
sky130A.magicrc
that is installed by open_pdks into
libs.tech/magic/sky130A.magicrc
is the one to use. Like what I just did today to correct the xschem setup, it checks for the environment variable
PDKPATH
to override whatever path for open_pdks was used by the designer. (2)
sky130A-GDS
is a (more or less) one-to-one mapping from GDS layers to magic layers. Magic's not designed to work that way, so there's no connectivity or extraction; it's mainly useful for checking that the GDS output that magic wrote looks sane. Also it can do some additional DRC checks that magic doesn't do because it generates "correct by design" GDS; that means it's useful to use to look at GDS generated by another tool to see layers that magic would just absorb on read-in. But klayout is pretty good for doing that, now, plus it understands the connectivity and now has pretty good DRC decks. Otherwise, with magic, always use
sky130A.tech
. (3) The "Cell ... is unavailable" message looks like the
skywater-pdk
was installed without installing the
sky130_fd_sc_hvl
library. Is that a product of running installation of the PDK from openlane?
c
Might well be that at the moment,
magic
just reads the wrong
sky130A.magicrc
. I've tried to install the skywater-pdk several times, so I actually have plenty (actually, way too many) of
sky130_fd_sc_hvl
versions:
Copy code
~/EDA/OpenLane/pdks/sky130A/libs.tech/magic$ find ~ -name sky130_fd_sc_hvl

~/EDA/OpenLane/pdks/open_pdks/sky130/custom/sky130_fd_sc_hvl
~/EDA/OpenLane/pdks/open_pdks/sky130/sky130A/libs.ref/sky130_fd_sc_hvl
~/EDA/OpenLane/pdks/open_pdks/sky130/sky130A/libs.tech/openlane/sky130_fd_sc_hvl
~/EDA/OpenLane/pdks/open_pdks/sky130/openlane/sky130_fd_sc_hvl
~/EDA/OpenLane/pdks/sky130A/libs.ref/sky130_fd_sc_hvl
~/EDA/OpenLane/pdks/sky130A/libs.tech/openlane/sky130_fd_sc_hvl
~/EDA/OpenLane/pdks/skywater-pdk/.git/modules/libraries/sky130_fd_sc_hvl
~/EDA/OpenLane/pdks/skywater-pdk/libraries/sky130_fd_sc_hvl
~/EDA/skywater-pdk/libraries/sky130_fd_sc_hvl
When I invoke
Copy code
~/EDA/caravel_user_project_analog/mag$ magic
which
sky130A.magicrc
am I using?
I might just be clueless how to link to the necessary libraries ... the file does exist, but magic doesn't find it even if I start magic from
libs.tech/magic/
.
Copy code
~/EDA/OpenLane/pdks/sky130A/libs.ref/sky130_fd_sc_hvl/spice$ find ~ -name '*sky130_fd_sc_hvl__buf_8*mag'

~/EDA/OpenLane/pdks/open_pdks/sky130/sky130A/libs.ref/sky130_fd_sc_hvl/mag/sky130_fd_sc_hvl__buf_8.mag
~/EDA/OpenLane/pdks/open_pdks/sky130/sky130A/libs.ref/sky130_fd_sc_hvl/maglef/sky130_fd_sc_hvl__buf_8.mag
~/EDA/OpenLane/pdks/sky130A/libs.ref/sky130_fd_sc_hvl/mag/sky130_fd_sc_hvl__buf_8.mag
~/EDA/OpenLane/pdks/sky130A/libs.ref/sky130_fd_sc_hvl/maglef/sky130_fd_sc_hvl__buf_8.mag
t
The best practice is to copy
<path_to>/sky130A/libs.tech/magic/sky130A.magicrc
to the local directory where you're doing layout and rename it to
.magicrc
, or make a symbolic link. The alternative is to run magic with
-rcfile <path_to>/sky130A/libs.tech/magic/sky130A.magicrc
. If you just run
magic
with no options, it will use the local
.magicrc
if there is one, and otherwise it will not use a startup file at all.
The
.magicrc
file should be adding the appropriate library directories to its search path, which means that in that startup file you should find something like
addpath $PDKPATH/libs.ref/sky130_fd_sc_hvl/mag
. The "standard"
.magicrc
file uses an additional environment variable called `MAGTYPE`which can be either
mag
or
maglef
so that the path is
$PDKPATH/libs.ref/sky130_fd_sc_hvl/$MAGTYPE
and standard cells will be pulled from either
mag
(full view, for writing GDS) or
maglef
(abstract view).
The installed library which you want to use generally is the installed open_pdks
<path_to>/libs.ref/sky130_fd_sc_hvl/
. The path with
custom/
contains sources used by open_pdks to correct errors in the skywater-pdk sources. The path with
skywater-pdk
are the original sources, which contain errors and are not necessarily in the format that tools want to use, which is why open_pdks is needed to parse, correct, collate, and install. The path
OpenLane/pdks/skywater-pdk
looks like a copy of
EDA/skywater-pdk
because OpenLane decided to download a copy of the skywater PDK itself, and you have also downloaded a copy of the skywater PDK. The rest of the mess in
OpenLane
looks like a failure of
OpenLane
to run
make clean
after running the open_pdks install.
c
@Tim Edwards, "If you just run 
magic
 with no options, it will use the local 
.magicrc
 if there is one, and otherwise it will not use a startup file at all."
solved the problem I had — thanks! Where in http://opencircuitdesign.com/magic/userguide.html did I miss this information?