Fixed handling of $eq and $ne in opt_const

This commit is contained in:
Clifford Wolf 2013-07-07 12:59:00 +02:00
parent 92a5961fd3
commit 0c0197cf45
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}