blob: 8a78d828e91efb982de83e18628b116472e97c49 [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/dif/dif_entropy_src.h"
#include "sw/device/lib/testing/test_framework/check.h"
#include "sw/device/lib/testing/test_framework/ottf_main.h"
#include "sw/device/tests/entropy_src_kat_impl.h"
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h" // Generated.
OTTF_DEFINE_TEST_CONFIG();
bool test_main(void) {
dif_entropy_src_t entropy_src;
CHECK_DIF_OK(dif_entropy_src_init(
mmio_region_from_addr(TOP_EARLGREY_ENTROPY_SRC_BASE_ADDR), &entropy_src));
entropy_src_kat_test(&entropy_src);
return true;
}