Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • garbagebag
    Member

    Lorenzo,

    I am using Windows. Just to clarify, I do not manipulate the GDS using Klayout. I am using the Klayout python to edit raw polygons which are extracted from Nazca cells. The edited polygons are then put back into the cell, which is put into the top cell and generated as GDS by Nazca.

    -Garbage

    in reply to: Iterate over a cell and return polygons from child cell #6617
    garbagebag
    Member

    Ronald,

    Thank you very much for your help! I have implemented the second method as my cell hierarchy is pretty flat already. It works beautifully.

    Much appreciated,
    -garbage.

    in reply to: Iterate over a cell and return polygons from child cell #6586
    garbagebag
    Member

    Xaveer,

    Generally, I am trying to use Boolean operations to define shapes with interior geometry that are otherwise difficult to build from primitives.

    In this specific case, I have a die-level GDS that consists of an array of different PICs. Each PIC cell (by this I mean a nazca cell) consists of:

    1. a “tile” cell, which has probe pads, test structures, and fabrication process monitors
    2. a “device” cell, which is a photonic waveguide device like a laser, SOA, or MZM
    3. some interconnect objects to connect the pads in the tile to the vias in the device

    The tile cell is complicated but relatively uniform across all the PICs, with a few exceptions, mainly the waveguide in the device cell has a few layers that need to be Boolean subtracted (NOT operation) from a big square in the tile cell. It would be highly desirable to have a uniform p-cell for the tile that was reusable across the entire die and in later masks, and just use some Boolean operations to adapt the geometry inside the tile cell for the specific device that is with it inside the PIC cell.

    Another reason would be to invert the polarity of pattern to adapt it for the specific photoresist tone.

    Previously I have done these Boolean operations in klayout using a DRC script, but, at least for the way that I know how to do it in klayout, the Boolean operations affect the entire mask. This presents some difficulty, as there were eventually a lot of these operations. It became difficult to mentally imagine what the final outcome would be. Some PIC cells needed a different set of Boolean operations, and this required the creation of a bunch of virtual layers which were Booleaned and then added back into the physical layer. It was a big headache, and during the fabrication, there were many errors in the mask that resulted from this extra complexity.

    Ideally, I envision a “p-cell”, which is basically a Python function with some design information as an input, which produces a Nazca cell and then a GDS cell, that is fully complete, so that either the python function or the resulting GDS cell can be transported from one mask layout to another without someone (me) having to chase it around and apply the correct klayout DRC script to it.

    So to accomplish this, I have learned that the klayout Boolean algorithms are accessible as a Python library. They are very robust at resolving the specific issue of polygons with interior geometry and making them compatible with GDS. I can post a simple example of how to do this if you are interested in seeing it. This way a Python function that creates a Nazca cell can do Boolean operations and edit the polygons either before putting them into the cell, which works really nicely already, or after the polygon has been put into the cell but before the cell has been instanced, which is what I’m trying to do here and is more difficult.

    The only issue left is that the Nazca polygon class has to be converted somehow into a klayout polygon class, which is where I run into a problem. In Nazca it is simple and often very helpful to make a many layers deep cell hierarchy, but for the Boolean operation to be successful, the piece of geometry in the “tile” cell (in my example it is just a square) and the geometry of the waveguide trench (which is hopefully arbitrary and maybe very complicated, like an MZM with all adiabatic bends) need to be simple polygons in the coordinate system of the PIC cell.

    Open to any suggestions, even if the suggestion is that the idea is impractical.

    Thanks.

    in reply to: Sub-1-nm geometry #6037
    garbagebag
    Member

    I was able to find the problem with my code. The “nd.gds_base.gds_db_user” variable also needs to be reduced by the same amount as “nd.gds_base.gds_db_unit”, then the GDS shapes scale properly without using the “scale” keyword argument when putting the cell and sub-1-nm geometry is drawn correctly.

    So the following code has the expected behavior:

    import nazca as nd
    unit=1e-5
    nd.gds_base.gds_db_unit = unit*1e-6
    nd.gds_base.gds_db_user = unit
    
    nd.clear_layers()
    nd.add_layer(name='one',layer=1,accuracy=1e-5)
    nd.add_layer(name='two',layer=2,accuracy=1e-5)
    
    nd.strt(length=1.15e-3,width=1e-3,layer='one').put()
    
    with nd.Cell() as x:  
        nd.strt(length=1.15e-3,width=1e-3,layer='two').put()
        
    x.put(0,0)
    nd.export_gds(filename='tinyguy.gds')
Viewing 4 posts - 1 through 4 (of 4 total)