Skip to content

Commit

Permalink
[sival,kmac] Add kmac_error_conditions_test
Browse files Browse the repository at this point in the history
This adds the new `kmac_error_conditions_test` test that is
defined in the `chip_sw_kmac_error_conditions` chip level test.

Signed-off-by: Pascal Nasahl <[email protected]>
  • Loading branch information
nasahlpa committed Nov 8, 2024
1 parent d32114c commit 69809d4
Show file tree
Hide file tree
Showing 3 changed files with 740 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/top_earlgrey/data/ip/chip_kmac_testplan.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@
- ErrIncorrectFunctionName: covers that the function name is configured incorrectly
when KMAC mode is enabled
- ErrSwCmdSequence: covers that SW issues commands to the KMAC out of order
- Shadow register update alert: covers that the an recoverable alert is triggered on active
shadow register update error
- ErrSwHashingWithoutEntropyReady: covers that starting a hash operation when the entropy is
not ready triggers an error

Some of the error conditions may be difficult to reproduce in silicon. In such cases,
update the test description to capture any limitations.
Expand All @@ -305,7 +309,7 @@
si_stage: SV3
lc_states: ["PROD"]
tests: []
bazel: []
bazel: ["//sw/device/tests:kmac_error_conditions_test"]
}
]
}
25 changes: 25 additions & 0 deletions sw/device/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,31 @@ opentitan_test(
],
)

opentitan_test(
name = "kmac_error_conditions_test",
srcs = ["kmac_error_conditions_test.c"],
exec_env = dicts.add(
EARLGREY_SILICON_OWNER_ROM_EXT_ENVS,
{
"//hw/top_earlgrey:fpga_cw340_sival": None,
"//hw/top_earlgrey:sim_dv": None,
"//hw/top_earlgrey:sim_verilator": None,
},
),
verilator = verilator_params(timeout = "long"),
deps = [
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
"//sw/device/lib/base:mmio",
"//sw/device/lib/dif:clkmgr",
"//sw/device/lib/dif:keymgr",
"//sw/device/lib/dif:kmac",
"//sw/device/lib/runtime:log",
"//sw/device/lib/testing:keymgr_testutils",
"//sw/device/lib/testing:kmac_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
],
)

opentitan_test(
name = "kmac_idle_test",
srcs = ["kmac_idle_test.c"],
Expand Down
Loading

0 comments on commit 69809d4

Please sign in to comment.