diff --git a/src/plugins/streamers/lefdef/db_plugin/dbLEFImporter.cc b/src/plugins/streamers/lefdef/db_plugin/dbLEFImporter.cc index 7bf3c307a..694114034 100644 --- a/src/plugins/streamers/lefdef/db_plugin/dbLEFImporter.cc +++ b/src/plugins/streamers/lefdef/db_plugin/dbLEFImporter.cc @@ -361,6 +361,13 @@ LEFImporter::read_geometries (db::Layout &layout, db::Cell &cell, LayerPurpose p expect (";"); + } else if (test ("PROPERTY")) { + + // skip properties + while (! at_end () && ! test (";")) { + take (); + } + } else { // stop at unknown token break; @@ -405,7 +412,7 @@ LEFImporter::read_nondefaultrule (db::Layout & /*layout*/) } } else { - while (! test (";")) { + while (! at_end () && ! test (";")) { take (); } } diff --git a/src/plugins/streamers/lefdef/unit_tests/dbLEFDEFImportTests.cc b/src/plugins/streamers/lefdef/unit_tests/dbLEFDEFImportTests.cc index a2de90a2a..2d1f235f6 100644 --- a/src/plugins/streamers/lefdef/unit_tests/dbLEFDEFImportTests.cc +++ b/src/plugins/streamers/lefdef/unit_tests/dbLEFDEFImportTests.cc @@ -389,3 +389,9 @@ TEST(111_mapfile) run_test (_this, "mapfile", "read:in.def", "au.oas.gz", options, false); } + +TEST(112_via_properties) +{ + run_test (_this, "via_properties", "lef:in.lef", "au.oas.gz", default_options (), false); +} + diff --git a/testdata/lefdef/via_properties/au.oas.gz b/testdata/lefdef/via_properties/au.oas.gz new file mode 100644 index 000000000..d6551998c Binary files /dev/null and b/testdata/lefdef/via_properties/au.oas.gz differ diff --git a/testdata/lefdef/via_properties/in.lef b/testdata/lefdef/via_properties/in.lef new file mode 100644 index 000000000..3bc3ed774 --- /dev/null +++ b/testdata/lefdef/via_properties/in.lef @@ -0,0 +1,33 @@ +VERSION 5.6 ; + +UNITS +DATABASE MICRONS 2000 ; +END UNITS + +PROPERTYDEFINITIONS +VIA OR_DEFAULT STRING ; +END PROPERTYDEFINITIONS + +LAYER metal1 +TYPE ROUTING ; +END metal1 + +LAYER via1 +TYPE CUT ; +END via1 + +LAYER metal2 +TYPE ROUTING ; +END metal2 + +VIA via1_4 DEFAULT +LAYER via1 ; +RECT -0.035 -0.035 0.035 0.035 ; +LAYER metal1 ; +RECT -0.035 -0.07 0.035 0.07 ; +LAYER metal2 ; +RECT -0.035 -0.07 0.035 0.07 ; +PROPERTY OR_DEFAULT Y ; +END via1_4 + +END LIBRARY