Skip to content

Commit

Permalink
[sival/hmac] Add Hmac error conditions Test
Browse files Browse the repository at this point in the history
Signed-off-by: Ramesh Prakash <[email protected]>
Add HMAC error condition test as per chip_hmac_testplan.hjson
  • Loading branch information
rprakas-gsc committed Jan 28, 2025
1 parent d28f9e4 commit 3eedde8
Show file tree
Hide file tree
Showing 3 changed files with 395 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/top_earlgrey/data/ip/chip_hmac_testplan.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,14 @@
- `SwUpdateSecretKeyInProcess`: Update secret key when hash is in progress.
- `SwHashStartWhenActive`: Issue hash start when hash is in progress.
- `SwPushMsgWhenDisallowed`: Push message when HMAC is not idle.
- `SwInvalidConfig`: Issue when HMAC configured with incorrect digest-size or key-length
'''
features: []
stage: V3
si_stage: SV3
lc_states: ["PROD"]
tests: []
bazel: []
bazel: ["//sw/device/tests:hmac_error_conditions_test"]
}
]
}
24 changes: 24 additions & 0 deletions sw/device/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7362,3 +7362,27 @@ opentitan_test(
"//sw/device/lib/testing/test_framework:ottf_utils",
],
)

opentitan_test(
name = "hmac_error_conditions_test",
srcs = ["hmac_error_conditions_test.c"],
exec_env = dicts.add(
EARLGREY_SILICON_OWNER_ROM_EXT_ENVS,
{
"//hw/top_earlgrey:sim_verilator": None,
"//hw/top_earlgrey:fpga_cw340_sival": None,
},
),
verilator = verilator_params(
timeout = "long",
),
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
"//sw/device/lib/arch:device",
"//sw/device/lib/base:mmio",
"//sw/device/lib/dif:hmac",
"//sw/device/lib/runtime:log",
"//sw/device/lib/testing:hmac_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
],
)
Loading

0 comments on commit 3eedde8

Please sign in to comment.