Skip to content

Commit f106ae3

Browse files
committed
Work around Yosys selection API change
1 parent 680d1b7 commit f106ae3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/slang_frontend.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3519,10 +3519,15 @@ struct SlangFrontend : Frontend {
35193519
}
35203520

35213521
if (!settings.no_proc.value_or(false)) {
3522-
RTLIL::Selection emitted_modules = RTLIL::Selection::EmptySelection(design);
3522+
// Hack to get an empty selection in a way compatible with both pre and post Yosys v0.52
3523+
// Front of the selection stack should be a "full selection" at any time, and we can
3524+
// amend it.
3525+
RTLIL::Selection emitted_modules = design->selection_stack.front();
3526+
emitted_modules.full_selection = false;
35233527
for (auto name : emitted_module_names)
35243528
emitted_modules.selected_modules.insert(name);
3525-
design->push_selection(emitted_modules);
3529+
3530+
design->selection_stack.push_back(emitted_modules);
35263531

35273532
log_push();
35283533
call(design, "undriven");
@@ -3537,7 +3542,7 @@ struct SlangFrontend : Frontend {
35373542
call(design, "opt_expr -keepdc");
35383543
log_pop();
35393544

3540-
design->pop_selection();
3545+
design->selection_stack.pop_back();
35413546
}
35423547
}
35433548
} SlangFrontend;

0 commit comments

Comments
 (0)