Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TB slink address alignment
Browse files Browse the repository at this point in the history
micprog committed Nov 15, 2023
1 parent d4b73a8 commit 9e60de6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions target/sim/src/vip_cheshire_soc.sv
Original file line number Diff line number Diff line change
@@ -803,7 +803,7 @@ module vip_cheshire_soc import cheshire_pkg::*; #(

// Load a binary
task automatic slink_elf_preload(input string binary, output doub_bt entry);
longint sec_addr, sec_len, bus_offset;
longint sec_addr, sec_len, bus_offset, write_addr;
$display("[SLINK] Preloading ELF binary: %s", binary);
if (read_elf(binary))
$fatal(1, "[SLINK] Failed to load ELF!");
@@ -833,8 +833,9 @@ module vip_cheshire_soc import cheshire_pkg::*; #(

beats.push_back(beat);
end
write_addr = sec_addr + (i==0 ? 0 : i - sec_addr%AxiStrbWidth);
// Write this burst
slink_write_beats(sec_addr + i, AxiStrbBits, beats);
slink_write_beats(write_addr, AxiStrbBits, beats);
end
end
void'(get_entry(entry));

0 comments on commit 9e60de6

Please sign in to comment.