From 28c02a7e6a5a3be69a59eed81dfd9ace6612e487 Mon Sep 17 00:00:00 2001 From: David Harris Date: Wed, 12 Apr 2023 02:48:40 -0700 Subject: [PATCH] Fixed fdivsqrt to avoid going from done to busy without going through idle first --- src/fpu/fdivsqrt/fdivsqrtfsm.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fpu/fdivsqrt/fdivsqrtfsm.sv b/src/fpu/fdivsqrt/fdivsqrtfsm.sv index da13813f..4cfede60 100644 --- a/src/fpu/fdivsqrt/fdivsqrtfsm.sv +++ b/src/fpu/fdivsqrt/fdivsqrtfsm.sv @@ -110,7 +110,7 @@ module fdivsqrtfsm( always_ff @(posedge clk) begin if (reset | FlushE) begin state <= #1 IDLE; - end else if (IFDivStartE) begin + end else if ((state == IDLE) & IFDivStartE) begin step <= cycles; if (SpecialCaseE) state <= #1 DONE; else state <= #1 BUSY;