WIP: cell name conflict resolution modes, bugfixed first implementation

This commit is contained in:
Matthias Koefferlein
2020-11-03 00:13:55 +01:00
parent 85869c329d
commit a92ebd0e17
6 changed files with 153 additions and 36 deletions
@@ -366,6 +366,8 @@ TEST(Bug_121_1)
reader.read (layout);
}
fflush(stdout);
std::string fn_au (tl::testsrc () + "/testdata/gds/bug_121_au1.gds");
db::compare_layouts (_this, layout, fn_au, db::WriteGDS2, 1);
}
@@ -1145,7 +1145,9 @@ OASISReader::do_read (db::Layout &layout)
unsigned long id = 0;
get (id);
if (has_cell (id)) {
std::pair<bool, db::cell_index_type> cc = cell_by_id (id);
if (cc.first && ! layout.cell (cc.second).is_ghost_cell ()) {
error (tl::sprintf (tl::to_string (tr ("A cell with id %ld is defined already")), id));
}
@@ -1158,7 +1160,9 @@ OASISReader::do_read (db::Layout &layout)
}
std::string name = get_str ();
if (has_cell (name)) {
std::pair<bool, db::cell_index_type> cc = cell_by_name (name);
if (cc.first && ! layout.cell (cc.second).is_ghost_cell ()) {
error (tl::sprintf (tl::to_string (tr ("A cell with name %s is defined already")), name.c_str ()));
}