From 9e9998433616f438cb0185519bb5b7f8e1a8f543 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 27 Feb 2014 04:09:32 +0100 Subject: [PATCH] Fixed const folding of $bu0 cells --- kernel/celltypes.h | 2 +- passes/opt/opt_const.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/celltypes.h b/kernel/celltypes.h index 34a6e56fa..4a600af9d 100644 --- a/kernel/celltypes.h +++ b/kernel/celltypes.h @@ -216,7 +216,7 @@ struct CellTypes type = "$shl"; if (type != "$sshr" && type != "$sshl" && type != "$shr" && type != "$shl" && - type != "$pos" && type != "$neg" && type != "$not") { + type != "$pos" && type != "$neg" && type != "$not" && type != "$bu0") { if (!signed1 || !signed2) signed1 = false, signed2 = false; } diff --git a/passes/opt/opt_const.cc b/passes/opt/opt_const.cc index ad9a71b15..da71ec30e 100644 --- a/passes/opt/opt_const.cc +++ b/passes/opt/opt_const.cc @@ -463,6 +463,7 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons FOLD_2ARG_CELL(pow) FOLD_1ARG_CELL(pos) + FOLD_1ARG_CELL(bu0) FOLD_1ARG_CELL(neg) // be very conservative with optimizing $mux cells as we do not want to break mux trees -- 2.30.2