To combine different layout files which have the same subcell name into one layout file

edited February 2013 in General
Hi, Matthias,

There are 2 layout files, and their structurs are like
A layout --> top cell a
subcell c
subcell d
B layout --> top cell b
subcell c
subcell e

subcell c is the same of A and B layouts

I put top cell of these 2 layout files in new layout / new top cell, than I'll get new layout like which structure will be like sd following

Layout new --> new top
a
c
d
b
c$1
e

When I put layout B in new layout, c cell has existed, klayout automatically gives a new cell name c$1.
Is there option to do when I put a new cell into current layout, if there is any existed cell name, just replaced with the new improt one?

Thank you.

Regards,
Canny

Comments

  • edited November -1

    Hi Canny,

    Name equivalence is only a weak indicator for content equivalence, so KLayout refuses to reuse cells just because their names are the same. That is at least true for the import function. This is a safety feature since exchanging cells with different content will surely cause serious trouble later.

    You can force merging of identical cells by simply loading a layout into an existing one within a script or that simple line:

    RBA::Application::instance.main_window.current_view.active_cellview.layout.read("new_layout.gds")
    

    But that approach has a serious drawback: it will join the content of cells with equal names, hence it will double up the content of your cell "c". That has no visible effect, but will increase data volume and processing times later on.

    Best regards,

    Matthias

Sign In or Register to comment.