Home › Forums › Nazca › How to pass down pcell arguments in the replaceCells function ? › Reply To: How to pass down pcell arguments in the replaceCells function ?
Dear Cecil,
If I understand your new question correctly you want to add an extra parameter, here width_output, on your side to the whitebox in addition to the blackbox parameters. Such a parameter should not affect any pin positions or bbox size. I can not image a direct use case, unless you do something like porting the same black box to two different processes internally. You can probably use the partial method from Pythons functools module. It basically applies, in the example below, the width_output parameter before feeding the white_pcell into the replacement dictionary. After partial(white_pcell, width_output) only the blackbox parameters are left. Referring to the example code in my reply above above this looks like
from functools import partial
...
def white_pcell(width_wg, offset, radius, width_output):
# do other things
...
d = {'blackbox': partial(white_pcell, width_output)}
Ronald