Giter Site home page Giter Site logo

Comments (3)

tvt173 avatar tvt173 commented on July 28, 2024 1

hmm this is some messy code with a lot going on...
I recommend you start with the example here and slowly modify it towards what you need
https://gdspy.readthedocs.io/en/stable/gettingstarted.html#references

from gdspy.

tvt173 avatar tvt173 commented on July 28, 2024 1
  1. I believe lib.new_cell() first creates the cell, then adds it to the library. If you are creating a cell with gdspy.Cell() instead, you should be sure to write it to a library afterwards. Then it is that library that you write to gds.
  2. References do have a small memory footprint also. In your example, you appear to have hundreds of thousands of references, so I would still expect a somewhat considerable size, though it should still be smaller than a flattened cell, as long as each of those references is more complex than i.e. a simple rectangle. You may be able to drive down size further by using CellArrays instead.

from gdspy.

jamesvitali avatar jamesvitali commented on July 28, 2024

thanks @tvt173
now it can work but still have 2 questions:

  1. in the example you recommend, it uses "gdspy.Cell" to create a cell, but the result is empty; however, if use "lib.new_cell" instead (not only the first cell), the result can be seen with klayout, do you know why?
  2. now I use "lib.new_cell" to create cells (around 16), and each cell has its own references. I found the gds size will go larger along with the number of references. is that normal? I thought the size only depends on the number of cell you created, am I wrong?

Cell ("cell_final_5", 0 polygons, 0 paths, 0 labels, 2188 references)
Cell ("cell_final_6", 0 polygons, 0 paths, 0 labels, 4752 references)
Cell ("cell_final_7", 0 polygons, 0 paths, 0 labels, 6492 references)
Cell ("cell_final_8", 0 polygons, 0 paths, 0 labels, 7508 references)
Cell ("cell_final_9", 0 polygons, 0 paths, 0 labels, 10604 references)
Cell ("cell_final_10", 0 polygons, 0 paths, 0 labels, 10856 references)
Cell ("cell_final_11", 0 polygons, 0 paths, 0 labels, 14060 references)
Cell ("cell_final_12", 0 polygons, 0 paths, 0 labels, 16192 references)
Cell ("cell_final_13", 0 polygons, 0 paths, 0 labels, 19520 references)
Cell ("cell_final_14", 0 polygons, 0 paths, 0 labels, 20820 references)
Cell ("cell_final_15", 0 polygons, 0 paths, 0 labels, 21456 references)
Cell ("cell_final_16", 0 polygons, 0 paths, 0 labels, 20508 references)
Cell ("cell_final_17", 0 polygons, 0 paths, 0 labels, 19752 references)
Cell ("cell_final_18", 0 polygons, 0 paths, 0 labels, 19080 references)
Cell ("cell_final_19", 0 polygons, 0 paths, 0 labels, 20516 references)
Cell ("cell_final_20", 0 polygons, 0 paths, 0 labels, 2200 references)

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.