mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
kernel/rtlil: Extract some helpers for checking memory cell types.
There will soon be more (versioned) memory cells, so handle passes that only care if a cell is memory-related by a simple helper call instead of a hardcoded list.
This commit is contained in:
parent
c7076495f1
commit
c4cc888b2c
10 changed files with 24 additions and 28 deletions
|
@ -364,13 +364,11 @@ struct TechmapWorker
|
|||
for (auto &it2 : autopurge_ports)
|
||||
c->unsetPort(it2);
|
||||
|
||||
if (c->type.in(ID($memrd), ID($memwr), ID($meminit))) {
|
||||
if (c->has_memid()) {
|
||||
IdString memid = c->getParam(ID::MEMID).decode_string();
|
||||
log_assert(memory_renames.count(memid) != 0);
|
||||
c->setParam(ID::MEMID, Const(memory_renames[memid].str()));
|
||||
}
|
||||
|
||||
if (c->type == ID($mem)) {
|
||||
} else if (c->is_mem_cell()) {
|
||||
IdString memid = c->getParam(ID::MEMID).decode_string();
|
||||
apply_prefix(cell->name, memid);
|
||||
c->setParam(ID::MEMID, Const(memid.c_str()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue