Refinement: do not merge library cells that are already present

This commit is contained in:
Matthias Koefferlein 2025-10-19 18:34:54 +02:00
parent 6d234d4ea5
commit 0d09ef6df7
1 changed files with 6 additions and 2 deletions

View File

@ -99,10 +99,14 @@ private:
std::vector<db::cell_index_type> target_cells, source_cells; std::vector<db::cell_index_type> target_cells, source_cells;
// collect the cells to pull in (all top cells of the library layout) // collect the cells to pull in (all top cells of the library layout)
// NOTE: cells are not overwritten - the first layout wins, in terms
// of cell names and also in terms of database unit.
for (auto c = ly.begin_top_down (); c != ly.end_top_cells (); ++c) { for (auto c = ly.begin_top_down (); c != ly.end_top_cells (); ++c) {
std::string cn = ly.cell_name (*c); std::string cn = ly.cell_name (*c);
source_cells.push_back (*c); if (! layout ().has_cell (cn.c_str ())) {
target_cells.push_back (layout ().add_cell (cn.c_str ())); source_cells.push_back (*c);
target_cells.push_back (layout ().add_cell (cn.c_str ()));
}
} }
db::CellMapping cm; db::CellMapping cm;