diff --git a/hw/ip/csrng/rtl/csrng_cmd_stage.sv b/hw/ip/csrng/rtl/csrng_cmd_stage.sv index f6e4687b9d791..fa2f2fe28dbde 100644 --- a/hw/ip/csrng/rtl/csrng_cmd_stage.sv +++ b/hw/ip/csrng/rtl/csrng_cmd_stage.sv @@ -397,7 +397,13 @@ module csrng_cmd_stage import csrng_pkg::*; #( cmd_stage_sm_err_o = 1'b1; end default: state_d = Error; - endcase + endcase // unique case (state_q) + + // if disable, cycle back to Idle + if (!cs_enable_i && state_q != Idle) begin + state_d = Idle; + end + end //---------------------------------------------------------