Fixed early termination for square root

This commit is contained in:
David Harris 2022-12-26 08:54:57 -08:00
parent 2de66e9eef
commit c326a274ac

View File

@ -116,8 +116,7 @@ module fdivsqrtfsm(
if (SpecialCaseE) state <= #1 DONE;
else state <= #1 BUSY;
end else if (state == BUSY) begin
// if (step == 1 | WZeroE) state <= #1 DONE; // finished steps or terminate early on zero residual
if (step == 1) state <= #1 DONE; // finished steps or terminate early on zero residual
if (step == 1 | WZeroE) state <= #1 DONE; // finished steps or terminate early on zero residual
step <= step - 1;
end else if (state == DONE) begin
if (StallM) state <= #1 DONE;