Skip to content

Commit 25289a4

Browse files
committed
croc_vip: Ensure preloading supports byte granularity
1 parent f8d662b commit 25289a4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

rtl/test/croc_vip.sv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ module croc_vip #(
236236
// remove the byte from the line (2 numbers + 1 space)
237237
line = line.substr(3, line.len()-1);
238238

239+
// Pad the word with 0s if the line ended between word boundaries
240+
if (line.len() < 3) begin
241+
for (int unsigned cb = byte_count; cb < 4; cb++) begin
242+
data = {8'h00, data[31:8]};
243+
byte_count++;
244+
end
245+
end
246+
239247
// write a complete word via jtag
240248
if (byte_count == 4) begin
241249
jtag_write(dm::SBData0, data);

0 commit comments

Comments
 (0)