From 60aab8b3fd73b2d4bd05dae1f8d12627564e57f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6fferlein?= Date: Sat, 12 Feb 2022 16:51:01 +0100 Subject: [PATCH] Fixed #995 (new topcell after load) (#1000) --- src/db/db/dbCommonReader.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/db/db/dbCommonReader.cc b/src/db/db/dbCommonReader.cc index ab72d234a..1e6d49e7d 100644 --- a/src/db/db/dbCommonReader.cc +++ b/src/db/db/dbCommonReader.cc @@ -286,6 +286,8 @@ CommonReader::read (db::Layout &layout, const db::LoadLayoutOptions &options) { init (options); + tl_assert (!layout.under_construction ()); + m_common_options.layer_map.prepare (layout); layout.start_changes (); @@ -298,6 +300,11 @@ CommonReader::read (db::Layout &layout, const db::LoadLayoutOptions &options) throw; } + // A cleanup may be necessary because of the following scenario: if library proxies contain subcells + // which are proxies itself, the proxy update may make them orphans (the proxies are regenerated). + // The cleanup will removed these. + layout.cleanup (); + return m_layer_map_out; }