22 March 2021 at 16:04 #6387Tommaso LunghiParticipant
Dear Nazca Team,
in our designs we use a PDK based on nazca. I have a curiosity about the way to show pins.
We currently define which pins to be shown at the building block (bb) level (using nd.put_stub()..), however it is difficult to find a general rule about which pins to be shown that applies to all layout. Usually we use a boolean flag to print ALL pins in that BB. This method is too general and it results in too many unused pins and confusing layout pins.
Is it possible to define which pin to show not at the cell definition but in the main code?
I was thinking to something like:
#In the pdk... def BB_1(): with nd.Cell() as C: ...cell definition... nd.Pin('a0').put() nd.Pin('b0').put() #NO nd.put_stub() here! return C # In the main code cellA = BB_1() cellA.put() cellA.showpins('a0') # pin 'b0' will not be shown in this layout
Thanks for your reply and for the really nice work.
Tommaso22 March 2021 at 21:34 #6391RonaldKeymaster
Good to hear Nazca works well for you.
In principle, a cell should not be changed after creation and there is no need for that. Note that the
put_stub()does accept a list of pins, so if you only want to see pin ‘a0’, simply use
nd.put_stub('a0'). But I think that’s what you use your boolean for that you mentioned, i.e. change that list of pins.
That said, the stub/pin features discussed here are just a visualization of the pin, and the pin (Node object) actually already has a (sleeping) “show” attribute. It would not harm the cells fundamental features (like its connectivity) when changing the “show” after cell closure. It would quite straight forward to implement a
cellA.showpins()method, and subsequently filter on the “show” attribute at time of mask export. It can actually be useful to clean up the layout view this way. Hence, I will add the lines for the next release (after 0.5.13).
Ronald3 May 2021 at 09:45 #6467RonaldKeymaster
Some updates will be available in nazca >0.5.13 to add or hide stubs after cell creation (in closed cells).
The put_stub function has been ported as a Cell method, hence, you can now also say
C.put_stub()where you use
nd.put_stub(). Along this path you can add stubs as
cellA.put_stub()after the cell is closed; By exception, as normally you will get (a desired) Python Exception when connecting to a closed cell directly (in a circuit you would connect to an instance of the cell, not the cell itself). Still, it is advised not to add stubs after cell closure, because such changes will not be reflected in the bounding box of the cell, which may even lead to netlist errors when stubs/pins are placed outside the bbox.
Better is to place all the stubs you may want to visualize inside the cell during cell creation, as would be the normal situation. Then use the new cell method
hide_stub(), which will exclude stubs and their annotation from export; The hide_stub method will be allowed to operate on closed cells.
An other way to hide stubs, also used in Nazca PDKs, is placing them in logical layers and just switch them off in the layer view. This will affect all stubs at once, and not a selected few though.
Ronald3 May 2021 at 11:22 #6468Tommaso LunghiParticipant
Dear Roland, nazca teams
thanks for your reply and for the improvement.
Better is to place all the stubs you may want to visualize inside the cell during cell creation, as would be the normal situation. Then use the new cell method hide_stub(), which will exclude stubs and their annotation from export; The hide_stub method will be allowed to operate on closed cells.
This looks exactly as I was thinking. I am looking forward to use it.
- You must be logged in to reply to this topic.