Skip to content

Commit 3a03078

Browse files
committed
[tests] Port edn_sw_mode to multitop
Signed-off-by: Robert Schilling <[email protected]>
1 parent 45ca5b2 commit 3a03078

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

sw/device/tests/BUILD

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,14 +1348,15 @@ opentitan_test(
13481348
{
13491349
"//hw/top_earlgrey:silicon_creator": None,
13501350
},
1351+
DARJEELING_TEST_ENVS,
13511352
),
13521353
verilator = verilator_params(
13531354
timeout = "long",
13541355
),
13551356
deps = [
13561357
"//hw/ip/aes:model",
1358+
"//hw/top:dt",
13571359
"//hw/top:edn_c_regs",
1358-
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
13591360
"//sw/device/lib/base:mmio",
13601361
"//sw/device/lib/dif:aes",
13611362
"//sw/device/lib/dif:csrng",

sw/device/tests/edn_sw_mode.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// SPDX-License-Identifier: Apache-2.0
44

55
#include "hw/ip/aes/model/aes_modes.h"
6+
#include "hw/top/dt/dt_aes.h"
7+
#include "hw/top/dt/dt_csrng.h"
8+
#include "hw/top/dt/dt_edn.h"
69
#include "sw/device/lib/base/mmio.h"
710
#include "sw/device/lib/dif/dif_aes.h"
811
#include "sw/device/lib/dif/dif_csrng.h"
@@ -16,7 +19,6 @@
1619
#include "sw/device/lib/testing/test_framework/ottf_main.h"
1720

1821
#include "hw/top/edn_regs.h" // Generated
19-
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
2022

2123
#define TIMEOUT (10 * 1000 * 1000)
2224
// AES with Domain-Oriented Masking (DOM) takes 72 cycles per 16B data
@@ -34,14 +36,10 @@ OTTF_DEFINE_TEST_CONFIG();
3436

3537
// Initializes the peripherals used in this test.
3638
static void init_peripherals(void) {
37-
CHECK_DIF_OK(dif_csrng_init(
38-
mmio_region_from_addr(TOP_EARLGREY_CSRNG_BASE_ADDR), &csrng));
39-
CHECK_DIF_OK(
40-
dif_edn_init(mmio_region_from_addr(TOP_EARLGREY_EDN0_BASE_ADDR), &edn0));
41-
CHECK_DIF_OK(
42-
dif_edn_init(mmio_region_from_addr(TOP_EARLGREY_EDN1_BASE_ADDR), &edn1));
43-
CHECK_DIF_OK(
44-
dif_aes_init(mmio_region_from_addr(TOP_EARLGREY_AES_BASE_ADDR), &aes));
39+
CHECK_DIF_OK(dif_csrng_init_from_dt(kDtCsrng, &csrng));
40+
CHECK_DIF_OK(dif_edn_init_from_dt(kDtEdn0, &edn0));
41+
CHECK_DIF_OK(dif_edn_init_from_dt(kDtEdn1, &edn1));
42+
CHECK_DIF_OK(dif_aes_init_from_dt(kDtAes, &aes));
4543
}
4644

4745
// Wrapper function for the AES_TESTUTILS_WAIT_FOR_STATUS macro.

0 commit comments

Comments
 (0)