diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-07-07 12:59:00 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-07-07 12:59:00 +0200 |
commit | 0c0197cf45ae5ca0f40cfeb34d289acc9bca5b7e (patch) | |
tree | 70e1e8c707d7e8ca84c4122814ab7513bcd1b9b5 /passes | |
parent | 92a5961fd3b1c880605b114edfbbafbefb20b377 (diff) | |
download | yosys-0c0197cf45ae5ca0f40cfeb34d289acc9bca5b7e.tar.gz yosys-0c0197cf45ae5ca0f40cfeb34d289acc9bca5b7e.tar.bz2 yosys-0c0197cf45ae5ca0f40cfeb34d289acc9bca5b7e.zip |
Fixed handling of $eq and $ne in opt_const
Diffstat (limited to 'passes')
-rw-r--r-- | passes/opt/opt_const.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/opt/opt_const.cc b/passes/opt/opt_const.cc index 149bd97d5..4223ebe3b 100644 --- a/passes/opt/opt_const.cc +++ b/passes/opt/opt_const.cc @@ -148,8 +148,8 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons { if (cell->parameters["\\A_WIDTH"].as_int() != cell->parameters["\\B_WIDTH"].as_int()) { int width = std::max(cell->parameters["\\A_WIDTH"].as_int(), cell->parameters["\\B_WIDTH"].as_int()); - cell->connections["\\A"].extend(width, cell->parameters["\\A_SIGNED"].as_bool()); - cell->connections["\\B"].extend(width, cell->parameters["\\B_SIGNED"].as_bool()); + cell->connections["\\A"].extend(width, cell->parameters["\\A_SIGNED"].as_bool() && cell->parameters["\\B_SIGNED"].as_bool()); + cell->connections["\\B"].extend(width, cell->parameters["\\A_SIGNED"].as_bool() && cell->parameters["\\B_SIGNED"].as_bool()); cell->parameters["\\A_WIDTH"] = width; cell->parameters["\\B_WIDTH"] = width; } |