Home Forums Nazca Straight taper

Tagged: ,

This topic contains 6 replies, has 2 voices, and was last updated by  Douglas 7 months, 1 week ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5261

    Douglas
    Participant

    Hi 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,
    Douglas

    #5262

    Ronald
    Keymaster

    Dear 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

    #5268

    Douglas
    Participant

    Ah 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

    #5269

    Ronald
    Keymaster

    Dear 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

    • This reply was modified 7 months, 1 week ago by  Ronald. Reason: Corrected nd.stub into nd.put_stub
    #5270

    Douglas
    Participant

    Not 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?

    #5272

    Ronald
    Keymaster

    My typo mistake. I corrected it in the original code line above.

    #5274

    Douglas
    Participant

    Thanks!
    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

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.