- This topic has 6 replies, 2 voices, and was last updated 7 years, 2 months ago by
Douglas.
-
AuthorPosts
-
13 November 2018 at 17:57 #5261
Douglas
ParticipantHi all,
Still on tapers, but now on a linear one. I am facing one issue when trying to define a taper inside a function. Some additional polygons are appearing.
Here’s the code.import nazca as nd import nazca.interconnects as IC nd.add_layer2xsection(xsection='slabXS', layer=10, accuracy=0.001) icSlab = IC.Interconnect(width=0.49, radius=10, xs='slabXS') def slabTaper(length=3.0, ribWidth=0.49, slabWidth=2.0): with nd.Cell(name='SlabTaper_{}_{}'.format(length,slabWidth)) as bb: #Place Taper chTaper = icSlab.taper(length=length,width1=ribWidth,width2=slabWidth) chTaper.put(0,0) #Put Pins nd.Pin('a0', pin=chTaper.pin['a0']).put() nd.Pin('b0', pin=chTaper.pin['b0']).put() #Put stubs nd.put_stub() return bb functionTaper = slabTaper(length=4.0, ribWidth=0.49, slabWidth=2.0) variableTaper = icSlab.taper(length=4.0,width1=0.49,width2=2.0) functionTaper.put(0,0) variableTaper.put(0,5) nd.export_gds(filename='tapers.gds')Any idea if that is an issue and on how to solve that?
Thanks,
Douglas14 November 2018 at 10:57 #5262Ronald
KeymasterDear Douglas,
The “extra polygons” you see are stubs to visualize connections between components.
You do not need stubs on interconnects, as interconnects are their own stubs already.Solution: remove the nd.put_stub()
Ronald
14 November 2018 at 11:35 #5268Douglas
ParticipantAh ok!
But like this I also lose the names of the ports, right?
Is there a way to see the port names and not these additional polygons as in other building blocks?
Thanks,
Douglas
14 November 2018 at 11:53 #5269Ronald
KeymasterDear Douglas,
To see the pinname and arrow but not the xsectional info of the stub:
nd.put_stub([], length=0) # [] assumes a stub for all pins in the cell.or
nd.put_stub(['a0', 'b0'], length=0) # explicitly set a stub for pin 'a0' and 'b0'.Ronald
14 November 2018 at 12:32 #5270Douglas
ParticipantNot sure am doing it right, but when I add
# Export nodes nd.Pin('a0', pin=inTpr.pin['a0']).put() nd.Pin('b0', pin=outTpr.pin['a0']).put() # Put stubs nd.stub([], length=0) nd.put_stub()inside my cell definition, I get a:
AttributeError: module ‘nazca’ has no attribute ‘stub’
Is this the right place to put it?
14 November 2018 at 13:16 #5272Ronald
KeymasterMy typo mistake. I corrected it in the original code line above.
14 November 2018 at 19:37 #5274Douglas
ParticipantThanks!
All set.PS: did you guys managed to check my other issue with the bent tapers. I am getting some spurious points on the code I created, maybe I missed something… Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.