<@U016EM8L91B> General question about LEF generati...
# magic
h
@Tim Edwards General question about LEF generation by `magic`: What is the strategy for the OBS generation? See also https://github.com/The-OpenROAD-Project/OpenLane/issues/1522
t
For full macros, it is generally expected that you will use
lef write -hide
from magic, which will then put OBS layers covering the entire macro except for cut-outs for the pins, for every layer that has some geometry inside the macro. If you use
lef write
without options, then OBS structures will be placed for any metal in the macro that is not part of a pin.
h
Sounds reasonable. So macro hardening in OL should then implement the -hide option, this does not seem to be the case now, but I will run some tests so see what is going on.
@Tim Edwards But this also means that magic does not write OBS for pins, right? So
pdngen
needs to look for OBS and PIN layers, and stay clear in case it does not want to connect, right?
@Tim Edwards Unrelated: If I open a LEF in klayout is looks fine, if I open a LEF in magic I see nothing. Why? Am I doing something wrong?
t
@Harald Pretl: LEF is a library format, so after reading a LEF file with
lef read
you would need to
load
a cell to view it.
h
Hi @Tim Edwards I did some testing: The
lef write -hide
in magic is only writing the OBS in a layer, if tracks are there, only PINs are not sufficient. However, it looks like that
pdngen
needs the OBS to function correctly. Question: Does it makes sense to change the
magic
behavior to write OBS in a layer if PIN or a track is there in a given layer?
t
By "track", you mean any wire that is not part of a pin? That doesn't sound quite right, although it's possible that I just haven't seen that specific situation. I would have expected obstruction on any layer that needs it to keep the router from colliding with something internal to the macro, whether that's something that is connected to a pin or not. Probably I need to see an example of the layout and the resulting LEF file.
h
See here a DEF that has PDN stripes in
met4
and one connection. When writing a LEF with
lef write -hide
, there is only PINS plus the OBS for the one wire on
met4
, but nothing else in
met4
OBS
. Is this the intended behaviour, or should there be a large OBS stucture in
met4
covering the whole thing?
t
It's intended behavior, but seems like a good case for implementing some behavior around using cell properties to give magic a hint about how the obstruction layer should be created. Magic aims for "sane" behavior, but that's not always what the designer intends. It's also not clear to me what this has to do with the PDN, though, because the LEF view is at least valid, even though it may not be ideal.
I just implemented behavior in magic to parse a cell property called
OBS_BBOX
which can be set to a bounding box (in magic internal coordinates) that will be used as a minimum area of obstruction.