mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-06-28 17:43:24 -04:00
merge from master branch
This commit is contained in:
commit
e91eb4aed4
124 changed files with 1933 additions and 1718 deletions
|
@ -47,8 +47,10 @@ ProcessorImpl::ProcessorImpl(const Arch& arch)
|
|||
);
|
||||
|
||||
// connect L3 memory ports
|
||||
l3cache_->MemReqPort.bind(&memsim_->MemReqPort);
|
||||
memsim_->MemRspPort.bind(&l3cache_->MemRspPort);
|
||||
for (uint32_t i = 0; i < NUM_MEM_PORTS; ++i) {
|
||||
l3cache_->MemReqPorts.at(i).bind(&memsim_->MemReqPorts.at(i));
|
||||
memsim_->MemRspPorts.at(i).bind(&l3cache_->MemRspPorts.at(i));
|
||||
}
|
||||
|
||||
// create clusters
|
||||
for (uint32_t i = 0; i < arch.num_clusters(); ++i) {
|
||||
|
@ -59,16 +61,18 @@ ProcessorImpl::ProcessorImpl(const Arch& arch)
|
|||
}
|
||||
|
||||
// set up memory profiling
|
||||
memsim_->MemReqPort.tx_callback([&](const MemReq& req, uint64_t cycle){
|
||||
__unused (cycle);
|
||||
perf_mem_reads_ += !req.write;
|
||||
perf_mem_writes_ += req.write;
|
||||
perf_mem_pending_reads_ += !req.write;
|
||||
});
|
||||
memsim_->MemRspPort.tx_callback([&](const MemRsp&, uint64_t cycle){
|
||||
__unused (cycle);
|
||||
--perf_mem_pending_reads_;
|
||||
});
|
||||
for (uint32_t i = 0; i < NUM_MEM_PORTS; ++i) {
|
||||
memsim_->MemReqPorts.at(i).tx_callback([&](const MemReq& req, uint64_t cycle){
|
||||
__unused (cycle);
|
||||
perf_mem_reads_ += !req.write;
|
||||
perf_mem_writes_ += req.write;
|
||||
perf_mem_pending_reads_ += !req.write;
|
||||
});
|
||||
memsim_->MemRspPorts.at(i).tx_callback([&](const MemRsp&, uint64_t cycle){
|
||||
__unused (cycle);
|
||||
--perf_mem_pending_reads_;
|
||||
});
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
// dump device configuration
|
||||
|
@ -138,6 +142,7 @@ ProcessorImpl::PerfStats ProcessorImpl::perf_stats() const {
|
|||
perf.mem_writes = perf_mem_writes_;
|
||||
perf.mem_latency = perf_mem_latency_;
|
||||
perf.l3cache = l3cache_->perf_stats();
|
||||
perf.memsim = memsim_->perf_stats();
|
||||
return perf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue