diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-06 14:50:00 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-06 14:50:00 -0700 |
commit | 26cb3e7afc603b5aa703434c2cdfad444a4d4db0 (patch) | |
tree | cb346623885c4bc1e98affc623084f58b0a87ce2 /kernel/consteval.h | |
parent | 09beeee38a5af767f70d24e86c976e43b1b27547 (diff) | |
parent | 8110fb9266e685aaea48359a5aebc4e5ac865240 (diff) | |
download | yosys-26cb3e7afc603b5aa703434c2cdfad444a4d4db0.tar.gz yosys-26cb3e7afc603b5aa703434c2cdfad444a4d4db0.tar.bz2 yosys-26cb3e7afc603b5aa703434c2cdfad444a4d4db0.zip |
Merge remote-tracking branch 'origin/master' into eddie/wreduce_add
Diffstat (limited to 'kernel/consteval.h')
-rw-r--r-- | kernel/consteval.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/consteval.h b/kernel/consteval.h index 154373a8d..f70dfa0fb 100644 --- a/kernel/consteval.h +++ b/kernel/consteval.h @@ -145,7 +145,7 @@ struct ConstEval if (cell->hasPort("\\B")) sig_b = cell->getPort("\\B"); - if (cell->type == "$mux" || cell->type == "$pmux" || cell->type == "$_MUX_") + if (cell->type.in("$mux", "$pmux", "$_MUX_", "$_NMUX_")) { std::vector<RTLIL::SigSpec> y_candidates; int count_maybe_set_s_bits = 0; @@ -175,7 +175,10 @@ struct ConstEval for (auto &yc : y_candidates) { if (!eval(yc, undef, cell)) return false; - y_values.push_back(yc.as_const()); + if (cell->type == "$_NMUX_") + y_values.push_back(RTLIL::const_not(yc.as_const(), Const(), false, false, GetSize(yc))); + else + y_values.push_back(yc.as_const()); } if (y_values.size() > 1) |