Forum Replies Created

Viewing 20 posts - 21 through 40 (of 69 total)
  • Author
    Posts
  • Xaveer
    Moderator

    Dear Cameron,

    To start with the second question: what you see is the effect of the way “cross sections” are implemented.

    This is done to have a single structure write all relevant layers, typically of a waveguide.

    In demofab this is done for (in your example) the “Shallow” cross section. You can find the cross sections by calling nd.show_xsections().

    You can see which layers are part of the cross sections by calling nd.show_xsection_layer_map(), which shows indeed that there are two layers: “Shallow” and “ShallowTrench” that get drawn, where the second is 8 microns wider than the first. The first is as wide as the specified width of the waveguide.

    How to work with cross sections is explained in tutorial https://nazca-design.org/xsections_and_layers/ and https://nazca-design.org/implement-a-cross-section/

    To make use of this, a post-processing step may be needed in order to subtract one structure from the other. This is efficiently done in KLayout. See my answer to this post for some explanation: https://nazca-design.org/forums/topic/creating-priority-rule-for-overlapping-layers-in-specific-regions/

    The answer to your first question is related: you can specify an absolute or relative “grow” in x and y to achieve what you want. This example will use an absolute grow.

    import nazca as nd
    
    nd.add_layer(name="Main", layer=(1, 0), accuracy=0.001)
    nd.add_layer(name="Grow1", layer=(2, 0), accuracy=0.1)
    nd.add_layer(name="Grow2", layer=(3, 0), accuracy=0.1)
    
    nd.add_layer2xsection("Myxs", layer="Main")
    nd.add_layer2xsection("Myxs", layer="Grow1", growx=2, growy=2)
    nd.add_layer2xsection("Myxs", layer="Grow2", growx=4, growy=4)
    
    nd.strt(xs='Myxs', width=10, length=20).put()
    
    nd.export_gds()

    Xaveer

     

    in reply to: Mandatory xsections #6507
    Xaveer
    Moderator

    Dear iv_tern,

    Could you please provide a minimum example that generates the error you get?

    Xaveer

    in reply to: Linear tapers #6495
    Xaveer
    Moderator

    Hi iv_tern,

    The taper_p2p functionality was added in 0.5.13 which is available on the website.
    An example:

    import nazca as nd
    import nazca.demofab as demo
    
    s1 = demo.deep.strt(10, 1).put(0)
    s2 = demo.deep.strt(10, 3).put(30)
    demo.deep.taper_p2p(s1.pin["b0"], s2.pin["a0"]).put()
    
    nd.export_gds()
    

    I’m not quite sure what you mean with “Replacing with taper_p2p gives a proper interconnect”.

    Xaveer

    in reply to: Issue with points density in curves, large polygons #6454
    Xaveer
    Moderator

    Hi Jon,

    It’s not obvious that more points will generate a better curve:

    [sorry, pictures still disabled]

    What will be better after fabrication is again a different question. And for the phase transfer, you’d have to integrate the propagation constant along curve and use the local curvature.

    For a circular bend the systematic error because the line is more often inside the curve is corrected for in Nazca so the phase transfer should be more accurate, or so I like to think.

    I guess an experiment testing with fewer and more points would be nice, but not easy?

    Xaveer

    in reply to: Issue with points density in curves, large polygons #6452
    Xaveer
    Moderator

    Dear Jon,

    It doesn’t make sense to reduce the accuracy below 0.001, because 1 nm is the accuracy of the GDS file. So in the end, your extra points will be snapped on the 1 nm grid anyway. Although this minimum grid size can be reduced, that will also reduce the maximum total size of the mask and is not a common thing to do. If you want to do this anyway, have a look at my answer to https://nazca-design.org/forums/topic/opening-gds-file-regarding-its-precision-or-accuracy/

    I don’t think your proposed solution of joining structures on different layers with different accuracies will work (but I’m open to being convinced otherwise…).

    The upcoming release of Nazca does properly handle the integer overflow that you now see, which is caused by too many points in the polygon, as you already mentioned.

    Xaveer

    Xaveer
    Moderator

    Dear Caspian,

    Please have a look at the forum https://nazca-design.org/forums/topic/bending/ for an answer to a similar question.

    Xaveer

    Xaveer
    Moderator

    Dear Caspian,

    Have a look what happens if you change the sign of the angle of the bends.

    And spend some time going through the tutorials and the other documentation: https://nazca-design.org/manual/getting_started.html would be a good place to start!

    Xaveer

    Xaveer
    Moderator

    Dear caspian1360,

    Are you looking for something like this?

    import nazca as nd
    
    length_box = 4
    width = 3
    lay = 1
    radius = 100
    angle = 60
    
    wg = nd.strt(length=length_box, width=width, layer=lay).put(length_box / 2, 0, 0)
    nd.bend(radius=radius, angle=angle, width=width, layer=lay).put(wg.pin["b0"])
    nd.bend(radius=radius, angle=angle, width=width, layer=lay).put(wg.pin["a0"])
    
    # Or, directly using chain connections:
    lay = 2
    nd.bend(radius=radius, angle=-angle, width=width, layer=lay).put(0, 0, angle)
    nd.strt(length=length_box, width=width, layer=lay).put()
    nd.bend(radius=radius, angle=angle, width=width, layer=lay).put()
    
    nd.export_gds()
    

    If your structures need more properties (e.g. additional layers, default width and radius, etc.), find out more about cross sections and interconnects. Some tutorials will be useful, e.g. https://nazca-design.org/make_a_cell_put_a_cell/.

    Xaveer

    in reply to: Finding the width of a pin #6398
    Xaveer
    Moderator

    Hi Jon,

    You guessed correctly:

    import nazca as nd
    import nazca.demofab as demo
    
    taper = demo.deep.taper(length=5, width1=2, width2=4).put()
    print(taper.pin["a0"].width, taper.pin["b0"].width)
    
    nd.export_gds()
    

    Make sure to add those properties when setting the nd.Pin of your cell.

    Xaveer

    in reply to: How to draw "Raised Sine S-bend " in nazca ? #6336
    Xaveer
    Moderator

    Update: The (raised) sinebend is part of Nazca since version 0.5, as a standard interconnect.

    Xaveer
    Moderator

    Hi,

    There are several ways to speed this up (possibly by many orders of magnitude).

    • For repetitive structures (photonic crystals, gratings, …) you can use GDS arrays. See tutorial https://nazca-design.org/photonic-crystal-gds-array/
    • Using polygons (not cells) for mask elements, if you only need polygons. Cells act as circuit elements with pins and lots of extra info, which may not be needed. Reuse the polygon when possible:
    my_pol = nd.Polygon(points=[(),(),()...], layer=...)
    my_pol.put(...)
    my_pol.put(...)
    my_pol.put(...)
    
    • Switch off “group connect” (automated netlist connections) when not needed:
    nd.cfg.group_connect = False
    

    Xaveer (and Ronald)

    in reply to: Rounded Rectangle has no rounded edges #6334
    Xaveer
    Moderator

    Hi Christian,

    The rounded rectangle requires the pyclipper module: install with

    pip install pyclipper
    

    You should have seen a warning about “No pyclipper”?

    Xaveer

    in reply to: Draw special object into gdsii #6325
    Xaveer
    Moderator

    Dear alien007,

    I’m afraid I do not understand what it is you want to achieve. There is a tutorial on parametric curves, which may be what you’re looking for: nazca-design.org/free_form_curves/.

    You can program fractals by generating and placing the proper polygons. Not sure why you’d want that.

    Xaveer

    in reply to: ~1nm gaps in Tp_viper intersections #6309
    Xaveer
    Moderator

    Dear LaserJon,

    The issue with ~1 nm gaps is due to the GDS discretization. Please see this post for an explanation and possible solution: nazca-design.org/forums/topic/interconnect-module-error-in-drc-checking/.

    You may want to check with the foundry if this is going to be a problem for them. Some foundries will properly take care of this themselves.

    If this does not answer your question, please add an example so I can see in detail what the problem is.

    Xaveer

    in reply to: Connecting two cells within a cell #6303
    Xaveer
    Moderator

    Also, look at how to add the pins to your cells, to provide the proper connectivity. E.g. see https://nazca-design.org/make_a_cell_put_a_cell/

    in reply to: Connecting two cells within a cell #6301
    Xaveer
    Moderator

    Hi MirceaB,

    You need to connect the cell instance, not the cell itself, since that has no location:

    import nazca as nd
    import nazca.demofab as demofab
    
    with nd.Cell(name="cell1") as cell1:
        demofab.deep.strt(length=100).put()
    
    with nd.Cell(name="cell2") as cell2:
        demofab.deep.strt(length=200).put()
        wg1 = demofab.deep.bend(radius=100, angle=-180).put()
        demofab.deep.cobra_p2p(pin1=wg1.pin['b0'], pin2=(100, 100, 0)).put()
    
    with nd.Cell("Final") as final:
        cl1=cell1.put(200, 300, 0)
        cl2=cell2.put(500, 500, 0)
        demofab.deep.cobra_p2p(pin1=cl1.pin['b0'], pin2=cl2.pin['a0']).put()
    
    final.put()
    
    nd.export_gds(filename="test")
    

    Not sure if what you get now is what you want, but it should get you going.

    Xaveer

    Xaveer
    Moderator

    Dear Bastien,

    What is the error you get? When I run it the error comes from matplotlib, not from Nazca.
    If I replace export_plt() with export_gds() it runs fine.

    Xaveer

    Nazca 0.5.12, Matplotlib 3.3.2, Python 3.8.6. Error messsage:

    File "/usr/lib/python3/dist-packages/matplotlib/figure.py", line 321, in __init__
        if not np.isfinite(figsize).all() or (np.array(figsize) < 0).any():
    TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not
    be safely coerced to any supported types according to the casting rule ''safe''
    
    Xaveer
    Moderator

    Dear Marios,

    You can do almost anything with the DRC engine of Klayout. Please check the Klayout manuals on the website and the Klayout forum to find out.

    It is possible to specify the cell in the source command:

    source("nazca_export.gds", "cell")
    

    will use that cell.

    Xaveer

    Xaveer
    Moderator

    Dear Marios,

    This is best done with a combination of nazca and klayout. Here is an example nazca script:

    import nazca as nd
    
    nd.add_xsection("marios")
    nd.add_layer2xsection(xsection="marios", layer=1)
    nd.add_layer2xsection(xsection="marios", layer=2, growx=10)
    nd.add_layer2xsection(xsection="marios", layer=3, growx=12)
    
    marios = nd.interconnects.Interconnect(xs="marios", radius=100)
    
    marios.strt(length=200, width=2).put(-100, 0, 0)
    marios.bend(radius=100, angle=-45, width=1.5).put(0, -2.2, 0)
    marios.bend(radius=100, angle=45, width=1.5).put(0, -2.2, 180)
    
    nd.export_gds()
    

    and the corresponding klayout script (save as “some_name.drc”):

    # Run with: klayout -b -r some_name.drc
    source("nazca_export.gds")
    target("output.gds", "processed")
    
    # Input waveguide layer (and "heal" tiny gaps)
    wg = input(1).sized(1.nm).sized(-1.nm)
    red = input(2)
    blue = input(3)
    
    # Subtract waveguide from red layer and output blue and new red layers
    result = (red - wg)
    result.output(12)
    blue.output(13)
    

    Run the latter script as argument to klayout from the command line:
    “klayout -b -r some_name.drc” and your output will be in the output.gds file.

    Xaveer

    in reply to: opening gds file regarding its precision or accuracy #6222
    Xaveer
    Moderator

    Dear Moosonglee,

    This can be done with Nazca in the following way.

    When reading in the gds file, specify scale=0.1 as argument for load_gds. That ensures that the objects will have the intended size.

    When writing out the new gds file e.g. with export_gds, the default resolution of 1 nm will be used, which means you’ll loose the 0.1 nm (0.0001 um) precision.

    If you want to keep that resolution, you have to specify the following before exporting:

    nd.gds_base.gds_db_unit = 1e-10
    nd.gds_base.gds_db_user = 0.0001
    

    Other values can be used as well, but db_unit / db_user has to remain 1e-6 because the internal unit in Nazca is 1 um.

    All of this should be used with care, so know what you are doing!

    Xaveer

Viewing 20 posts - 21 through 40 (of 69 total)