From ed1c41cd0f0b5400967457dd1dfaa9b3ab0c3b48 Mon Sep 17 00:00:00 2001 From: Brian Orr Date: Tue, 27 Aug 2024 21:39:36 -0700 Subject: [PATCH] [bazel] Support CW340 FPGA target Add support for the CW340 target to Bazel rules for cryptotest. Fixes #24418. Signed-off-by: Brian Orr --- sw/device/tests/crypto/cryptotest/cryptotest.bzl | 11 +++++++++++ sw/device/tests/crypto/cryptotest/firmware/BUILD | 1 + 2 files changed, 12 insertions(+) diff --git a/sw/device/tests/crypto/cryptotest/cryptotest.bzl b/sw/device/tests/crypto/cryptotest/cryptotest.bzl index b097a5ce069b8..ac37aa8e7e0ca 100644 --- a/sw/device/tests/crypto/cryptotest/cryptotest.bzl +++ b/sw/device/tests/crypto/cryptotest/cryptotest.bzl @@ -16,10 +16,12 @@ load( # opentitan_test must have the following attributes to configure # each execution environment: # - cw310 +# - cw340 # - silicon # - silicon_prodc CRYPTOTEST_EXEC_ENVS = { "//hw/top_earlgrey:fpga_cw310_test_rom": None, + "//hw/top_earlgrey:fpga_cw340_test_rom": "fpga_cw340", "//hw/top_earlgrey:silicon_owner_sival_rom_ext": "silicon", "//hw/top_earlgrey:silicon_owner_prodc_rom_ext": "silicon_prodc", } @@ -44,6 +46,15 @@ def cryptotest(name, test_vectors, test_args, test_harness): """ + test_args, test_harness = test_harness, ), + fpga_cw340 = fpga_params( + timeout = "long", + binaries = {"//sw/device/tests/crypto/cryptotest/firmware:firmware_fpga_cw340_test_rom": "firmware"}, + data = test_vectors, + test_cmd = """ + --bootstrap={firmware} + """ + test_args, + test_harness = test_harness, + ), exec_env = CRYPTOTEST_EXEC_ENVS, silicon = silicon_params( timeout = "eternal", diff --git a/sw/device/tests/crypto/cryptotest/firmware/BUILD b/sw/device/tests/crypto/cryptotest/firmware/BUILD index d5ae662c8b8d2..60d9f103281af 100644 --- a/sw/device/tests/crypto/cryptotest/firmware/BUILD +++ b/sw/device/tests/crypto/cryptotest/firmware/BUILD @@ -191,6 +191,7 @@ FIRMWARE_DEPS = [ ) for exec_env in [ "fpga_cw310_test_rom", + "fpga_cw340_test_rom", "silicon_owner_sival_rom_ext", "silicon_owner_prodc_rom_ext", ]