Merge pull request #2178 from boqwxp/design-select

rtlil: Add `Design::select()` for selecting whole modules
This commit is contained in:
whitequark 2020-06-19 19:57:25 +00:00 committed by GitHub
commit 338ecbe02f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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();