Skip to content

Commit

Permalink
Reordering PULP cluster testbench more logically.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Tortorella committed Aug 31, 2024
1 parent 8dae911 commit 6992be8
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions target/sim/src/astral_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -371,29 +371,28 @@ module tb_astral;
if (!$value$plusargs("PULPD_BINARY=%s", pulpd_preload_elf)) pulpd_preload_elf = "";
if (!$value$plusargs("HYP_USER_PRELOAD=%s", hyp_user_preload)) hyp_user_preload = 0;

// Wait for system reset from Cheshire VIP
fix.chs_vip.wait_for_reset();
if (pulpd_preload_elf != "") begin

// Wait for FLL lock
fix.wait_fll_lock();
// Wait for system reset from Cheshire VIP
fix.chs_vip.wait_for_reset();

// Configure padframe for Serial Link usage depending
// on the selected preload-mode
if (pulpd_boot_mode == 1) begin: gen_pulpd_slink_cfg
// Configure Serial link padframe
fix.configure_sl_pad(jtag_check_write);
// PLL bypass
fix.set_bypass_pll(bypass_pll);

-> pad_configured;
end else begin: pulpd_jtag_init
$display("[JTAG PULPD] Init ");
fix.chs_vip.jtag_init();
end
// Wait for FLL lock
fix.wait_fll_lock();

// PLL bypass
fix.set_bypass_pll(bypass_pll);
$display("0");
// Configure padframe for Serial Link usage depending
// on the selected preload-mode
if (pulpd_boot_mode == 1) begin: gen_pulpd_slink_cfg
// Configure Serial link padframe
fix.configure_sl_pad(jtag_check_write);

if (pulpd_preload_elf != "") begin
-> pad_configured;
end else begin: pulpd_jtag_init
$display("[JTAG PULPD] Init ");
fix.chs_vip.jtag_init();
end

$display("[TB] %t - Enabling PULP cluster clock for stand-alone tests ", $realtime);
// Clock island after PoR
Expand Down Expand Up @@ -458,7 +457,7 @@ module tb_astral;

$finish;
end else begin
$error("[PULP TB] No binary preloaded.");
$display("[PULP TB] No binary preloaded.");
end

// Fast preload of hyperram
Expand Down

0 comments on commit 6992be8

Please sign in to comment.