Skip to content

Commit

Permalink
target/sim: Fix serial link address alignment (#87)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Rogenmoser <[email protected]>
  • Loading branch information
alex96295 and micprog authored Nov 22, 2023
1 parent 75d4bfd commit e62a97e
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
Expand Up @@ -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!");
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit e62a97e

Please sign in to comment.