aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2021-05-22 19:14:13 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2021-05-22 21:43:00 +0200
commitc4cc888b2c51a6507b73fdcde1dc61c37384105d (patch)
treed5bc86b7ae97217a242c7e1f5b6f9ad6da1e4c7d /passes/cmds
parentc7076495f197732725456992c9a02aed9966139a (diff)
downloadyosys-c4cc888b2c51a6507b73fdcde1dc61c37384105d.tar.gz
yosys-c4cc888b2c51a6507b73fdcde1dc61c37384105d.tar.bz2
yosys-c4cc888b2c51a6507b73fdcde1dc61c37384105d.zip
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.
Diffstat (limited to 'passes/cmds')
-rw-r--r--passes/cmds/delete.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/passes/cmds/delete.cc b/passes/cmds/delete.cc
index 684fa37b0..2855f0cdc 100644
--- a/passes/cmds/delete.cc
+++ b/passes/cmds/delete.cc
@@ -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);
}