From fd65ed95eb38196c5b1f06f7db92447a985aff51 Mon Sep 17 00:00:00 2001 From: Shinnung Jeong Date: Tue, 30 Jan 2024 20:45:47 -0500 Subject: [PATCH] fix bug to access memory address in simx --- sim/simx/exe_unit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sim/simx/exe_unit.cpp b/sim/simx/exe_unit.cpp index 4b5cb356..67834939 100644 --- a/sim/simx/exe_unit.cpp +++ b/sim/simx/exe_unit.cpp @@ -207,7 +207,7 @@ void LsuUnit::tick() { for (uint32_t t = 1; t < num_lanes_; ++t) { if (!trace->tmask.test(t0 + t)) continue; - auto mem_addr = trace_data->mem_addrs.at(t).addr & ~addr_mask; + auto mem_addr = trace_data->mem_addrs.at(t + t0).addr & ~addr_mask; matches += (addr0 == mem_addr); } #ifdef LSU_DUP_ENABLE @@ -229,7 +229,7 @@ void LsuUnit::tick() { continue; auto& dcache_req_port = core_->smem_demuxs_.at(t)->ReqIn; - auto mem_addr = trace_data->mem_addrs.at(t); + auto mem_addr = trace_data->mem_addrs.at(t + t0); auto type = core_->get_addr_type(mem_addr.addr); MemReq mem_req; @@ -324,4 +324,4 @@ void SfuUnit::tick() { break; // single block } ++input_idx_; -} \ No newline at end of file +}