Forum Replies Created

Viewing 9 posts - 61 through 69 (of 69 total)
  • Author
    Posts
  • in reply to: GDS handling in nazca #5385
    Xaveer
    Moderator

    Dear Weiming,

    You could use the following:

    import nazca as nd
    
    cells = nd.load_gds('input_abc.gds', asdict=True)
    
    # Assume this file has top cells 'a', 'b' and 'c'.
    
    # Only export 'a' and 'b'.
    export_cells = [cells['a'], cells['b']]
    
    nd.export_gds(export_cells, filename='export_ab.gds')

    Please note that the name of the exported cell can be different when it was already in use when importing the gds file. The actual cell name is in e.g. cells['a'].cell_name

    Xaveer

    in reply to: curve function with length as an input #5376
    Xaveer
    Moderator

    Dear Sara,

    In your example you could connect pin1 and pin2 with a bend() of which you know the length. You can then insert straight sections to achieve the length variation (as a trombone…).

    Xaveer

    in reply to: digital place of Pin[] #5375
    Xaveer
    Moderator

    Dear Eric,

    Internally the coordinates are stored as floats, so the number of digits is dependent on the machine representation and the operations that have taken place. When written to a GDS file, the xy-coordinates are changed to integers with the least significant digit representing (typically) 1 nm, so three digits when converted to microns.

    Just printing the node or pin information just shows a string representation of that object, and the number of digits is not necessarily the same as the internal representation.

    See this example:

    import nazca as nd
    
    s = nd.strt(length=10).put(1.23456789, 1.23456789, 1.23456789)
    print(s.pin['a0'])
    print(s.pin['a0'].xya())

    which prints

    <Node(id=12, name='straight_2_a0_1') object in cell 'straight_2', xs='None', width =1.0, xya=(1.235, 1.235, 181.235), remark='None'>
    (1.23456789, 1.23456789, 181.23456789000002)

    clearly with more digits.

    Xaveer

    in reply to: quasi-curved polygon! #5345
    Xaveer
    Moderator

    Hi Sara,

    If you need a polygon with a hole in GDS, you need to do something like shown in the figure:

    rectangle with hole

    You cannot add pins to a polygon, but you can put the polygon in a cell and add pins to the cell. Just have a look at the Nazca tutorial: create-bb-using-polygon

    That should work.

    Xaveer

    in reply to: Generic Bend #5231
    Xaveer
    Moderator

    Dear Douglas,

    Your approach is much more complex (and error prone) than it needs to be. You better use the interconnect module to provide you with a pcurve connection.

    Here is how it can be used for your problem:

    import nazca as nd
    import nazca.generic_bend as gb
    
    # Define interconnect
    myIC = nd.interconnects.Interconnect(radius=10, width=2, layer=10)
    
    # Defining bends
    bend1 = nd.bend(radius=10, angle=-30, width=2).put(0,0)
    b = nd.strt(length=1, width=2).put(70,0)
    bend2 = nd.bend(radius=10, angle=30, width=2).put(b.pin['a0'])
    
    myIC.pcurve_p2p(bend1.pin['b0'], Rin=10, Rout=10).put()
    
    # Defining straights
    straight1 = nd.strt(length=10, width=2).put(0,20)
    straight2 = nd.strt(length=10, width=2).put(60,40)
    
    myIC.pcurve_p2p(straight1.pin['b0'], straight2.pin['a0']).put()
    
    nd.export_gds(filename='no_issue1.gds')

    Also note that the radius (Rin,Rout) you specify in the pcurve_p2p() function need to match the radius of the curves you connect to (with the proper sign).

    Xaveer

    in reply to: Nazca and simulation software #4994
    Xaveer
    Moderator

    If you are looking for stand-alone open source software for simulation of photonic components or circuits, then there is plenty to find on the web. Each with their own interface, which makes using them not always straightforward.

    A number of tools (without any claim of completeness or even usefulness) is listed here:

    • Manfred Hammer’s “simulations in integrated optics”, http://siio.eu (not open source but free for use)
    • CAMFR – full-vectorial Maxwell solver (open source)
    • mpb – MIT photonic bands (open source)
    • meep MIT electromagnetic equation propagation, FDTD (open source)
    • openEMS – EM field solver, FDTD (open source)
    • SMU photonics group – different tools for photonic simulations (free for use or open source)
    in reply to: Where can I set straight-to-bend waveguide offset #4453
    Xaveer
    Moderator

    Dear Alvin,

    If you want to use Nazca to implement your own PDK for a specific “fab” (could be your own process), then you need to implement that yourself. Demofab provides a demonstration of how the technology of such a fab could be implemented in Nazca. So you should probably use demofab as a template for implementing your own technology.

    However, to answer your question, you can specify your own offset function to calculate and apply the proper offset in your technology, as a function of bend radius and waveguide width, for a specific waveguide cross section. Here is an example of a custom offset function for the “shallow” waveguide cross section implemented in demofab:

    import nazca as nd
    import nazca.demofab as demo
    from math import copysign
    
    # Function needs to implement proper offset for *your* technology.
    def my_os_shallow(width, radius):
        '''Straight to bend offset as function of waveguide width and radius.'''
    
        offset = 0.5 # just a fixed value here as an example
    
        return copysign(offset, radius)
    
    # Example with demofab default:
    demo.shallow.strt(100).put()
    demo.shallow.bend(radius=500, angle=45).put()
    demo.shallow.strt(100).put()
    
    # Use the new offset function
    demo.xsShallow.os = my_os_shallow
    
    # Example with new offset value:
    demo.shallow.strt(100).put(0, 20)
    demo.shallow.bend(radius=500, angle=45).put()
    demo.shallow.strt(100).put()
    
    nd.export_gds()

    If all you need is a single-value offset, you can also specify just that value, e.g.:
    demo.xsShallow.os = 0.03

    Xaveer

    in reply to: Polygon subtraction function #4451
    Xaveer
    Moderator

    Dear Alvin,

    A good solution is to define a large rectangle and use the boolean operations in (e.g.)  KLayout to subtract all structures from it. The DRC engine in KLayout is an excellent tool to automate this if needed.

    Another solution could be to let the mask manufacturer take care of the inversion. You can typically specify dark field or bright field polarity.

    In principle you can use pyclipper and create a large rectangle and subtract all polygons in the layer you want to invert from it. However, since the pyclipper definition of gaps in a structure is not compatible with GDS, this will in general not work.

    Xaveer

    in reply to: Building block from a gds file #4426
    Xaveer
    Moderator

    Dear Kristif,

    There is a tutorial precisely on this: https://nazca-design.org/how-to-make-bb-from-gds/

    That shows how to import a cell from the GDS file and add pins to it in order to use the full Nazca tool set to connect it to the rest of your circuit, just like any other building block.

    Xaveer

Viewing 9 posts - 61 through 69 (of 69 total)