<@U016EM8L91B> I am hunting a bug that drives me c...
# magic
h
@Tim Edwards I am hunting a bug that drives me cazy. I am extracting a
.mag
into
.ext
, and then write a SPICE netlist for LVS. Neither the
mag
nor the
ext
have a pin called
mid
, but it shows up in the SPICE file. Where is magic finding this pin? Here the .ext, the .spc, and the .tcl…
Is there somewhere a path built in that uses a file that I do not specify in my procedure?
Found it: If there is a
ext
in the directory of the
mag
file, it takes priority over the
ext
file in the current directory. Maybe, this behaviour could be changed, or at least a timestamp is checked, so that the younger one is used.
m
@Harald Pretl Are you using the
extract do local
directive? What is your search path defined as? Use
path search
to find out. Do you either use
extract all
or extract in a clean directory?
t
extract
is a progressive extraction which only extracts things that have been changed; if a
.ext
file exists for a cell and it has not been updated, then that file will be used.
extract all
is generally preferred, and will always generate new
.ext
files for everything. That said, the original implementation of the extraction just dropped all
.ext
files in the same directory as the
.mag
file, and
extract do local
is a recent addition, and not all the consequences have been thoroughly thought out. . .
I think the issue here is that
extract do local
is applying to writing
.ext
files but not to reading them.
h
I think the implementation with the
extract do local
is fine, it should just also set the search order for the
.ext
files accordingly, means, it looks first in the local dir for a
.ext
file, and if not successful then use the location of the
.mag
I think the issue here is that
extract do local
is applying to writing
.ext
files but not to reading them.
Exactly.
t
Yup. We came to the same conclusion at the same time.
h
BTW, if you are touching the code: It would like to be able to specify a working dir for
do local
. Now, I have to
cd
into the proper dir before, and then jump back afterwards, which is not very elegant.
t
Yes, that has been a low-level item down on my to-do list. . .
h
I would be super happy if you could fast-track that 🙂
t
I'll try to get to it today.
👍 1
@Harald Pretl: Implemented in magic version 8.3.404 (currently on opencircuitdesign.com, to be mirrored to github overnight). There is now a command option
extract path <pathname>
that does what you want.
extract do local
is still available for backwards compatibility, but effectively what it does now is to run the command
extract path .
. The
ext2spice
command has always been sort of independent of
extract
and for that reason I am letting the behavior remain in place of doing
ext2spice -p <pathname>
rather than having
ext2spice
refer back to the parameters defined in
extract
. Hopefully that's not too much of an inconvenience. (I should probably at least add a warning if
extract path
was set but
ext2spice
does not use the
-p
option.)
h
@Tim Edwards Thanks for the superfast implementation, that should work fine! I now need to build it into our Docker and test it, which will take a few days. If something unusual pops up I report back!
@Tim Edwards One more: pls role this version into OL, for the regular image builds I follow the tool manifest from OL. For the testing I’ll do a local build.
t
Usually such requests are best handled by an issue in the openROAD/openlane issue tracker.
@Tim Edwards I finally got around to upgrade magic and test the new extract feature, works like a charm, thank you 🙂
t
Good to know, thanks!