aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-06-02 17:53:30 +0200
committerClifford Wolf <clifford@clifford.at>2013-06-02 17:53:30 +0200
commit21d9251e52c2a1807306fd4067de0750e45465c0 (patch)
tree7e70e27d4acdbeddb2b30875acaad517274ad3bc /kernel/rtlil.h
parent5f2c5f90178dbd5b26956d60881cab132a5982bd (diff)
downloadyosys-21d9251e52c2a1807306fd4067de0750e45465c0.tar.gz
yosys-21d9251e52c2a1807306fd4067de0750e45465c0.tar.bz2
yosys-21d9251e52c2a1807306fd4067de0750e45465c0.zip
Added "dump" command (part ilang backend)
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r--kernel/rtlil.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index fe88182fa..b15082889 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -189,9 +189,9 @@ struct RTLIL::Selection {
std::set<RTLIL::IdString> selected_modules;
std::map<RTLIL::IdString, std::set<RTLIL::IdString>> selected_members;
Selection(bool full = true) : full_selection(full) { }
- bool selected_module(RTLIL::IdString mod_name);
- bool selected_whole_module(RTLIL::IdString mod_name);
- bool selected_member(RTLIL::IdString mod_name, RTLIL::IdString memb_name);
+ bool selected_module(RTLIL::IdString mod_name) const;
+ bool selected_whole_module(RTLIL::IdString mod_name) const;
+ bool selected_member(RTLIL::IdString mod_name, RTLIL::IdString memb_name) const;
void optimize(RTLIL::Design *design);
};
@@ -203,20 +203,20 @@ struct RTLIL::Design {
~Design();
void check();
void optimize();
- bool selected_module(RTLIL::IdString mod_name);
- bool selected_whole_module(RTLIL::IdString mod_name);
- bool selected_member(RTLIL::IdString mod_name, RTLIL::IdString memb_name);
- template<typename T1> bool selected(T1 *module) {
+ bool selected_module(RTLIL::IdString mod_name) const;
+ bool selected_whole_module(RTLIL::IdString mod_name) const;
+ bool selected_member(RTLIL::IdString mod_name, RTLIL::IdString memb_name) const;
+ template<typename T1> bool selected(T1 *module) const {
return selected_module(module->name);
}
- template<typename T1, typename T2> bool selected(T1 *module, T2 *member) {
+ template<typename T1, typename T2> bool selected(T1 *module, T2 *member) const {
return selected_member(module->name, member->name);
}
template<typename T1, typename T2> void select(T1 *module, T2 *member) {
if (selection_stack.size() > 0) {
RTLIL::Selection &sel = selection_stack.back();
if (!sel.full_selection && sel.selected_modules.count(module->name) == 0)
- sel.selected_members[module->name].insert(member->name);
+ sel.selected_members.at(module->name).insert(member->name);
}
}
};