diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-08-09 09:46:37 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-08-09 09:46:37 +0200 |
commit | 7a860c562323b8279cdbb8626a47ac8466c78b4c (patch) | |
tree | d713b5c04ab34aadcbd310237a8cc46951f83e37 /kernel/consteval.h | |
parent | 8a3329871ba7bab98982a101327b8375cd73344d (diff) | |
parent | ac2fc3a144fe1094bedcc6b3fda8a498ad43ae76 (diff) | |
download | yosys-7a860c562323b8279cdbb8626a47ac8466c78b4c.tar.gz yosys-7a860c562323b8279cdbb8626a47ac8466c78b4c.tar.bz2 yosys-7a860c562323b8279cdbb8626a47ac8466c78b4c.zip |
Merge remote-tracking branch 'upstream/master' into efinix
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) |