From f4cbd9773aa057f226c28275b7fba5df5c03d14a Mon Sep 17 00:00:00 2001 From: Clo91eaf Date: Tue, 26 Nov 2024 15:48:36 +0800 Subject: [PATCH] [difftest] narrow burst memory check align to data width --- difftest/offline_t1emu/src/json_events.rs | 2 +- difftest/offline_t1rocketemu/src/json_events.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/difftest/offline_t1emu/src/json_events.rs b/difftest/offline_t1emu/src/json_events.rs index 9b9f0de26..9f8c3d4cd 100644 --- a/difftest/offline_t1emu/src/json_events.rs +++ b/difftest/offline_t1emu/src/json_events.rs @@ -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) { diff --git a/difftest/offline_t1rocketemu/src/json_events.rs b/difftest/offline_t1rocketemu/src/json_events.rs index b1a626ffe..bf25390c6 100644 --- a/difftest/offline_t1rocketemu/src/json_events.rs +++ b/difftest/offline_t1rocketemu/src/json_events.rs @@ -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) {