mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-19 04:13:39 +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
|
@ -103,7 +103,7 @@ struct DeletePass : public Pass {
|
|||
for (auto cell : module->cells()) {
|
||||
if (design->selected(module, cell))
|
||||
delete_cells.insert(cell);
|
||||
if (cell->type.in(ID($memrd), ID($memwr)) &&
|
||||
if (cell->has_memid() &&
|
||||
delete_mems.count(cell->parameters.at(ID::MEMID).decode_string()) != 0)
|
||||
delete_cells.insert(cell);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue