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,11 +99,15 @@ private:
std::vector<db::cell_index_type> target_cells, source_cells;
// 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) {
std::string cn = ly.cell_name (*c);
if (! layout ().has_cell (cn.c_str ())) {
source_cells.push_back (*c);
target_cells.push_back (layout ().add_cell (cn.c_str ()));
}
}
db::CellMapping cm;
cm.create_multi_mapping_full (layout (), target_cells, ly, source_cells);