Skip to content

Commit

Permalink
tb: Simplify safety island tb snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
alex96295 committed Oct 11, 2023
1 parent 5f18581 commit 474ce53
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions tb/carfield_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -170,21 +170,18 @@ module tb_carfield_soc;
// set secure boot mode
fix.set_secure_boot(secure_boot);

if (safed_preload_elf != "") begin
// set boot mode before reset
fix.safed_vip.set_safed_boot_mode(safed_boot_mode);

// set boot mode before reset
case (safed_boot_mode)
0: begin
fix.safed_vip.set_safed_boot_mode(safety_island_pkg::Jtag);
end 1: begin
fix.safed_vip.set_safed_boot_mode(safety_island_pkg::Preloaded);
end default: begin
$fatal(1, "Unsupported boot mode %d (reserved)!", safed_boot_mode);
end
endcase
if (safed_preload_elf != "") begin

fix.safed_vip.safed_wait_for_reset();

// Writing max burst length in Hyperbus configuration registers to
// prevent the Verification IPs from triggering timing checks.
$display("[TB] INFO: Configuring Hyperbus through serial link.");
fix.safed_vip.axi_write_32(HyperbusTburstMax, 32'd128);

$display("[TB] %t - Enabling safety island clock for stand-alone tests ", $realtime);
// Clock island after PoR
fix.safed_vip.axi_write_32(SafetyIslandClkEnRegAddr, 32'h1);
Expand Down

0 comments on commit 474ce53

Please sign in to comment.