From ef96d2065fab9fe0bfb07b3e000882eb2e970f3b Mon Sep 17 00:00:00 2001 From: aottaviano Date: Wed, 26 Jul 2023 08:53:32 +0200 Subject: [PATCH] tb: Add preload mode for OT-driven code execution for CVA6 --- tb/carfield_tb.sv | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tb/carfield_tb.sv b/tb/carfield_tb.sv index 5b032311..cd185c44 100644 --- a/tb/carfield_tb.sv +++ b/tb/carfield_tb.sv @@ -35,6 +35,7 @@ module tb_carfield_soc; // security island string secd_preload_elf; + logic [63:0] unused; // Cheshire standalone binary execution initial begin @@ -77,6 +78,12 @@ module tb_carfield_soc; fix.chs_vip.slink_wait_for_eoc(exit_code); end 2: begin // Standalone UART passive preload fix.chs_vip.uart_debug_elf_run_and_wait(chs_preload_elf, exit_code); + end 3: begin // Secure boot: Opentitan booting CVA6 + if (chs_preload_elf != "") begin + fix.chs_vip.slink_elf_preload(chs_preload_elf, unused); + fix.chs_vip.jtag_init(); + fix.chs_vip.jtag_wait_for_eoc(exit_code); + end end default: begin $fatal(1, "Unsupported preload mode %d (reserved)!", boot_mode); end