I modified the openlane-2 example colab notebook t...
# openlane-2
y
I modified the openlane-2 example colab notebook to generate a shift register. In the notebook, everything passes (https://colab.research.google.com/drive/1TY8O6sfi4S2rgk64_XWUf7OcoMM6cy5Q?usp=sharing). But the generated .gds does not pass the pre-check 'Klayout FEOL'. There are two places violating
psdm.1 : min. psdm spacing in periphery : 0.38um
. How to fix this?
m
@Yuan Mei Sorry for the delay. I ran the colab you posted but didn’t see any drc errors. I also didn’t see any klayout drc results. Are you downloading the gds and then running precheck outside of colab? Openlane normally creates 2 versions of gds, one from klayout and one from magic. Magic will automatically fill some spacing errors on the implant layers when creating the gds data. Was the data with the drc violations created with magic or klayout?
y
I took the .mag output and placed it into an openframe project wrapper, then run the wrapper through mpw-precheck. The FEOL DRC error got reported there.
To be more precise, I took the .mag file from
Copy code
magicStream = Step.factory.get("Magic.StreamOut")
mag = magicStream(state_in=sta_post_pnr.state_out)
mag.start()
Then, in the openframe project wrapper, the digital module is placed as a Magic instance, which is then connected to other analog modules manually. I need this flow to integrate analog and digital modules together.
m
@Yuan Mei It is my understanding that while the magic -> gds conversion is fine, gds -> magic -> gds can introduce drc errors. I believe the way to handle integrating hardened gds macros into magic layout is to set
gds readonly yes
before importing the gds. This sets the
GDS_FILE
property in the temporary magic data with a pointer to the original gds file. When the top level magic data is exported to gds, the gds for the macro is read verbatim from the original gds file. @Tim Edwards is that correct? Or do you think this might be resolved with
cif *hier write enable
?
y
I don't think I'm doing gds -> magic -> gds. Since I take the .mag out of "Magic.StreamOut", it is the .mag file that's directly integrated into the project wrapper.
m
@Yuan Mei I may be misunderstanding your flow. In the code snippet you posted, I think the
mag
object will produce a gds file. You may be aware that gds and stream data refer to the same thing - streamout is the process of creating a gds file. The
Magic.StreamOut
function uses magic to convert def data to gds data.
Copy code
class StreamOut(MagicStep):
    """
    Converts DEF views into GDSII streams using Magic.

    If ``PRIMARY_GDSII_STREAMOUT_TOOL`` is set to ``"magic"``, both GDS and MAG_GDS
    will be updated, and if set to another tool, only ``MAG_GDS`` will be
    updated.
    """
There might be a
*.mag
artifact from that process. Is that what you’re using?
gds
data is binary,
mag
data is text. You can try editing the file to determine which. Maybe setting
cif *hier write enable
will fix it then. Or using just using the
CIFhier
property on the hierarchy with the error. > *hier write [ enable | disable ] > This sets a global option that enables (default) or disables the generation of output CIF or GDS layers due to interaction between subcells (not including inter-array interactions; see below). For large standard cell layouts where the standard cells are known to abut properly without causing spacing or overlap errors, disabling hierarchical generation can greatly reduce the amount of time needed to generate output. Defining the property CIFhier inside a cell will override the use of *hier write disable and force hierarchical output for that cell and its descendents. http://opencircuitdesign.com/magic/commandref/cif.html
y
I am using the .mag data, which is text. There's indeed also a binary gds file but that one is not even copied into the project wrapper.
m
Great! Is the spacing error you are seeing inside the hard macro, at the border of the hard macro, or unrelated to the hard macro? Would you be willing to try the
cif *hier write enable
option?
y
The error happens around sky130_fd_sc_hd_mux2___1 and _tapvpwrvgnd as far as I can tell. And I tried
cif *hier write enable
. The problem is still there.
m
Ok. Thanks for the screen shot. Can you turn off all the layers except psdm, diff, and tap and show me that?
y
Here it is. I also attach the .gds
m
That’s an unusual shape. It looks like the psdm layer has been added over the standard cells. Do you have a gds file for
shift_register_r95
? Does it show the same
psdm
?
I think what’s happening is that the magic is using the library gds for outputting the standard cells, but it’s also calculating
psdm
based on it’s assumption of
psdm
.
psdm
is not actually a layer that is stored in the magic data base. It is calculated as with the minimum overlap of diffusion adjusted to avoid spacing and width errors. You can see what magic will streamout as
psdm
with the
cif see PSDM
command (
feedback clear
to remove the markers). What I suggest you do is to not use the magic version of
shift_register_r95
but use the gds instead. Set
gds readonly yes
and then import the gds. Do not modify anything in
shift_register_r95
.