aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-06-19 19:57:25 +0000
committerGitHub <noreply@github.com>2020-06-19 19:57:25 +0000
commit338ecbe02f8bb3cc4d69de1445c7f398a814b4e4 (patch)
tree20b447f4d8553aa589e90b133e23b2e4dee186b9 /kernel
parentd5d0cc88d272b85c3be3677993596dcfa82d579f (diff)
parent3ccdab940cd054d996a5ce94010918edd782cae0 (diff)
downloadyosys-338ecbe02f8bb3cc4d69de1445c7f398a814b4e4.tar.gz
yosys-338ecbe02f8bb3cc4d69de1445c7f398a814b4e4.tar.bz2
yosys-338ecbe02f8bb3cc4d69de1445c7f398a814b4e4.zip
Merge pull request #2178 from boqwxp/design-select
rtlil: Add `Design::select()` for selecting whole modules
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rtlil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h
index f3dc3af68..354823e3b 100644
--- a/kernel/rtlil.h
+++ b/kernel/rtlil.h
@@ -1061,6 +1061,13 @@ struct RTLIL::Design
return selected_member(module->name, member->name);
}
+ template<typename T1> void select(T1 *module) {
+ if (selection_stack.size() > 0) {
+ RTLIL::Selection &sel = selection_stack.back();
+ sel.select(module);
+ }
+ }
+
template<typename T1, typename T2> void select(T1 *module, T2 *member) {
if (selection_stack.size() > 0) {
RTLIL::Selection &sel = selection_stack.back();