From 0d09ef6df75158b54aaf0a84525953502cd79e50 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 19 Oct 2025 18:34:54 +0200 Subject: [PATCH] Refinement: do not merge library cells that are already present --- src/lay/lay/layLibraryController.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lay/lay/layLibraryController.cc b/src/lay/lay/layLibraryController.cc index 7324ead45..bbdcc8869 100644 --- a/src/lay/lay/layLibraryController.cc +++ b/src/lay/lay/layLibraryController.cc @@ -99,10 +99,14 @@ private: std::vector 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); - source_cells.push_back (*c); - target_cells.push_back (layout ().add_cell (cn.c_str ())); + 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;