diff options
author | Jim Lawson <ucbjrl@berkeley.edu> | 2019-08-07 10:14:45 -0700 |
---|---|---|
committer | Jim Lawson <ucbjrl@berkeley.edu> | 2019-08-07 10:14:45 -0700 |
commit | 5e8a98c8fd5f31b514748676804dd1237bce4225 (patch) | |
tree | ead2b0029b55e078abc1023c434b87b4684ba498 /kernel/consteval.h | |
parent | 7e298084e458c3fcccece565df305271db51aec8 (diff) | |
parent | 5545cd3c108ef240ccf6278b2734412acf81cd2a (diff) | |
download | yosys-5e8a98c8fd5f31b514748676804dd1237bce4225.tar.gz yosys-5e8a98c8fd5f31b514748676804dd1237bce4225.tar.bz2 yosys-5e8a98c8fd5f31b514748676804dd1237bce4225.zip |
Merge branch 'master' into firrtl_err_on_unsupported_cell
# Conflicts:
# backends/firrtl/firrtl.cc
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) |