Postpone decision about "invalid vias are errors."

This commit is contained in:
Matthias Koefferlein
2025-05-18 22:28:11 +02:00
parent e27e24ff4f
commit a2ac8d45de
5 changed files with 126 additions and 1 deletions
@@ -749,7 +749,12 @@ DEFImporter::read_single_net (std::string &nondefaultrule, Layout &layout, db::C
}
std::map<std::string, ViaDesc>::const_iterator vd = m_via_desc.find (vn);
if (vd != m_via_desc.end () && ! pts.empty ()) {
if (vd == m_via_desc.end ()) {
warn (tl::to_string (tr ("Invalid via name: ")) + vn);
} else if (! pts.empty ()) {
// For the via, the masks are encoded in a three-digit number (<mask-top> <mask-cut> <mask_bottom>)
unsigned int mask_top = (mask / 100) % 10;
@@ -898,6 +898,21 @@ TEST(132_issue1307_pin_names)
run_test (_this, "issue-1307c", "lef:in.lef+def:in.def", "au.oas", opt, false);
}
/*
TODO: need to clarify first, if invalid via specs should be errors
TEST(133_unknown_vias_are_errors)
{
db::LEFDEFReaderOptions opt = default_options ();
try {
run_test (_this, "invalid_via", "lef:tech.lef+def:comp_invalid_via.def", "au.oas", opt, false);
EXPECT_EQ (true, false);
} catch (db::LEFDEFReaderException &ex) {
EXPECT_EQ (ex.msg ().find ("Invalid via name"), size_t (0));
}
}
*/
TEST(200_lefdef_plugin)
{
db::Layout ly;