-
-
Notifications
You must be signed in to change notification settings - Fork 126
distinguish relative vs absolute transform #35
Comments
@hashhsah Thanks for the suggestion. I've read the reference you've sent, but it does not explicitly define what happens when the absolute flags are not set. When you mention relative mag/rot, how are they applied to the geometry of the referenced cell? That's what is missing and I couldn't find in any other reference so far. |
@heitzmann you could try commenting out these two lines, and see that it still passes all your testcases. word += 0x0004
...
word += 0x0002 I ran some tests on our project, commenting these two lines actually produces correct result for us, because we only use relative mag/rot. Admittedly, there are conflicting descriptions on the gds format:
However, the original GDSII format manual is quite clear about this in page 4-10, and example is given in page 7-5. |
The test cases will not check those flags, so that won't tell us much. |
Yes. I think so too.
I noticed this issue when the "golden" commercial LVS tool emits the following error message
I checked a few gds files produced by Klayout, and realized that Klayout only uses relative mag/rot. I guess Klayout authors can clarify this matter more clearly. |
gdspy doesn't seem to distinguish between relative vs absolute transform for AREF/SREF records. For example,
CellReference.to_gds()
contains the following lines:0x0004 (absolute magnification) and 0x0002 (absolute rotation) flags in STRANS are always set when there's magnification or rotation.
Unfortunately, absolute mag/rot should be avoided in hierarchical designs with many nested levels, where absolute transforms quickly get out of control. In most cases, we should only use relative magnify/rotate in designs. This is done by clearing these two flags, while still appending the MAG and/or ANGLE records.
In short, gdspy should support and distinguish between absolute and relative transforms, with relative transform being the default.
The following page documents this matter with great details:
http://boolean.klaasholwerda.nl/interface/bnf/gdsformat.html#rec_strans
The text was updated successfully, but these errors were encountered: