Added MEMID handling to "flatten" pass
authorClifford Wolf <clifford@clifford.at>
Fri, 14 Oct 2016 08:36:37 +0000 (10:36 +0200)
committerClifford Wolf <clifford@clifford.at>
Fri, 14 Oct 2016 08:36:37 +0000 (10:36 +0200)
passes/techmap/techmap.cc

index b2cc492b2fc99e54a4c6397012d64c12f3dc7111..96b88eb422728d35996320d5ed65da573212fb9e 100644 (file)
@@ -345,6 +345,12 @@ struct TechmapWorker
                                c->setParam("\\MEMID", Const(memory_renames[memid].str()));
                        }
 
+                       if (c->type == "$mem") {
+                               string memid = c->getParam("\\MEMID").decode_string();
+                               apply_prefix(cell->name.str(), memid);
+                               c->setParam("\\MEMID", Const(memid));
+                       }
+
                        if (c->attributes.count("\\src"))
                                c->add_strpool_attribute("\\src", extra_src_attrs);
                }