Fill in unreachable state in cvfpu. Address ELAB-1094 Change-Id: Iea6bc593f8e02f8df0a86f5f2fb121000d3e79b2
diff --git a/rules/repos.bzl b/rules/repos.bzl index a11e079..64cb1c0 100644 --- a/rules/repos.bzl +++ b/rules/repos.bzl
@@ -127,6 +127,7 @@ patches = [ "@kelvin_hw//third_party/cvfpu:0001-Fix-max_num_lanes-issue-in-DC.patch", "@kelvin_hw//third_party/cvfpu:0002-Remove-SVH-includes.patch", + "@kelvin_hw//third_party/cvfpu:0003-Fill-in-unreachable-state-in-fpnew_divsqrt_th_32-fsm.patch", ], patch_args = ["-p1"], )
diff --git a/third_party/cvfpu/0003-Fill-in-unreachable-state-in-fpnew_divsqrt_th_32-fsm.patch b/third_party/cvfpu/0003-Fill-in-unreachable-state-in-fpnew_divsqrt_th_32-fsm.patch new file mode 100644 index 0000000..9068ba0 --- /dev/null +++ b/third_party/cvfpu/0003-Fill-in-unreachable-state-in-fpnew_divsqrt_th_32-fsm.patch
@@ -0,0 +1,25 @@ +From 85d0d9d9e69b54c9d324f4e059d1ab5cbea43952 Mon Sep 17 00:00:00 2001 +From: Derek Chow <derekjchow@google.com> +Date: Fri, 1 Aug 2025 10:32:22 -0700 +Subject: [PATCH 3/3] Fill in unreachable state in fpnew_divsqrt_th_32 fsm. + +--- + src/fpnew_divsqrt_th_32.sv | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fpnew_divsqrt_th_32.sv b/src/fpnew_divsqrt_th_32.sv +index a74e7e6..0cae2a3 100644 +--- a/src/fpnew_divsqrt_th_32.sv ++++ b/src/fpnew_divsqrt_th_32.sv +@@ -143,7 +143,7 @@ module fpnew_divsqrt_th_32 #( + logic data_is_held; // data in hold register is valid + logic unit_busy; // valid data in flight + // FSM states +- typedef enum logic [1:0] {IDLE, BUSY, HOLD} fsm_state_e; ++ typedef enum logic [1:0] {IDLE, BUSY, HOLD, UNREACHABLE} fsm_state_e; + fsm_state_e state_q, state_d; + + // Operations are gated by the FSM ready. Invalid input ops run a sqrt to not lose illegal instr. +-- +2.50.1.565.gc32cd1483b-goog +