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

[TB] Fast Preload of binary for fast debug #57

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 6 additions & 6 deletions target/sim/src/tb_chimera_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ module tb_chimera_soc

// Load a binary
task automatic force_write(doub_bt addr, doub_bt data);
static doub_bt write_address;
static doub_bt write_addr;
static doub_bt write_data;
write_address = addr;
write_data = data;
force fix.dut.i_memisland_domain.i_memory_island.i_memory_island.narrow_addr_i[1] = write_address;
write_addr = addr;
write_data = data;
force fix.dut.i_memisland_domain.i_memory_island.i_memory_island.narrow_addr_i[1] = write_addr;
arpansur marked this conversation as resolved.
Show resolved Hide resolved
force fix.dut.i_memisland_domain.i_memory_island.i_memory_island.narrow_req_i[1] = 1'b1;
force fix.dut.i_memisland_domain.i_memory_island.i_memory_island.narrow_we_i[1] = 1'b1;
force fix.dut.i_memisland_domain.i_memory_island.i_memory_island.narrow_wdata_i[1] = write_data;
Expand Down Expand Up @@ -115,11 +115,11 @@ module tb_chimera_soc
// Initialize JTAG
fix.vip.jtag_init();
// Halt the core
fix.vip.jtag_elf_halt();
fix.vip.jtag_halt_hart();
// Preload the binary through FAST PRELOAD
fast_elf_preload(preload_elf);
// Unhalt the core
fix.vip.jtag_elf_unhalt();
fix.vip.jtag_resume_hart();
// Wait for the end of computation
fix.vip.jtag_wait_for_eoc(exit_code);
end
Expand Down
4 changes: 2 additions & 2 deletions target/sim/src/vip_chimera_soc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ module vip_chimera_soc
endtask

// Halt the core
task automatic jtag_elf_halt();
task automatic jtag_halt_hart();
dm::dmstatus_t status;
// Halt hart 0
jtag_write(dm::DMControl, dm::dmcontrol_t'{haltreq: 1, dmactive: 1, default: '0});
Expand All @@ -321,7 +321,7 @@ module vip_chimera_soc
endtask

// Unhalt the core
task automatic jtag_elf_unhalt();
task automatic jtag_resume_hart();
doub_bt entry;
repeat (2) @(posedge jtag_tck);
void'(get_entry(entry));
Expand Down
Loading