3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-18 05:05:45 +00:00

Robustness fixes

This commit is contained in:
Akash Levy 2025-03-30 22:23:21 -07:00
parent 984c6357ba
commit f72d27fae0
2 changed files with 8 additions and 6 deletions

View file

@ -75,7 +75,8 @@ struct ExtractReducePass : public Pass
inline bool IsSingleBit(Cell* cell)
{
return (cell->hasParam(ID::WIDTH) && cell->getParam(ID::WIDTH).as_int() == 1) ||
(cell->getParam(ID::A_WIDTH).as_int() == 1 &&
(cell->hasParam(ID::A_WIDTH) &&
cell->getParam(ID::A_WIDTH).as_int() == 1 &&
cell->getParam(ID::B_WIDTH).as_int() == 1 &&
cell->getParam(ID::Y_WIDTH).as_int() == 1);
}