[otp_ctrl] Properly end cnsty/integ checks that found an error

This changes the behavior of the buffered partition checker logic such
that failing checks signal back to the LFSR timer that they have
finished performing the check.

That way, the LFSR timer can still continue running and triggering
checks in other partitions, despite the faulty partition being in the
terminal error state.

Signed-off-by: Michael Schaffner <msf@opentitan.org>
diff --git a/hw/ip/otp_ctrl/rtl/otp_ctrl_lfsr_timer.sv b/hw/ip/otp_ctrl/rtl/otp_ctrl_lfsr_timer.sv
index b76b3c5..1b57725 100644
--- a/hw/ip/otp_ctrl/rtl/otp_ctrl_lfsr_timer.sv
+++ b/hw/ip/otp_ctrl/rtl/otp_ctrl_lfsr_timer.sv
@@ -283,6 +283,9 @@
       ///////////////////////////////////////////////////////////////////
       // Terminal error state. This raises an alert.
       ErrorSt: begin
+        // Continuously clear pending checks.
+        clr_integ_chk_trig = 1'b1;
+        clr_cnsty_chk_trig = 1'b1;
         if (!chk_timeout_q) begin
           fsm_err_o = 1'b1;
         end
diff --git a/hw/ip/otp_ctrl/rtl/otp_ctrl_part_buf.sv b/hw/ip/otp_ctrl/rtl/otp_ctrl_part_buf.sv
index e131c4f..da2b296 100644
--- a/hw/ip/otp_ctrl/rtl/otp_ctrl_part_buf.sv
+++ b/hw/ip/otp_ctrl/rtl/otp_ctrl_part_buf.sv
@@ -322,6 +322,8 @@
           if (!(otp_err_e'(otp_err_i) inside {NoError, MacroEccCorrError})) begin
             state_d = ErrorSt;
             error_d = otp_err_e'(otp_err_i);
+            // The check has finished and found an error.
+            cnsty_chk_ack_o = 1'b1;
           end else begin
             // Check whether we need to compare the digest or the full partition
             // contents here.
@@ -334,6 +336,8 @@
               end else begin
                 state_d = ErrorSt;
                 error_d = CheckFailError;
+                // The check has finished and found an error.
+                cnsty_chk_ack_o = 1'b1;
               end
             end else begin
               // Check whether the read data corresponds with the data buffered in regs.
@@ -352,6 +356,8 @@
               end else begin
                 state_d = ErrorSt;
                 error_d = CheckFailError;
+                // The check has finished and found an error.
+                cnsty_chk_ack_o = 1'b1;
               end
             end
             // Signal ECC soft errors, but do not go into terminal error state.
@@ -500,6 +506,8 @@
           end else begin
             state_d = ErrorSt;
             error_d = CheckFailError;
+            // The check has finished and found an error.
+            integ_chk_ack_o = 1'b1;
           end
         end
       end
@@ -512,6 +520,10 @@
         if (!error_q) begin
           error_d = FsmStateError;
         end
+        // If we are in error state, we cannot execute the checks anymore.
+        // Hence the acknowledgements are returned immediately.
+        cnsty_chk_ack_o = 1'b1;
+        integ_chk_ack_o = 1'b1;
       end
       ///////////////////////////////////////////////////////////////////
       // We should never get here. If we do (e.g. via a malicious