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; }