diff --git a/hw/ip/hmac/dv/cov/hmac_cov_excl.el b/hw/ip/hmac/dv/cov/hmac_cov_excl.el deleted file mode 100644 index e4f09b1f70408..0000000000000 --- a/hw/ip/hmac/dv/cov/hmac_cov_excl.el +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright lowRISC contributors (OpenTitan project). -// Licensed under the Apache License, Version 2.0, see LICENSE for details. -// SPDX-License-Identifier: Apache-2.0 - -//================================================== -// This file contains the Excluded objects -// Generated By User: gdessouky -// Format Version: 2 -// Date: Sat Jul 6 04:05:21 2024 -// ExclMode: default -//================================================== -CHECKSUM: "1683432060 1171249183" -INSTANCE: tb.dut.u_prim_sha2_512.gen_multimode_logic.u_prim_sha2_multimode.u_pad -Fsm st_q "1171249183" -ANNOTATION: "[INVALID] Intend to remove transition" -Transition StLenHi->StFifoReceive "4->1" -Fsm st_q "1171249183" -ANNOTATION: "[INVALID] Intend to remove transition" -Transition StPad80->StFifoReceive "2->1" -Fsm st_q "1171249183" -ANNOTATION: "[INVALID] Intend to remove transition" -Transition StPad00->StFifoReceive "3->1" -Fsm st_q "1171249183" -ANNOTATION: "[INVALID] Intend to remove transition" -Transition StLenLo->StFifoReceive "5->1" diff --git a/hw/ip/hmac/dv/hmac_sim_cfg.hjson b/hw/ip/hmac/dv/hmac_sim_cfg.hjson index 429ac0ae66c9b..b07ef3e6d06c9 100644 --- a/hw/ip/hmac/dv/hmac_sim_cfg.hjson +++ b/hw/ip/hmac/dv/hmac_sim_cfg.hjson @@ -41,8 +41,7 @@ reseed: 50 // Add HMAC specific exclusion files. - vcs_cov_excl_files: ["{proj_root}/hw/ip/hmac/dv/cov/hmac_unr_excl.el", - "{proj_root}/hw/ip/hmac/dv/cov/hmac_cov_excl.el"] + vcs_cov_excl_files: ["{proj_root}/hw/ip/hmac/dv/cov/hmac_unr_excl.el"] // Default UVM test and seq class name. uvm_test: hmac_base_test diff --git a/hw/ip/prim/rtl/prim_sha2_pad.sv b/hw/ip/prim/rtl/prim_sha2_pad.sv index 1dc010dfefabe..242698d7b0f27 100644 --- a/hw/ip/prim/rtl/prim_sha2_pad.sv +++ b/hw/ip/prim/rtl/prim_sha2_pad.sv @@ -337,8 +337,13 @@ module prim_sha2_pad import prim_sha2_pkg::*; end endcase - if (!sha_en_i) st_d = StIdle; - else if (hash_go) st_d = StFifoReceive; + if (!sha_en_i) begin + st_d = StIdle; + // We do not allow the cancellation of an ongoing padding operation, i.e., reverting back to the + // `StFifoReceive` state while being in the states `StPad80`, `StPad00`, `StLenHi` or `StLenLo`. + end else if (hash_go && (st_q == StIdle || st_q == StFifoReceive)) begin + st_d = StFifoReceive; + end end // tx_count