diff --git a/hw/top/BUILD b/hw/top/BUILD index 1362a8767a07c..ae947eb460c22 100644 --- a/hw/top/BUILD +++ b/hw/top/BUILD @@ -98,3 +98,19 @@ alias_ip_sw( englishbreakfast = "//hw/top_englishbreakfast/ip/pinmux/data/autogen:pinmux", earlgrey = "//hw/top_earlgrey/ip/pinmux/data/autogen:pinmux", ) + +# FIXME This alias will eventually disappear when we move away from execution environments +# as they are currently used. For the moment this is necessary. +EXEC_ENVS = [ + "sim_verilator_base", + "sim_verilator", +] + +[ + alias_top( + name = exec_env, + earlgrey = "//hw/top_earlgrey:{}".format(exec_env), + englishbreakfast = "//hw/top_englishbreakfast:{}".format(exec_env), + ) + for exec_env in EXEC_ENVS +] diff --git a/hw/top_englishbreakfast/BUILD b/hw/top_englishbreakfast/BUILD index 3b28b5434ae1b..3f068a5a9eb61 100644 --- a/hw/top_englishbreakfast/BUILD +++ b/hw/top_englishbreakfast/BUILD @@ -116,3 +116,31 @@ sim_verilator( rom_scramble_config = "//hw/top_englishbreakfast/data:autogen/top_englishbreakfast.gen.hjson", test_cmd = "testing-not-supported", ) + +sim_verilator( + name = "sim_verilator", + testonly = True, + args = [ + "--rcfile=", + "--logging=info", + "--interface=verilator", + "--verilator-bin=$(rootpath //hw:verilator)", + "--verilator-rom={rom}", + "--verilator-flash={firmware}", + ], + base = ":sim_verilator_base", + data = [ + "//hw:fusesoc_ignore", + "//hw:verilator", + ], + exec_env = "sim_verilator", + param = { + "exit_success": DEFAULT_TEST_SUCCESS_MSG, + "exit_failure": DEFAULT_TEST_FAILURE_MSG, + }, + rom = "//sw/device/lib/testing/test_rom:test_rom", + test_cmd = """ + --exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'" + no-op + """, +) diff --git a/sw/device/lib/testing/test_rom/BUILD b/sw/device/lib/testing/test_rom/BUILD index 8c660353be038..cc68ea3ba9ed1 100644 --- a/sw/device/lib/testing/test_rom/BUILD +++ b/sw/device/lib/testing/test_rom/BUILD @@ -32,11 +32,8 @@ opentitan_binary( "//hw/top_earlgrey:fpga_cw305", "//hw/top_earlgrey:fpga_cw340", "//hw/top_earlgrey:sim_dv_base", - ] + - select({ - "//sw/device:is_english_breakfast": ["//hw/top_englishbreakfast:sim_verilator_base"], - "//conditions:default": ["//hw/top_earlgrey:sim_verilator_base"], - }), + "//hw/top:sim_verilator_base", + ], kind = "rom", linker_script = ":linker_script", deps = [ @@ -202,7 +199,7 @@ opentitan_test( exec_env = { "//hw/top_earlgrey:fpga_cw310_test_rom": None, "//hw/top_earlgrey:sim_dv": None, - "//hw/top_earlgrey:sim_verilator": None, + "//hw/top:sim_verilator": None, }, deps = [ "//sw/device/lib/testing/test_framework:ottf_main",