Coder Social home page Coder Social logo

Comments (5)

heitzmann avatar heitzmann commented on September 28, 2024

@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.

from gdspy.

hashhsah avatar hashhsah commented on September 28, 2024

@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:

  1. linkcad correctly says that the two flags marks absolute mag/rot, and should be avoided.
  2. artwork incorrectly says that angle record should only follow when rotation flag is set.

However, the original GDSII format manual is quite clear about this in page 4-10, and example is given in page 7-5.

from gdspy.

heitzmann avatar heitzmann commented on September 28, 2024

The test cases will not check those flags, so that won't tell us much.
From what you're describing, Gdspy always uses relative mag/rot when importing or displaying, but writes absolutes. Commenting those 2 lines will make it self consistent by supporting only relative transformations.
Would that break the CAD in other tools, such as artwork? Or, more importantly, manufacturing tools (which from my experience always use relative transforms)? In that case, maybe there should be some sort of flag to enable setting those bits even if incorrectly. Thoughts?

from gdspy.

hashhsah avatar hashhsah commented on September 28, 2024

From what you're describing, Gdspy always uses relative mag/rot when importing or displaying, but writes absolutes. Commenting those 2 lines will make it self consistent by supporting only relative transformations.

Yes. I think so too.

Would that break the CAD in other tools

I noticed this issue when the "golden" commercial LVS tool emits the following error message

ERROR: Absolute angle in placement of cell test_cell within cell Array_1 not supported.

I checked a few gds files produced by Klayout, and realized that Klayout only uses relative mag/rot.
In fact, if you prepare a gds file with gdspy, open it in Klayout, and save as a new file, you'll see that Klayout clears the absolute mag/rot flags.

I guess Klayout authors can clarify this matter more clearly.

from gdspy.

heitzmann avatar heitzmann commented on September 28, 2024

I've checked the source of klayout and indeed they support only relative transforms.
We'll do the same in Gdspy (fixed in 8747c08 and 75658c3).

from gdspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.