From b7fcf1fb9a7a6b4f84357d61bc4bb3c711511c7d Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 19 Mar 2013 13:32:04 +0100 Subject: keep $mux and $_MUX_ optimizations separate in opt_const --- passes/opt/opt_const.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'passes/opt/opt_const.cc') diff --git a/passes/opt/opt_const.cc b/passes/opt/opt_const.cc index 5b87aeaa..1e9b1331 100644 --- a/passes/opt/opt_const.cc +++ b/passes/opt/opt_const.cc @@ -113,7 +113,7 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module) if (input.match("0 ")) ACTION_DO("\\Y", input.extract(0, 1)); } - if (cell->type == "$_MUX_" ||(cell->type == "$mux" && cell->parameters["\\WIDTH"].as_int() == 1)) { + if (cell->type == "$_MUX_") { RTLIL::SigSpec input; input.append(cell->connections["\\S"]); input.append(cell->connections["\\B"]); @@ -128,8 +128,8 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module) // TODO: "10 " -> replace with "!S" gate // TODO: "0 " -> replace with "B AND S" gate // TODO: " 1 " -> replace with "A OR S" gate - // TODO: "1 " -> replace with "B OR !S" gate - // TODO: " 0 " -> replace with "A AND !S" gate + // TODO: "1 " -> replace with "B OR !S" gate (?) + // TODO: " 0 " -> replace with "A AND !S" gate (?) if (input.match(" *")) ACTION_DO_Y(x); #endif } -- cgit v1.2.3