From 1e65abb7bf3f96bf986a1fea84987a5b35f69adb Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 11 Sep 2023 21:39:06 +0200 Subject: [PATCH] Fixed issue-1307 (partial, UNPLACED component placements render placement if they come with point and orientation) --- .../streamers/lefdef/db_plugin/dbDEFImporter.cc | 14 ++++++++++++++ testdata/lefdef/mapfile/in.def | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/plugins/streamers/lefdef/db_plugin/dbDEFImporter.cc b/src/plugins/streamers/lefdef/db_plugin/dbDEFImporter.cc index 63515348c..3baced4f5 100644 --- a/src/plugins/streamers/lefdef/db_plugin/dbDEFImporter.cc +++ b/src/plugins/streamers/lefdef/db_plugin/dbDEFImporter.cc @@ -1557,6 +1557,20 @@ DEFImporter::read_components (db::Layout &layout, std::listsecond.bbox.transformed (ft).lower_left (); is_placed = true; + } else if (test ("UNPLACED")) { + + // invalid "UNPLACED", but yet it appears to be existing (#1307) + if (test ("(")) { + + db::Point pt = get_point (scale); + test (")"); + + ft = get_orient (false /*mandatory*/); + d = pt - m->second.bbox.transformed (ft).lower_left (); + is_placed = true; + + } + } else if (test ("MASKSHIFT")) { maskshift = get (); diff --git a/testdata/lefdef/mapfile/in.def b/testdata/lefdef/mapfile/in.def index f24be607b..5c6012aab 100644 --- a/testdata/lefdef/mapfile/in.def +++ b/testdata/lefdef/mapfile/in.def @@ -8,7 +8,7 @@ UNITS DISTANCE MICRONS 1000 ; DIEAREA ( 0 0 ) ( 1000 2000 ) ; COMPONENTS 3 ; - - macro1 macro1 + PLACED ( 0 0 ) N ; + - macro1 macro1 + UNPLACED ( 0 0 ) N ; END COMPONENTS SPECIALNETS 1 ;