Home › Forums › Nazca › Caching non-parametric cells › Reply To: Caching non-parametric cells
30 May 2019 at 15:10
#5536
Ok, It seems I solved it with hashme() decorator.
Now the code is smth like this following:
# pdk.py
def sh_to_dp_generic(l, w, name):
with Cell(name=name, instantiate=False) as cell:
...
return cell
@hashme('sh_to_dp')
def sh_to_dp():
with Cell(name='sh_to_dp', hashme=True) as cell:
c = sh_to_dp_generic(100, 20, 'sh_to_dp').put()
c.raise_pins()
return cell
@hashme('sh_to_dp_long')
def sh_to_dp_long():
with Cell(name='sh_to_dp_long', hashme=True) as cell:
c = sh_to_dp_generic(100, 20, 'sh_to_dp_long').put()
c.raise_pins()
return cell