PCELLs with hierarchy ?

edited September 2015 in KLayout Support
Hi Matthias,
I am diving into PCELLs more these days, and I was asked to create one that has unit cells that repeat
hundreds of times inside the PCELL. Inside a PCELL, can one programatically create child_cells and instances ?
The GUI does not let me place shapes and cell instances into a PCELL ...

Also, what would happen if I don't care about display_text_impl and give all variants of this PCELL
the same name ? Should I be concerned about making every variant unique ?

Vielen Dank.

Thomas.

Comments

  • edited November -1

    Check out these links for examples for how to have PCells call other PCells

    David

  • edited November -1
    Thanks David,
    I had tried to create a regular cell inside a pcell programmatically but that produced an error saying it was not allowed. In hindsight, and I thought I'd never say this, but I believe what I am trying to do is too dangerous. if cells COULD be created inside a pcell, and if they are not locked (meaning one could modify them via the editor) then that can only lead to disastrous results. Even calling PCELLS from indide PCELLS and passing on paramters could be problematic if someone decided to change the code of an unknowingly called PCELL, while thinking it would not affect any other PCELL.
    Thomas
  • edited November -1

    Hi Thomas,

    In general cells (or PCell's) can be instantiated from within PCell's. But creating them would result in a pretty mess. Basically, the tool needs to be able to track the PCell variants and remove unused ones. Without telling which cell belongs to what that is a difficult task. And right now, a PCell has no way to telling which cells are created from within the PCell itself.

    But it's possible to separate your PCell into parts and instantiate one PCell into another. If you want to create a cell "B" from a PCell "A", you can create two PCells, one for the top cell "A" and another one for the child cell "B". You can then create a PCell instance of "B" when producing the geometry for "A" using parameters which are derived from the "A" parameters.

    Basically, it's even possible to add static cells to a PCell library which you can instantiate from you a PCell then. You can do so by initializing the library layout object from a layout file before declaring the PCells. But I have not tested this feature yet.

    Matthias

Sign In or Register to comment.