Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Caching non-parametric cells #5537
    Dima
    Participant

    dimapu is based in Eindhoven

    Dear Ronald,

    Thank you for the reply, and sorry for poor formatting of the examples… Could not figure out how to do it properly.

    in reply to: Caching non-parametric cells #5536
    Dima
    Participant

    dimapu is based in Eindhoven

    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
Viewing 2 posts - 1 through 2 (of 2 total)