From 85caa4b397c5d82082cc202fe87924f9a56e70a4 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 17 Nov 2024 21:42:29 +0100 Subject: [PATCH] Fixed issue #1925 (MAGIC import fails) --- .../streamers/magic/db_plugin/dbMAGReader.cc | 3 +++ .../streamers/magic/unit_tests/dbMAGReader.cc | 5 +++++ testdata/magic/issue_1925/redux.mag | 9 +++++++++ testdata/magic/redux_au.cif.gz | Bin 0 -> 152 bytes 4 files changed, 17 insertions(+) create mode 100644 testdata/magic/issue_1925/redux.mag create mode 100644 testdata/magic/redux_au.cif.gz diff --git a/src/plugins/streamers/magic/db_plugin/dbMAGReader.cc b/src/plugins/streamers/magic/db_plugin/dbMAGReader.cc index 05841c10e7..f019d32a1f 100644 --- a/src/plugins/streamers/magic/db_plugin/dbMAGReader.cc +++ b/src/plugins/streamers/magic/db_plugin/dbMAGReader.cc @@ -531,6 +531,9 @@ MAGReader::read_rlabel (tl::Extractor &ex, Layout &layout, cell_index_type cell_ std::string lname; ex.read (lname); + // skip sticky flag (optional) + ex.test ("s"); + double l, b, r, t; ex.read (l); ex.read (b); diff --git a/src/plugins/streamers/magic/unit_tests/dbMAGReader.cc b/src/plugins/streamers/magic/unit_tests/dbMAGReader.cc index 53bab88327..d3ad210188 100644 --- a/src/plugins/streamers/magic/unit_tests/dbMAGReader.cc +++ b/src/plugins/streamers/magic/unit_tests/dbMAGReader.cc @@ -156,3 +156,8 @@ TEST(3) run_test (_this, tl::testdata (), "ringo/RINGO.mag", "ringo_au.cif.gz"); } +TEST(4) +{ + run_test (_this, tl::testdata (), "issue_1925/redux.mag", "redux_au.cif.gz"); +} + diff --git a/testdata/magic/issue_1925/redux.mag b/testdata/magic/issue_1925/redux.mag new file mode 100644 index 0000000000..4f1d451d91 --- /dev/null +++ b/testdata/magic/issue_1925/redux.mag @@ -0,0 +1,9 @@ +magic +tech sky130A +timestamp 1731684784 +<< metal4 >> +rect 0 0 10000 100 +<< labels >> +rlabel metal4 s 10500 -9100 10600 12800 6 vccd1 +port 1 nsew power input +<< end >> diff --git a/testdata/magic/redux_au.cif.gz b/testdata/magic/redux_au.cif.gz new file mode 100644 index 0000000000000000000000000000000000000000..14bbcd457aa12ea9d50524bc6d199077c58e2455 GIT binary patch literal 152 zcmV;J0B8RniwFpSR61t>19D|#b$DN4buMFRW&qQ0_H