summaryrefslogtreecommitdiff
path: root/passes/proc/proc_mux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'passes/proc/proc_mux.cc')
-rw-r--r--passes/proc/proc_mux.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/passes/proc/proc_mux.cc b/passes/proc/proc_mux.cc
index 2ff755ae..30e7b748 100644
--- a/passes/proc/proc_mux.cc
+++ b/passes/proc/proc_mux.cc
@@ -174,8 +174,15 @@ static void append_pmux(RTLIL::Module *mod, const RTLIL::SigSpec &signal, const
RTLIL::SigSpec ctrl_sig = gen_cmp(mod, signal, compare, sw);
assert(ctrl_sig.size() == 1);
last_mux_cell->type = "$pmux";
- last_mux_cell->get("\\S").append(ctrl_sig);
- last_mux_cell->get("\\B").append(when_signal);
+
+ RTLIL::SigSpec new_s = last_mux_cell->get("\\S");
+ new_s.append(ctrl_sig);
+ last_mux_cell->set("\\S", new_s);
+
+ RTLIL::SigSpec new_b = last_mux_cell->get("\\B");
+ new_b.append(when_signal);
+ last_mux_cell->set("\\B", new_b);
+
last_mux_cell->parameters["\\S_WIDTH"] = last_mux_cell->get("\\S").size();
}