minor update
This commit is contained in:
@@ -301,19 +301,9 @@ void opae_sim::avs_bus() {
|
|||||||
if (vortex_afu_->avs_read) {
|
if (vortex_afu_->avs_read) {
|
||||||
assert(0 == vortex_afu_->mem_bank_select);
|
assert(0 == vortex_afu_->mem_bank_select);
|
||||||
dram_rd_req_t dram_req;
|
dram_rd_req_t dram_req;
|
||||||
|
|
||||||
dram_req.addr = vortex_afu_->avs_address;
|
dram_req.addr = vortex_afu_->avs_address;
|
||||||
|
|
||||||
ram_.read(vortex_afu_->avs_address * CACHE_BLOCK_SIZE, CACHE_BLOCK_SIZE, dram_req.block.data());
|
ram_.read(vortex_afu_->avs_address * CACHE_BLOCK_SIZE, CACHE_BLOCK_SIZE, dram_req.block.data());
|
||||||
|
|
||||||
dram_req.cycles_left = DRAM_LATENCY;
|
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_reads_.emplace_back(dram_req);
|
dram_reads_.emplace_back(dram_req);
|
||||||
/*printf("%0ld: [sim] DRAM Rd Req: addr=%x, pending={", timestamp, dram_req.addr * CACHE_BLOCK_SIZE);
|
/*printf("%0ld: [sim] DRAM Rd Req: addr=%x, pending={", timestamp, dram_req.addr * CACHE_BLOCK_SIZE);
|
||||||
for (auto& req : dram_reads_) {
|
for (auto& req : dram_reads_) {
|
||||||
|
|||||||
@@ -180,19 +180,9 @@ void Simulator::eval_dram_bus() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dram_req_t dram_req;
|
dram_req_t dram_req;
|
||||||
|
|
||||||
dram_req.tag = vortex_->dram_req_tag;
|
dram_req.tag = vortex_->dram_req_tag;
|
||||||
dram_req.addr = vortex_->dram_req_addr;
|
|
||||||
|
|
||||||
ram_->read(vortex_->dram_req_addr * GLOBAL_BLOCK_SIZE, GLOBAL_BLOCK_SIZE, dram_req.block.data());
|
ram_->read(vortex_->dram_req_addr * GLOBAL_BLOCK_SIZE, GLOBAL_BLOCK_SIZE, dram_req.block.data());
|
||||||
|
|
||||||
dram_req.cycles_left = DRAM_LATENCY;
|
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);
|
dram_rsp_vec_.emplace_back(dram_req);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ private:
|
|||||||
int cycles_left;
|
int cycles_left;
|
||||||
std::array<uint8_t, GLOBAL_BLOCK_SIZE> block;
|
std::array<uint8_t, GLOBAL_BLOCK_SIZE> block;
|
||||||
uint32_t tag;
|
uint32_t tag;
|
||||||
uint32_t addr;
|
|
||||||
} dram_req_t;
|
} dram_req_t;
|
||||||
|
|
||||||
std::unordered_map<int, std::stringstream> print_bufs_;
|
std::unordered_map<int, std::stringstream> print_bufs_;
|
||||||
|
|||||||
Reference in New Issue
Block a user