Skip to content

Commit

Permalink
[difftest] narrow burst memory check align to data width
Browse files Browse the repository at this point in the history
  • Loading branch information
Clo91eaf authored and FanShupei committed Nov 26, 2024
1 parent 03ba384 commit f4cbd97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion difftest/offline_t1emu/src/json_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl JsonEventRunner for SpikeRunner {
let data = memory_write.data.to_owned();
let mask = memory_write.mask.to_owned();
let cycle = memory_write.cycle;
let base_addr = memory_write.address;
let base_addr = memory_write.address & !((32 / 8) - 1); // align to data width
let lsu_idx = memory_write.lsu_idx;

if let Some(se) = self.commit_queue.iter_mut().find(|se| se.lsu_idx == lsu_idx) {
Expand Down
2 changes: 1 addition & 1 deletion difftest/offline_t1rocketemu/src/json_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ impl JsonEventRunner for SpikeRunner {
let data = memory_write.data.to_owned();
let mask = memory_write.mask.to_owned();
let cycle = memory_write.cycle;
let base_addr = memory_write.address;
let base_addr = memory_write.address & !((32 / 8) - 1); // align to data width
let lsu_idx = memory_write.lsu_idx;

if let Some(se) = self.commit_queue.iter_mut().find(|se| se.lsu_idx == lsu_idx) {
Expand Down

0 comments on commit f4cbd97

Please sign in to comment.