Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PULP cluster testbench and parameters. #54

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sw/include/car_properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

#define IntClustNumCores 12
#define IntClustNumCores 8
26 changes: 15 additions & 11 deletions target/sim/src/astral_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ module tb_astral;
// Useful register addresses
localparam int unsigned CarL2StartAddr = carfield_configuration::L2Port0Base;
localparam int unsigned CarDramStartAddr = 32'h8000_0000;
localparam int unsigned PulpdNumCores = 12;
localparam int unsigned PulpdBootAddrL2 = CarL2StartAddr + 32'h8080;
localparam int unsigned PulpdBootAddrDram = CarDramStartAddr + 32'h8080;
localparam int unsigned PulpdBootAddr = carfield_configuration::PulpClusterBase + 32'h00200040;
Expand Down Expand Up @@ -387,27 +386,32 @@ module tb_astral;
fix.configure_sl_pad(jtag_check_write);

-> pad_configured;
$display("[TB] %t - Enabling PULP cluster clock for stand-alone tests ", $realtime);
// Clock island after PoR
fix.chs_vip.slink_write_32(CarSocCtrlPulpdClkEnRegAddr, 32'h1);
$display("[TB] %t - De-isolate PULP cluster for stand-alone tests ", $realtime);
// De-isolate island after PoR
fix.chs_vip.slink_write_32(CarSocCtrlPulpdIsolateRegAddr, 32'h0);
end else begin: pulpd_jtag_init
$display("[JTAG PULPD] Init ");
fix.chs_vip.jtag_init();
$display("[TB] %t - Enabling PULP cluster clock for stand-alone tests ", $realtime);
// Clock island after PoR
fix.chs_vip.jtag_write_reg32(CarSocCtrlPulpdClkEnRegAddr, 32'h1, jtag_check_write);
$display("[TB] %t - De-isolate PULP cluster for stand-alone tests ", $realtime);
// De-isolate island after PoR
fix.chs_vip.jtag_write_reg32(CarSocCtrlPulpdIsolateRegAddr, 32'h0, jtag_check_write);
end

$display("[TB] %t - Enabling PULP cluster clock for stand-alone tests ", $realtime);
// Clock island after PoR
fix.chs_vip.slink_write_32(CarSocCtrlPulpdClkEnRegAddr, 32'h1);
$display("[TB] %t - De-isolate PULP cluster for stand-alone tests ", $realtime);
// De-isolate island after PoR
fix.chs_vip.slink_write_32(CarSocCtrlPulpdIsolateRegAddr, 32'h0);

case (pulpd_boot_mode)
0: begin
$display("[JTAG PULPD] Halt the core and load the binary to L2 ");
fix.chs_vip.jtag_elf_halt_load(pulpd_preload_elf, pulpd_binary_entry );
fix.chs_vip.jtag_elf_preload(pulpd_preload_elf, pulpd_binary_entry );

// boot
// Write bootaddress to each core
$display("[JTAG PULPD] Write PULP cluster boot address for each core");
for (int c = 0; c < PulpdNumCores; c++) begin
for (int c = 0; c < carfield_pkg::IntClusterNumCores; c++) begin
fix.chs_vip.jtag_write_reg32(PulpdBootAddr + c*32'h4, PulpdBootAddrL2, jtag_check_write);
end
// Write boot enable
Expand All @@ -432,7 +436,7 @@ module tb_astral;
// boot
// Write bootaddress to each core
$display("[SLINK PULPD] Write PULP cluster boot address for each core");
for (int c = 0; c < PulpdNumCores; c++) begin
for (int c = 0; c < carfield_pkg::IntClusterNumCores; c++) begin
fix.chs_vip.slink_write_32(PulpdBootAddr + c*32'h4, PulpdBootAddrL2);
end
// Write boot enable
Expand Down
Loading