need unsigned comparison when checking shift widths for overflow in functional backend

This commit is contained in:
Emily Schmidt 2024-06-12 12:27:43 +01:00
parent 3552a8a2b2
commit dbf2bc3b1d
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class CellSimplifier {
} else {
reduced_b_width = new_width;
T lower_b = factory.slice(b, b_width, 0, new_width);
T overflow = factory.gt(b, factory.constant(RTLIL::Const(y_width, b_width)), b_width);
T overflow = factory.ugt(b, factory.constant(RTLIL::Const(y_width, b_width)), b_width);
return factory.mux(lower_b, factory.constant(RTLIL::Const(y_width, new_width)), overflow, new_width);
}
}