Import GDS into pcell

Hi,

Is there a way to import GDS into a pcell and add more shapes to it based on pcells parameters?

Thanks.

Comments

  • I do not know, but I long for a graphical PCell editor like C*dence Edge. That would be an avenue like you seek.
  • @JinWallner Basically it is, yes.

    A PCell usually lives in a library. A library contains static and PCells. Library PCells can reference cells from the library they live in (cross referencing is also possible, but I'd try to keep everything in one place).

    So you can create a PCell that places an instance to your static cell which you loaded into the library in the library constructor. Then you can add new shapes in addition to this instance which effectively adds them to the resulting cell layout.

    Matthias

  • Hi @Matthias @JinWallner

    Here is a way to do this:

    def produce_impl(self):
        # Load the geometries into KLayout
        import os
        dir_path = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../gds/"))
        filename = os.path.join(dir_path, 'cellname.gds')
        tech_name = 'xxx'
        ly2=pya.Layout()
        ly2.read(filename)
        top_cell = ly2.top_cell()
        top_cell.flatten(True)
        self.cell.copy_shapes(top_cell)
    
Sign In or Register to comment.