Placing a cell at a child cell's position

Hello!

I have a layout with hierarchy like:

TOP
--Cell_A
--Cell_B
----Cell_C

I am attempting to place some Cell_D at the position of Cell_C using copy_tree and Cell_C.insert(), however when I use cell.insert() it gets positioned at Cell_B, the parent.
All I can provide is pseudo-code, but I start with this:

from SiEPIC.utils import get_layout_variables
TECHNOLOGY, lv, ly, cell = get_layout_variables()

And then use copy_treeon Cell_D, and call Cell_C.insert(Cell_D.cell_index(), Trans(0, 0))
And Cell_D gets placed at Cell_B rather than Cell_C. If I perform the same action on some Cell_D and insert at Cell_A or Cell_B, it works as expected - this is only not working if I'm inserting at a cell that is not at the TOP level.
I'm clearly missing some understanding of how hierarchy origins/transformations work, and I'm wondering if you can help with the solution for placing cells at the right position no matter how deep in a hierarchy they are?

Thanks so much!

Comments

  • Hi @spark_aeon

    I'm a bit confused as the code should be that:

    Cell_C.insert(pya.CellInstArray(Cell_D, pya.Trans(0, 0)))
    

    (not the "CellInstArray"). This should definitely create an instance of Cell D inside Cell C. If it doesn't something is wrong with Cell_C (maybe it does not really refer to Cell C?). Without some working code I cannot say more.

    Matthias

Sign In or Register to comment.