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..
with nd.Cell() as C:
#NO nd.put_stub() here!
##In the main code
cellA = BB_1()
cellA.showpins('a0') #pin 'b0' will not be shown in this layout
Thanks for your reply and for the really nice work.
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']), or nd.put_stub('a0'). But I think that’s what you use your boolean for that you mentioned, i.e. to play/change that list of pins.
That said, the stub/pin features discussed here is just a visualization part of the pin, and the pin (Node object) actually already has a (sleeping) “show” attribute. In addition, 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. And most of all, 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.12).