Home › Forums › Nazca › Questions and Answers › Finding the width of a pin
Tagged: pin, Interconnect, width
- This topic has 6 replies, 3 voices, and was last updated 1 week, 6 days ago by LaserJon.
-
AuthorPosts
-
23 March 2021 at 13:19 #6392LaserJonParticipant
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
23 March 2021 at 14:02 #6398XaveerModeratorHi 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
26 March 2021 at 21:52 #6419LaserJonParticipantThanks 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
29 March 2021 at 19:06 #6424LaserJonParticipantHello, 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
29 March 2021 at 20:42 #6428RonaldKeymasterDear 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
29 March 2021 at 21:59 #6430LaserJonParticipantDear Ronald,
Thank you! This also won’t be much effort to update once the new version comes out with the radius attribute.
Jon
30 March 2021 at 19:22 #6432LaserJonParticipantAdding 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.
-
AuthorPosts
- You must be logged in to reply to this topic.