aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/consteval.h
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-07 13:44:08 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-07 13:44:08 -0700
commite3d898dccb3cf535a213f313693b2b7a4ede7c68 (patch)
treeca5dfdf506a9a5bc37178eaa06f0d285b7649ff5 /kernel/consteval.h
parentcdf9c801347693c273309694685b2080ef00fd02 (diff)
parent3414ee1e3fe37d4bf383621542828d4fc8fc987f (diff)
downloadyosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.gz
yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.tar.bz2
yosys-e3d898dccb3cf535a213f313693b2b7a4ede7c68.zip
Merge remote-tracking branch 'origin/master' into xc7dsp
Diffstat (limited to 'kernel/consteval.h')
-rw-r--r--kernel/consteval.h7
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)