mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-15 03:35:40 +00:00
proc_mux: copy mux src to Y port
(cherry picked from commit da65a18f39)
This commit is contained in:
parent
bcf3af0a21
commit
0d3c218d6b
1 changed files with 7 additions and 4 deletions
|
|
@ -508,10 +508,13 @@ RTLIL::SigSpec signal_to_mux_tree(MuxTreeContext ctx)
|
|||
result = mux_gen_ctx.gen_mux(value, result);
|
||||
}
|
||||
}
|
||||
if (mux_gen_ctx.last_mux_cell && !case_sources.empty()) {
|
||||
std::vector<TwineRef> refs(case_sources.begin(), case_sources.end());
|
||||
RTLIL::Cell *cell = mux_gen_ctx.last_mux_cell;
|
||||
cell->set_src_attribute(cell->module->design->twines.concat(std::span<const TwineRef>{refs}));
|
||||
if (auto* mux = mux_gen_ctx.last_mux_cell) {
|
||||
if (!case_sources.empty()) {
|
||||
std::vector<TwineRef> refs(case_sources.begin(), case_sources.end());
|
||||
mux->set_src_attribute(mux->module->design->twines.concat(std::span<const TwineRef>{refs}));
|
||||
}
|
||||
log_assert(mux->getPort(TW::Y).is_wire());
|
||||
mux->getPort(TW::Y).as_wire()->transfer_src_attribute(mux);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue