diff --git a/driver/opae/vlsim/opae_sim.cpp b/driver/opae/vlsim/opae_sim.cpp index 0b951357..0a4bae40 100644 --- a/driver/opae/vlsim/opae_sim.cpp +++ b/driver/opae/vlsim/opae_sim.cpp @@ -301,19 +301,9 @@ void opae_sim::avs_bus() { if (vortex_afu_->avs_read) { assert(0 == vortex_afu_->mem_bank_select); dram_rd_req_t dram_req; - dram_req.addr = vortex_afu_->avs_address; - ram_.read(vortex_afu_->avs_address * CACHE_BLOCK_SIZE, CACHE_BLOCK_SIZE, dram_req.block.data()); - - dram_req.cycles_left = DRAM_LATENCY; - for (auto& req : dram_reads_) { - if (req.addr == dram_req.addr) { - dram_req.cycles_left = req.cycles_left; - break; - } - } - + dram_req.cycles_left = DRAM_LATENCY; dram_reads_.emplace_back(dram_req); /*printf("%0ld: [sim] DRAM Rd Req: addr=%x, pending={", timestamp, dram_req.addr * CACHE_BLOCK_SIZE); for (auto& req : dram_reads_) { diff --git a/hw/simulate/simulator.cpp b/hw/simulate/simulator.cpp index 09a8e4c5..45fc9056 100644 --- a/hw/simulate/simulator.cpp +++ b/hw/simulate/simulator.cpp @@ -179,20 +179,10 @@ void Simulator::eval_dram_bus() { } } } else { - dram_req_t dram_req; - - dram_req.tag = vortex_->dram_req_tag; - dram_req.addr = vortex_->dram_req_addr; - + dram_req_t dram_req; + dram_req.tag = vortex_->dram_req_tag; ram_->read(vortex_->dram_req_addr * GLOBAL_BLOCK_SIZE, GLOBAL_BLOCK_SIZE, dram_req.block.data()); - dram_req.cycles_left = DRAM_LATENCY; - for (auto& req : dram_rsp_vec_) { - if (req.addr == dram_req.addr) { - dram_req.cycles_left = req.cycles_left; - break; - } - } dram_rsp_vec_.emplace_back(dram_req); } } diff --git a/hw/simulate/simulator.h b/hw/simulate/simulator.h index 0b683aea..a1613d98 100644 --- a/hw/simulate/simulator.h +++ b/hw/simulate/simulator.h @@ -52,7 +52,6 @@ private: int cycles_left; std::array block; uint32_t tag; - uint32_t addr; } dram_req_t; std::unordered_map print_bufs_;