From 6fb13be36e5e09b168be5a97d2e4d0cef15a8b0f Mon Sep 17 00:00:00 2001 From: Pascal Nasahl Date: Thu, 7 Nov 2024 15:51:23 +0000 Subject: [PATCH] [kmac, rtl/dv/sw] Remove unused error code The `ErrShadowRegUpdate` code is never used in the RTL. Instead, according to the documentation, on a shadow register update error, a recoverable alert shall be triggered - this recoverable alert then is signaled in the STATUS register and not in the error code register. Hence, this commit removes this error code as well as the corresponding SW code (`kDifErrorShadowRegisterUpdate`). Signed-off-by: Pascal Nasahl --- hw/ip/kmac/dv/env/kmac_env_cov.sv | 3 +-- hw/ip/kmac/rtl/kmac_pkg.sv | 3 --- sw/device/lib/dif/dif_kmac.h | 2 -- sw/device/lib/dif/dif_kmac_unittest.cc | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/ip/kmac/dv/env/kmac_env_cov.sv b/hw/ip/kmac/dv/env/kmac_env_cov.sv index a846c3da6110d..0a9250ef24a53 100644 --- a/hw/ip/kmac/dv/env/kmac_env_cov.sv +++ b/hw/ip/kmac/dv/env/kmac_env_cov.sv @@ -301,8 +301,7 @@ class kmac_env_cov extends cip_base_env_cov #(.CFG_T(kmac_env_cfg)); kmac_err_code: coverpoint kmac_err { ignore_bins ignore = {kmac_pkg::ErrNone}; // Covered by direct sequence, if scb enabled for those seq, can remove it from this list. - illegal_bins il = {kmac_pkg::ErrShadowRegUpdate, - kmac_pkg::ErrWaitTimerExpired, + illegal_bins il = {kmac_pkg::ErrWaitTimerExpired, kmac_pkg::ErrIncorrectEntropyMode, kmac_pkg::ErrSwHashingWithoutEntropyReady}; } diff --git a/hw/ip/kmac/rtl/kmac_pkg.sv b/hw/ip/kmac/rtl/kmac_pkg.sv index b328b2ab053c5..2677255faf5bc 100644 --- a/hw/ip/kmac/rtl/kmac_pkg.sv +++ b/hw/ip/kmac/rtl/kmac_pkg.sv @@ -456,9 +456,6 @@ package kmac_pkg; // - Sw issues KMAC op without Entropy setting. ErrSwHashingWithoutEntropyReady = 8'h 09, - // Error Shadow register update - ErrShadowRegUpdate = 8'h C0, - // Error due to lc_escalation_en_i or fatal fault ErrFatalError = 8'h C1, diff --git a/sw/device/lib/dif/dif_kmac.h b/sw/device/lib/dif/dif_kmac.h index bc23856b408e8..3eaee3350fa4b 100644 --- a/sw/device/lib/dif/dif_kmac.h +++ b/sw/device/lib/dif/dif_kmac.h @@ -402,8 +402,6 @@ typedef enum dif_kmac_error { kDifErrorSoftwareHashingWithoutEntropyReady = 9, - kDifErrorShadowRegisterUpdate = 0xC0, - kDifErrorFatalError = 0xC1, kDifErrorPackerIntegrity = 0xC2, diff --git a/sw/device/lib/dif/dif_kmac_unittest.cc b/sw/device/lib/dif/dif_kmac_unittest.cc index 7bfc819d8881e..6e614db138007 100644 --- a/sw/device/lib/dif/dif_kmac_unittest.cc +++ b/sw/device/lib/dif/dif_kmac_unittest.cc @@ -792,7 +792,6 @@ class KmacGetErrorTest : public KmacTest { kDifErrorIncorrectFunctionName, kDifErrorSoftwareCommandSequence, kDifErrorSoftwareHashingWithoutEntropyReady, - kDifErrorShadowRegisterUpdate, kDifErrorFatalError, kDifErrorPackerIntegrity, kDifErrorMsgFifoIntegrity,