From 364dedffe26651f9ea49c090043b9fe325043ea4 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 (cherry picked from commit a785a76e6c287c84e4aca010e5b7d4e387fecbc5) --- sw/device/tests/crypto/cryptotest/cryptotest.bzl | 10 ++++++++++ sw/device/tests/crypto/cryptotest/firmware/BUILD | 1 + 2 files changed, 11 insertions(+) diff --git a/sw/device/tests/crypto/cryptotest/cryptotest.bzl b/sw/device/tests/crypto/cryptotest/cryptotest.bzl index 0ff8db65ef4ac..142ff36da0913 100644 --- a/sw/device/tests/crypto/cryptotest/cryptotest.bzl +++ b/sw/device/tests/crypto/cryptotest/cryptotest.bzl @@ -15,6 +15,7 @@ load( # opentitan_test must have the following attributes to configure # each execution environment: # - cw310 +# - cw340 # - silicon CRYPTOTEST_EXEC_ENVS = { "//hw/top_earlgrey:fpga_cw310_test_rom": None, @@ -68,6 +69,15 @@ def cryptotest(name, test_vectors, test_args, test_harness, slow_test = False): """ + test_args, test_harness = test_harness, ), + fpga_cw340 = fpga_params( + timeout = "long", + tags = tags, + 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 630f29b61f202..478cd1c3df1e0 100644 --- a/sw/device/tests/crypto/cryptotest/firmware/BUILD +++ b/sw/device/tests/crypto/cryptotest/firmware/BUILD @@ -186,6 +186,7 @@ opentitan_binary( srcs = [":firmware.c"], exec_env = [ "//hw/top_earlgrey:fpga_cw310", + "//hw/top_earlgrey:fpga_cw340", "//hw/top_earlgrey:silicon_owner_sival_rom_ext", ], deps = FIRMWARE_DEPS,