From 4be134e2938fe78a9103d0d39526d477ff23e58e Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 30 Sep 2024 22:06:38 +0200 Subject: [PATCH] LEF/DEF reader recognizes existing layers by name now This is helpful as it assigns layer/datatype numbers automatically. If only a name is given for a layer (i.e. "OUTLINE"), it will not match any previously loaded layer and layer matching goes by layer/datatype first. This way, every "reload" added a new "OUTLINE" layer. --- src/plugins/streamers/lefdef/db_plugin/dbLEFDEFImporter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/streamers/lefdef/db_plugin/dbLEFDEFImporter.cc b/src/plugins/streamers/lefdef/db_plugin/dbLEFDEFImporter.cc index ec404f7c8..7c1bcb383 100644 --- a/src/plugins/streamers/lefdef/db_plugin/dbLEFDEFImporter.cc +++ b/src/plugins/streamers/lefdef/db_plugin/dbLEFDEFImporter.cc @@ -1508,7 +1508,9 @@ std::set LEFDEFReaderState::open_layer_uncached(db::Layout &layout bool found = false; for (db::Layout::layer_iterator i = layout.begin_layers (); i != layout.end_layers () && ! found; ++i) { - if ((*i).second->log_equal (lp_new)) { + // NOTE: if lp_new only has a name, we also check for the name. Since we assign a default layer/datatype, + // otherwise, a "reload" in the UI would not recognize the layer as the same. + if ((*i).second->log_equal (lp_new) || (lp_new.is_named () && (*i).second->name == lp_new.name)) { found = true; res.insert ((*i).first); }