aboutsummaryrefslogtreecommitdiffstats
path: root/passes/opt/opt_expr.cc
diff options
context:
space:
mode:
authorSergey <37293587+SergeyDegtyar@users.noreply.github.com>2019-10-01 10:57:09 +0300
committerGitHub <noreply@github.com>2019-10-01 10:57:09 +0300
commitd99b1e32618f8aa92c01eb0ac5d08486f411cca0 (patch)
tree5671ffa605b5f6b31b86aacb2dbeaacd018302d7 /passes/opt/opt_expr.cc
parentfc56459746fec7751735749e3328378e1089b914 (diff)
parentd963e8c2c6207ad98d48dc528922ad58c030173f (diff)
downloadyosys-d99b1e32618f8aa92c01eb0ac5d08486f411cca0.tar.gz
yosys-d99b1e32618f8aa92c01eb0ac5d08486f411cca0.tar.bz2
yosys-d99b1e32618f8aa92c01eb0ac5d08486f411cca0.zip
Merge branch 'master' into SergeyDegtyar/anlogic
Diffstat (limited to 'passes/opt/opt_expr.cc')
-rw-r--r--passes/opt/opt_expr.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/passes/opt/opt_expr.cc b/passes/opt/opt_expr.cc
index 00d7d6063..6cf66fb95 100644
--- a/passes/opt/opt_expr.cc
+++ b/passes/opt/opt_expr.cc
@@ -953,6 +953,10 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons
}
if (b.is_fully_const()) {
+ if (b.is_fully_undef()) {
+ RTLIL::SigSpec input = b;
+ ACTION_DO(ID::Y, Const(State::Sx, GetSize(cell->getPort(ID::Y))));
+ } else
if (b.as_bool() == (cell->type == ID($eq))) {
RTLIL::SigSpec input = b;
ACTION_DO(ID::Y, cell->getPort(ID::A));