Home Forums Nazca Questions and Answers Finding the width of a pin

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6392
    LaserJon
    Participant

    Hello,

    I haven’t been able to figure out how to find the width of a pin.  Is there a way to read the information, something like typing cellname.pin[‘a0’].width?  This would help me design some custom connector functions by just passing cells or pins and not explicitly adding a pin width.  Having to specify the pin width in two places increases chances of error.

    Thanks,

    Jon

    #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

    #6419
    LaserJon
    Participant

    Thanks Xaveer.  I’m not sure how I missed this.  I probably tried it on a pin where the width was not defined, and got ‘None’ back.  Anyway I will use this from now on.

    Jon

    #6424
    LaserJon
    Participant

    Hello, I have a follow-on question here.

    I’m trying to do some interconnects where I make all curvature changes continuous, and log the total path length in the cell. Below is an example of how I did it.

    Do you see any issue with adding to the dictionary cell[‘properties’]?  For instance I was afraid it might mess up use of the @hashme decorator.

    Thanks, Jon

    with nd.Cell(hashme=True, autobbox=True) as cell:
        curve = nd.Polygon(points=poly_pts, layer=layer).put(0)
        nd.Pin('a0', width=width).put(0, 0, 180)
        nd.Pin('b0', width=width).put(x1, y1, ang1)
        nd.put_stub()
        cell.properties['parameters']['curvature'] = {'a0':curve_in, 'b0':curve_out}
        cell.properties['parameters']['length'] = pathlength
    #6428
    Ronald
    Keymaster

    Dear Jon,

    The properties dict works fine as you use it.

    Note that from Nazca >0.5.12 there will be a pin.radius attribute to store the radius directly in the pin. This also allows pin2pin DRC on connections, in addition to xs, width, angle and symmmetry checks.

    Ronald

    #6430
    LaserJon
    Participant

    Dear Ronald,

    Thank you! This also won’t be much effort to update once the new version comes out with the radius attribute.

    Jon

    #6432
    LaserJon
    Participant

    Adding for anyone using the forum as a reference, this line from the example above can be replaced:

    cell.properties[‘parameters’][‘length’] = pathlength

    Instead use:

    cell.length_geo = pathlength

    This enables the path length to be used in the nazca.trace module to find total path lengths of several elements’ paths.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.