Skip to content

Commit

Permalink
[sival/entropy_src] Add entropy_src_bypass_mode_health_test
Browse files Browse the repository at this point in the history
This test implements the entropy source test,
"chip_sw_entropy_src_bypass_mode_health_tests" scenario as described
in the OpenTitan testplan.

- ENTROPY_SRC provides one initial seed in boot-time / bypass mode.
- Signals a recoverable alert if the total failure counter hits the threshold in boot-time / bypass mode.
- Checks and prints status registers for debug
- Review feedbacks incorporated

See: /hw/top_earlgrey/data/ip/chip_entropy_src_testplan.hjson

Signed-off-by: Varunkumar Trivedi <[email protected]>
  • Loading branch information
github-gcontributor authored and engdoreis committed Dec 16, 2024
1 parent d2eba04 commit 4136ea4
Show file tree
Hide file tree
Showing 2 changed files with 513 additions and 0 deletions.
40 changes: 40 additions & 0 deletions sw/device/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,46 @@ opentitan_test(
],
)

opentitan_test(
name = "entropy_src_bypass_mode_health_test",
srcs = ["entropy_src_bypass_mode_health_test.c"],
exec_env = dicts.add(
EARLGREY_TEST_ENVS,
EARLGREY_SILICON_OWNER_ROM_EXT_ENVS,
{
"//hw/top_earlgrey:fpga_cw310_sival": None,
"//hw/top_earlgrey:sim_verilator": None,
"//hw/top_earlgrey:fpga_cw340_sival": None,
"//hw/top_earlgrey:silicon_creator": None,
},
),
verilator = verilator_params(timeout = "long"),
deps = [
":otbn_randomness_impl",
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
"//sw/device/lib/base:memory",
"//sw/device/lib/base:mmio",
"//sw/device/lib/dif:aes",
"//sw/device/lib/dif:alert_handler",
"//sw/device/lib/dif:entropy_src",
"//sw/device/lib/dif:keymgr",
"//sw/device/lib/dif:kmac",
"//sw/device/lib/dif:otbn",
"//sw/device/lib/dif:otp_ctrl",
"//sw/device/lib/dif:pwrmgr",
"//sw/device/lib/dif:rv_core_ibex",
"//sw/device/lib/runtime:hart",
"//sw/device/lib/runtime:log",
"//sw/device/lib/testing:aes_testutils",
"//sw/device/lib/testing:alert_handler_testutils",
"//sw/device/lib/testing:entropy_testutils",
"//sw/device/lib/testing:keymgr_testutils",
"//sw/device/lib/testing:otp_ctrl_testutils",
"//sw/device/lib/testing:pwrmgr_testutils",
"//sw/device/lib/testing/test_framework:ottf_main",
],
)

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

0 comments on commit 4136ea4

Please sign in to comment.