Noticing some strange behaviour from Openlane rega...
# shuttle-precheck
e
Noticing some strange behaviour from Openlane regarding Klayout FEOL layers. We hardened a digital-only macro (
TOP_digital
), then instantiated this into a mixed signal design which gets incorporated into the user_project_wrapper. The strange behaviours are these: 1. Openlane appears to have generated FEOL DRCs during the hardening process of
TOP_digital
. All of the FEOL DRCs are associated with this macro which Openlane previously made. 2. Whats more bizzare, is that the precheck for user_project_wrapper, sometimes it flags up these DRCs, and sometimes it doesn't. Because
TOP_digital
doesn't get re-hardened or regenerated during the user_project_wrapper build, I don't understand where this inconsistency is coming from.
m
@Ellen Wood you may be aware and this may not be related to the problem, if you reharded a macro, you must reintegrate (run openlane) with all the parent hierarchies in order. There have been issues where users have added unnecessary
GRT_OBS
in their
config.json
files. Do you have
GRT_OBS
in your
config.json
?
e
@Mitch Bailey I'm a bit confused as to whether our digital macro gets re-hardened or not. Be interested to know your thoughts on this! We are sort of experimenting with a mixed signal approach. First, we harden a digital only macro in Openlane, using this config.json:
config.json
Then, once its been created, we take the
TOP_digital.mag
which Openlane has made, and instantate this as a cell in Magic, alongside the Analog cell:
image.png
Then, we export this mixed design as GDS and LEF in order to build
user_project_wrapper
with the below config.json. It seems to work okay, but during pre-check, the TOP_digital cell contains Klayout FEOL which seem to change with each hardening of
user_project_wrapper
. Do you think it could be something to do with the TOP_digital.mag file being used, and then re-written to GDS? Maybe some errors creep in during this process? On your last point, neither of the config.json files have
GRT_OBS
, but the parent heirarchies might not be right, would you mind having a look?
m
Maybe you want to set the
GDS_FILE
property of
TOP_digital
. You can do this by editing the
TOP_digital.mag
file. I think when you originally create the file in openlane, it has the
GDS_FILE
property, but when you edit it, the property disappears. @Tim Edwards Is my understanding correct? So the first time, after you place
TOP_digital
in
TOP_mixed
and then write the gds, the
TOP_digital
gds created from openlane is used. However, if you edit
TOP_digital
in magic and then write the data as gds, the openlane gds data is ignored and the magic data is converted to gds. This might cause some differences. Do you need to make changes to
TOP_digital
?
e
Thanks for your insight! I've spent a little time this evening looking into what might be happening. Openlane might not be the problem. It appears that whenever we make a change to the
TOP_mixed.mag
and write out the GDS, FEOL errors are generated in
TOP_digital
and they change slightly each time. We've made no changes to
TOP_digital
lately (and nor do we need to going forward) - but other small changes elsewhere in the design, then re-harden
user_project_wrapper
. Perhaps some sort of rounding error is happening in the
gds write
process in Magic, to explain the slight differences in errors each time?
Here are the 3 latest precheck's Ive done, each corresponding to a small change in
TOP_mixed.mag
- (note - TOP_digital hasn't been touched each time)
And the corresponding, changing FEOL error reports in TOP_digital
Do you think setting the
GDS_FILE
property will help stablise the errors for
TOP_digital
at least? I'm also using the
gds write
command, is there a better way perhaps? The errors themselves seem easy to solve by editing the
user_project_wrapper.gds
, but I think they will get generated every time we make small changes to the layout (for LVS etc). I haven't fixed them yet for this reason, but it means we haven't been able to submit a design to the Efabless repo for the Tapeout Job, because it can't get past the FEOL stage of the precheck
Do you think instantiating
TOP_digital.gds
, instead of
TOP_digital.mag
, would help? Or make things worse?
m
I’ll let @Tim Edwards comment on the magic details. Another user posted this https://open-source-silicon.slack.com/archives/C02096M650E/p1699254340663029
t
@Ellen Wood: Here's what I think is going on: If you get FEOL DRC errors that move around every time you re-harden a digital block, then the problem is in the way the digital block is being written out. Especially given that you're seeing errors in basic
nsdm
and
psdm
width and spacing. There are two settings involved; one is the
GDS_FILE
in the standard cells. You want the standard cells to be written exactly as-is. I expect it's the other problem, though, which is that openlane writes out GDS of digital blocks using
cif *hier write disable
. What that does is it prevents magic from checking whether neighboring or overlapping cells are causing DRC violations from interacting layers. Then it goes and adds extra layers to fix up those errors. The standard cells are designed specifically so that they can fill a tiled area of standard cell sites without causing any interactions and without needing any repairs. So the hierarchical checks and repair are just wasted time for standard cells (and it can be a lot of time for a large digital block). But if you have a mixed-signal design with analog blocks being written from .mag files and you use
cif *hier write disable
then you are very likely going to end up with FEOL errors. I think the best thing to do is to make sure that all large blocks being assembled on the top level (1) have complete and DRC clean generated layout, are abstracted, and have a GDS_FILE pointer pointing to the known-good GDS, and (2) blocks are assembled in the top level with enough space in between so that they will not have any interactions that would cause DRC errors (a few microns distance is probably sufficient unless they have deep nwell structures close to the edges, in which case probably about 10 micron spacing is sufficient).
👍 2
e
Thank you both! I will try these suggestions out.
A quick question @Tim Edwards - in our top level
.mag
file, is it okay to instantiate a
.gds
cell (in amongst other instances of
.mag
cells)? Or should all the cell instances be the same file type?
I might try instantating
TOP_digital.gds
instead of the
TOP_digital.mag
. Openlane made both, but I'm hoping there's no errors in the GDS due to the design of the standard cells which you mentioned!
t
Magic only reads
.mag
files. However, you can do this:
Copy code
gds readonly true
gds read <filename>
writeall
The "readonly" option means that you will get a
.mag
version of what's in the GDS but when magic writes out GDS it will include the cell directly from the original GDS file it came from, which I think is what you are looking for.
m
@Tim Edwards can I get a slight clarification on this. The
TOP_mixed.mag
file already contains
TOP_digital
and
TOP_analog
. Will this overwrite the
TOP_digital
cell in memory?
Copy code
gds readonly true
gds read TOP_digital.gds
t
@Mitch Bailey: You would do the
gds readonly true; gds read TOP_digital.gds; writeall force TOP_digital
separately from everything else, and with a fresh run of magic; that's a standalone operation that is meant to generate a
TOP_digital.mag
file that has a GDS pointer to
TOP_digital.gds
. You would not do that while something is already loaded in memory.
👍 1
e
Ok! Awesome - thanks for that clarification too. Hopefully that will get my
TOP_digital.mag
pointing to a clean GDS for TOP_digital. Will try tomorrow.
@Mitch Bailey @Tim Edwards Your suggestions worked!! I am no longer seeing Klayout FEOL DRCs in
TOP_digital
! 🎉 FYI - as you probably know, Openlane generates both
TOP_digital.gds
(into the
caravel_user_project/gds
directory) and a
TOP_digital.mag
(into
caravel_user_project/mag
directory). I was using the
TOP_digital.mag
straight from that directory, but have realised that this file is not generated with any
GDS_FILE
property
in it! So when it was getting written to GDS, I'm guessing the errors were generated? Reading in the GDS instead with
readonly true
appears to have fixed the problem.
👍 1
All of the errors were like this - some notching between the
nsd
and
psd
blocks which it wanted me to manually merge.