aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtlil.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r--kernel/rtlil.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index e8d05e7e4..1f25542f3 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -352,11 +352,16 @@ struct RTLIL::Design
std::map<RTLIL::IdString, RTLIL::Selection> selection_vars;
std::string selected_active_module;
+ Design();
~Design();
RTLIL::ObjRange<RTLIL::Module*> modules();
RTLIL::Module *module(RTLIL::IdString name);
+ bool has(RTLIL::IdString id) const {
+ return modules_.count(id) != 0;
+ }
+
void add(RTLIL::Module *module);
RTLIL::Module *addModule(RTLIL::IdString name);
void remove(RTLIL::Module *module);