mirror of https://github.com/KLayout/klayout.git
WIP: bugfix.
This commit is contained in:
parent
2300c391ae
commit
6eac98907f
|
|
@ -954,16 +954,6 @@ LEFDEFReaderState::read_map_file (const std::string &path, db::Layout &layout)
|
|||
std::map<std::string, LayerPurpose>::const_iterator i = purpose_translation.find (ps);
|
||||
if (i != purpose_translation.end ()) {
|
||||
|
||||
if (i->second == All) {
|
||||
for (std::map<std::string, LayerPurpose>::const_iterator p = purpose_translation.begin (); p != purpose_translation.end (); ++p) {
|
||||
if (p->second != All) {
|
||||
translated_purposes.insert (std::make_pair (p->second, mask));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
translated_purposes.insert (std::make_pair (i->second, mask));
|
||||
}
|
||||
|
||||
if (i->second == Routing) {
|
||||
|
||||
if (ex.test (":VOLTAGE:")) {
|
||||
|
|
@ -982,14 +972,28 @@ LEFDEFReaderState::read_map_file (const std::string &path, db::Layout &layout)
|
|||
|
||||
}
|
||||
|
||||
if (ex.test (":MASK:")) {
|
||||
if (ex.test ("MASK") && ex.test (":")) {
|
||||
ex.read (mask);
|
||||
}
|
||||
|
||||
if (ex.test (":MASK:")) {
|
||||
ex.read (mask);
|
||||
}
|
||||
|
||||
if (i == purpose_translation.end ()) {
|
||||
|
||||
tl::warn << tl::sprintf (tl::to_string (tr ("Reading layer map file %s, line %d: purpose %s ignored for layer %s")), path, ts.line_number (), ps, w1);
|
||||
|
||||
} else if (i->second == All) {
|
||||
|
||||
for (std::map<std::string, LayerPurpose>::const_iterator p = purpose_translation.begin (); p != purpose_translation.end (); ++p) {
|
||||
if (p->second != All) {
|
||||
translated_purposes.insert (std::make_pair (p->second, mask));
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
tl::warn << tl::sprintf (tl::to_string (tr ("Reading layer map file %s, line %d: purpose %s ignored for layer %s")), path, ts.line_number (), ps, w1);
|
||||
|
||||
translated_purposes.insert (std::make_pair (i->second, mask));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -549,6 +549,18 @@ TEST(115_componentmaskshift)
|
|||
run_test (_this, "masks-2", "lef:in_tech.lef+lef:in.lef+def:in.def", "au.oas.gz", options, false);
|
||||
}
|
||||
|
||||
TEST(116_name_to_ld_target_mapping)
|
||||
{
|
||||
db::LEFDEFReaderOptions options = default_options ();
|
||||
db::LayerMap lm = db::LayerMap::from_string_file_format ("metal1: 1\nvia1: 2\nmetal2: 3\nOUTLINE: 42/17");
|
||||
options.set_layer_map (lm);
|
||||
|
||||
db::LayerMap lm_read = run_test (_this, "via_properties", "lef:in.lef+def:in.def", "au.oas.gz", options, false);
|
||||
EXPECT_EQ (lm_read.to_string (),
|
||||
"layer_map('OUTLINE : OUTLINE (4/0)';'metal1.VIA : metal1 (1/0)';'metal2.VIA : metal2 (3/0)';'via1.VIA : via1 (2/0)')"
|
||||
)
|
||||
}
|
||||
|
||||
TEST(200_lefdef_plugin)
|
||||
{
|
||||
db::Layout ly;
|
||||
|
|
|
|||
Loading…
Reference in New Issue