3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

opt_expr: const_xnor replacement to pad Y with 1'b1

This commit is contained in:
Eddie Hung 2020-04-24 14:13:45 -07:00
parent ebd6fa945d
commit b5f38f8342
2 changed files with 48 additions and 1 deletions

View file

@ -575,7 +575,8 @@ void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bool cons
if (cell->type.in(ID($xnor), ID($_XNOR_))) {
cover("opt.opt_expr.const_xnor");
// For consistency since simplemap does $xnor -> $_XOR_ + $_NOT_
replace_cell(assign_map, module, cell, "const_xnor", ID::Y, RTLIL::State::S1);
int width = cell->getParam(ID::Y_WIDTH).as_int();
replace_cell(assign_map, module, cell, "const_xnor", ID::Y, SigSpec(RTLIL::State::S1, width));
goto next_cell;
}
log_abort();