opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[kmac] centralized location for error codes

Open udinator opened this issue 5 years ago • 2 comments

Hi Eunchan,

Right now, we have err_code_e enums in both the kmac_pkg and the sha3_pkg, both containing a subset of the overall error codes supported by KMAC.

Does it make sense to merge these into a single enum in kmac_pkg? At first glance it seems to make more sense to have these all in a single location (and it prevents DV from having to duplicate and manually stay up-to-date with the error types).

udinator avatar May 20 '21 17:05 udinator

that is actually a little bit tricky. Sha3 can be used as a standalone primitive design as you see in the EDN (or csrng?). So we cannot combine the error code in kmac pkg or sha3 pkg.

On Fri, May 21, 2021, 2:57 AM udinator @.***> wrote:

Hi Eunchan,

Right now, we have err_code_e enums in both the kmac_pkg and the sha3_pkg, both containing a subset of the overall error codes supported by KMAC.

Does it make sense to merge these into a single enum in kmac_pkg? At first glance it seems to make more sense to have these all in a single location (and it prevents DV from having to duplicate and manually stay up-to-date with the error types).

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/lowRISC/opentitan/issues/6645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDG3U22BQVDS77QDIW2R3TOVEPDANCNFSM45HRMQGA .

eunchan avatar May 20 '21 22:05 eunchan

hmm okay - that complicates things a little bit, but is still doable. Thanks!

udinator avatar May 20 '21 22:05 udinator