diff options
Diffstat (limited to 'passes/techmap/flatten.cc')
-rw-r--r-- | passes/techmap/flatten.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/techmap/flatten.cc b/passes/techmap/flatten.cc index 0509eedb8..35257273c 100644 --- a/passes/techmap/flatten.cc +++ b/passes/techmap/flatten.cc @@ -133,10 +133,10 @@ struct FlattenWorker for (auto tpl_cell : tpl->cells()) { RTLIL::Cell *new_cell = module->addCell(map_name(cell, tpl_cell), tpl_cell); map_attributes(cell, new_cell, tpl_cell->name); - if (new_cell->type.in(ID($memrd), ID($memwr), ID($meminit))) { + if (new_cell->has_memid()) { IdString memid = new_cell->getParam(ID::MEMID).decode_string(); new_cell->setParam(ID::MEMID, Const(memory_map.at(memid).str())); - } else if (new_cell->type == ID($mem)) { + } else if (new_cell->is_mem_cell()) { IdString memid = new_cell->getParam(ID::MEMID).decode_string(); new_cell->setParam(ID::MEMID, Const(concat_name(cell, memid).str())); } |