4 #include "sw/device/lib/testing/entropy_src_testutils.h"
7 #include "sw/device/lib/testing/test_framework/check.h"
9 #define MODULE_ID MAKE_MODULE_ID('e', 'n', 's')
11 status_t entropy_src_testutils_fw_override_enable(
12 dif_entropy_src_t *entropy_src, uint8_t buffer_threshold,
13 bool route_to_firmware,
bool bypass_conditioner) {
16 .buffer_threshold = buffer_threshold,
25 .route_to_firmware = route_to_firmware,
26 .bypass_conditioner = bypass_conditioner,
28 .health_test_threshold_scope =
false,
29 .health_test_window_size = 0x0200,
36 status_t entropy_src_testutils_wait_for_state(
42 }
while (cur_state != state);
46 status_t entropy_src_testutils_drain_observe_fifo(
47 dif_entropy_src_t *entropy_src) {
51 const size_t kDrainCount = 32;
58 }
while (len == kDrainCount);
63 status_t entropy_src_testutils_disable_health_tests(
64 dif_entropy_src_t *entropy_src) {
70 for (
size_t i = 0; i <
ARRAYSIZE(kHealthTest); i++) {
74 .high_threshold = 0xffffffff,
75 .low_threshold = 0}));