Hi all, Is there any way to write a selected block...
# magic
m
Hi all, Is there any way to write a selected block into a
gds
file? Currently when I type gds in the console, it will write the whole design.
m
If you load the block so that it is the top level, you should be able to, I think.
m
Unfortunately, the block is manipulated by the layout-designer directly in the final layout. So I’d like to extract the latest changes of the final design to a GDS file (which the block is part of the root).
t
I'm still not sure what you are trying to do. As Matt said, if there is a subcircuit
mysub
somewhere in the hierarchy of the layout
mytop
, then
load mysub
followed by
gds write
will write an output
mysub.gds
containing only that subcell and its descendents. But it sounds like maybe what you want to do is to (1) load a GDS file, (2) edit a specific cell in the layout, (3) write back the GDS file with the modified cell without modifying anything else in the layout. If so, I can give you instructions how to do that (it's not trivial, but it can be done).
m
@Tim Edwards Tim, I think I understood your point, introducing any new changes will be related to the top most cell not the sub-circuit. So let me change/ask my question this way: Is it possible to select any arbitrary box in a layout and write “WHATEVER INSIDE the BOX” into a GDS file?
t
@manili: Not precisely. But you can do this: (1) set the box where you want GDS generated; (2) do
flatten -dobox newcell ; load newcell ; gds write
.
1
m
@Tim Edwards Hi Tim, Do you have any idea why I’m getting
1 problems occurred.  See feedback entries.
error while trying to extract a new GDS file out of the selected box? I thought this is an ignorable error, but looks like it isn’t. It seems that some parts of the design are missing during the new GDS creation process.
t
@manili: If there are "parts missing" they should produce other error messages. The feedback entries are generally for things like multiple labels on different parts of a net, although sometimes "parent and child disagree" errors can be a real problem in the resulting GDS. To see them, after running "gds write", select the whole cell and do "feedback why" (or "feedback find"). If the GDS is generated in batch, then use "feedback save <file>" (which can be read back with "source" to regenerate the error messages, or you can just check the entries in the file manually).
m
@Tim Edwards Thanks a lot Tim. Looks like the issue is becoming clear. Here is the result of
feedback why
:
Copy code
CIF error in cell avsddac, layer MCON: no room for contacts in area!
Unfortunately, I’m not a layout expert. Would you mind help me resolve the issue, please?
t
@manili: Magic generates contact cuts in the middle of drawn contact areas. If the area is too small, and there is no room for contact cuts (without violating design rules), then magic will flag an error. This is an important error, because it indicates that you may think you have a connection, but you don't. The problem should be flagged as a DRC error, though.
m
@Tim Edwards Tim I’m getting confused! When I try to open the layout as a
mag
file, there is no DRC errors, however opening the layout as a
gds
file leads to more than 5000 errors! Which one is correct?
t
@manili: Magic's GDS read and write are not symmetric.
mag
-->
gds
-->
mag
will not produce the original layout. That said, though, usually it will read back DRC clean, but it depends somewhat on the layout. What sort of errors do you see?
m
@Tim Edwards Even a simple INV would make 1 DRC error in the GDS format. It says:
Copy code
Diffusion contact spacing < 0.17um (licon.2)
And it contains 2 row with the same 4 numbers (coords).
t
@manili: That is most likely one of the cases where reading back GDS doesn't produce good layout; if contacts are placed catecorner, for example, then trying to regenerate the contact areas (in magic) from the contact cuts (in GDS) when reading the GDS back in will produce lots of artifacts. Those are probably not a real issue. If you are concerned about it, please post the
.mag
file for the inverter and I can tell you whether it is a problem or not.