aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/celltypes.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-06-28 08:30:18 +0200
committerGitHub <noreply@github.com>2019-06-28 08:30:18 +0200
commit1c7ce251f383a2c6734fc7ca778c5234e0c97a2a (patch)
treebad3404f5b51aa6b1d6eeab38e3cf7a60bee3554 /kernel/celltypes.h
parentc4c39e98146b6837c35c425ef7987b2be45c0451 (diff)
parent3225bfb98403271bbe8a56418ccd027b42eabda1 (diff)
downloadyosys-1c7ce251f383a2c6734fc7ca778c5234e0c97a2a.tar.gz
yosys-1c7ce251f383a2c6734fc7ca778c5234e0c97a2a.tar.bz2
yosys-1c7ce251f383a2c6734fc7ca778c5234e0c97a2a.zip
Merge pull request #1046 from bogdanvuk/master
Optimizing DFFs whose initial value prevents their value from changing
Diffstat (limited to 'kernel/celltypes.h')
-rw-r--r--kernel/celltypes.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/celltypes.h b/kernel/celltypes.h
index 4e91eddda..758661c02 100644
--- a/kernel/celltypes.h
+++ b/kernel/celltypes.h
@@ -246,24 +246,24 @@ struct CellTypes
cell_types.clear();
}
- bool cell_known(RTLIL::IdString type)
+ bool cell_known(RTLIL::IdString type) const
{
return cell_types.count(type) != 0;
}
- bool cell_output(RTLIL::IdString type, RTLIL::IdString port)
+ bool cell_output(RTLIL::IdString type, RTLIL::IdString port) const
{
auto it = cell_types.find(type);
return it != cell_types.end() && it->second.outputs.count(port) != 0;
}
- bool cell_input(RTLIL::IdString type, RTLIL::IdString port)
+ bool cell_input(RTLIL::IdString type, RTLIL::IdString port) const
{
auto it = cell_types.find(type);
return it != cell_types.end() && it->second.inputs.count(port) != 0;
}
- bool cell_evaluable(RTLIL::IdString type)
+ bool cell_evaluable(RTLIL::IdString type) const
{
auto it = cell_types.find(type);
return it != cell_types.end() && it->second.is_evaluable;
@@ -482,4 +482,3 @@ extern CellTypes yosys_celltypes;
YOSYS_NAMESPACE_END
#endif
-