aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/consteval.h
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-08-08 11:40:09 +0100
committerDavid Shah <dave@ds0.me>2019-08-08 11:40:09 +0100
commit83b2e0272333cfcc2529e0833723a52c066146a6 (patch)
tree9985b7f840383419ebd5b189023ca6871a02d5a9 /kernel/consteval.h
parentb8cd4ad64ae9a45faecffc1a6b92a8219755bc60 (diff)
parentfb568ddb4e2ccaab352d9d062f6b4926aca75680 (diff)
downloadyosys-83b2e0272333cfcc2529e0833723a52c066146a6.tar.gz
yosys-83b2e0272333cfcc2529e0833723a52c066146a6.tar.bz2
yosys-83b2e0272333cfcc2529e0833723a52c066146a6.zip
Merge branch 'xc7dsp' of github.com:YosysHQ/yosys 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)