Skip to content

Commit

Permalink
Merge pull request #1927 from KLayout/bugfix/issue-1925
Browse files Browse the repository at this point in the history
Fixed issue #1925 (MAGIC import fails)
  • Loading branch information
klayoutmatthias authored Nov 28, 2024
2 parents 926dac9 + 85caa4b commit 1a5e8c9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/plugins/streamers/magic/db_plugin/dbMAGReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/streamers/magic/unit_tests/dbMAGReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

9 changes: 9 additions & 0 deletions testdata/magic/issue_1925/redux.mag
Original file line number Diff line number Diff line change
@@ -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 >>
Binary file added testdata/magic/redux_au.cif.gz
Binary file not shown.

0 comments on commit 1a5e8c9

Please sign in to comment.