Software APIs
sw
device
tests
entropy_src_kat_test.c
1
// Copyright lowRISC contributors (OpenTitan project).
2
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3
// SPDX-License-Identifier: Apache-2.0
4
5
#include "
sw/device/lib/dif/dif_entropy_src.h
"
6
#include "sw/device/lib/testing/test_framework/check.h"
7
#include "
sw/device/lib/testing/test_framework/ottf_main.h
"
8
#include "sw/device/tests/entropy_src_kat_impl.h"
9
10
#include "
hw/top_earlgrey/sw/autogen/top_earlgrey.h
"
// Generated.
11
12
OTTF_DEFINE_TEST_CONFIG();
13
14
bool
test_main
(
void
) {
15
dif_entropy_src_t entropy_src;
16
CHECK_DIF_OK(dif_entropy_src_init(
17
mmio_region_from_addr
(
TOP_EARLGREY_ENTROPY_SRC_BASE_ADDR
), &entropy_src));
18
entropy_src_kat_test(&entropy_src);
19
return
true
;
20
}
Return to
OpenTitan Documentation