diff options
author | Pablo Prieto <pablo.prieto@unican.es> | 2019-06-06 16:33:26 +0200 |
---|---|---|
committer | Anthony Gutierrez <anthony.gutierrez@amd.com> | 2019-08-19 17:00:33 +0000 |
commit | 4bcb6023f1dce368ff28f31f2960b32d16ae77b6 (patch) | |
tree | 7dbb4c6546db2194c78a2d8e868266e764ee2c48 /src | |
parent | c7f18da6b04bb757bace18f22542c8078ba1b7b2 (diff) | |
download | gem5-4bcb6023f1dce368ff28f31f2960b32d16ae77b6.tar.xz |
mem-ruby, arch-hsail: Removed hit latency from VIPERCoalescer
Removed the dcache hit latency from VIPERCoalescer so HSAIL_X86
compiles after commit 496d5ed3e1f7dad42b0c2ebe0050d84621be8f99
Change-Id: I050a58d90f0f6356824c3c3bcb3f0b3c76d145e0
Signed-off-by: Pablo Prieto <pablo.prieto@unican.es>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19148
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/ruby/system/VIPERCoalescer.cc | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/mem/ruby/system/VIPERCoalescer.cc b/src/mem/ruby/system/VIPERCoalescer.cc index c332a557a..b7f2561ef 100644 --- a/src/mem/ruby/system/VIPERCoalescer.cc +++ b/src/mem/ruby/system/VIPERCoalescer.cc @@ -213,12 +213,16 @@ VIPERCoalescer::invL1() for (int i = 0; i < size; i++) { Addr addr = m_dataCache_ptr->getAddressAtIdx(i); // Evict Read-only data + RubyRequestType request_type = RubyRequestType_REPLACEMENT; std::shared_ptr<RubyRequest> msg = std::make_shared<RubyRequest>( clockEdge(), addr, (uint8_t*) 0, 0, 0, - RubyRequestType_REPLACEMENT, RubyAccessMode_Supervisor, + request_type, RubyAccessMode_Supervisor, nullptr); assert(m_mandatory_q_ptr != NULL); - m_mandatory_q_ptr->enqueue(msg, clockEdge(), m_data_cache_hit_latency); + Tick latency = cyclesToTicks( + m_controller->mandatoryQueueLatency(request_type)); + assert(latency > 0); + m_mandatory_q_ptr->enqueue(msg, clockEdge(), latency); m_outstanding_inv++; } DPRINTF(GPUCoalescer, @@ -240,12 +244,16 @@ VIPERCoalescer::wbL1() for (int i = 0; i < size; i++) { Addr addr = m_dataCache_ptr->getAddressAtIdx(i); // Write dirty data back + RubyRequestType request_type = RubyRequestType_FLUSH; std::shared_ptr<RubyRequest> msg = std::make_shared<RubyRequest>( clockEdge(), addr, (uint8_t*) 0, 0, 0, - RubyRequestType_FLUSH, RubyAccessMode_Supervisor, + request_type, RubyAccessMode_Supervisor, nullptr); assert(m_mandatory_q_ptr != NULL); - m_mandatory_q_ptr->enqueue(msg, clockEdge(), m_data_cache_hit_latency); + Tick latency = cyclesToTicks( + m_controller->mandatoryQueueLatency(request_type)); + assert(latency > 0); + m_mandatory_q_ptr->enqueue(msg, clockEdge(), latency); m_outstanding_wb++; } DPRINTF(GPUCoalescer, @@ -264,24 +272,32 @@ VIPERCoalescer::invwbL1() for (int i = 0; i < size; i++) { Addr addr = m_dataCache_ptr->getAddressAtIdx(i); // Evict Read-only data + RubyRequestType request_type = RubyRequestType_REPLACEMENT; std::shared_ptr<RubyRequest> msg = std::make_shared<RubyRequest>( clockEdge(), addr, (uint8_t*) 0, 0, 0, - RubyRequestType_REPLACEMENT, RubyAccessMode_Supervisor, + request_type, RubyAccessMode_Supervisor, nullptr); assert(m_mandatory_q_ptr != NULL); - m_mandatory_q_ptr->enqueue(msg, clockEdge(), m_data_cache_hit_latency); + Tick latency = cyclesToTicks( + m_controller->mandatoryQueueLatency(request_type)); + assert(latency > 0); + m_mandatory_q_ptr->enqueue(msg, clockEdge(), latency); m_outstanding_inv++; } // Walk the cache for (int i = 0; i< size; i++) { Addr addr = m_dataCache_ptr->getAddressAtIdx(i); // Write dirty data back + RubyRequestType request_type = RubyRequestType_FLUSH; std::shared_ptr<RubyRequest> msg = std::make_shared<RubyRequest>( clockEdge(), addr, (uint8_t*) 0, 0, 0, - RubyRequestType_FLUSH, RubyAccessMode_Supervisor, + request_type, RubyAccessMode_Supervisor, nullptr); assert(m_mandatory_q_ptr != NULL); - m_mandatory_q_ptr->enqueue(msg, clockEdge(), m_data_cache_hit_latency); + Tick latency = cyclesToTicks( + m_controller->mandatoryQueueLatency(request_type)); + assert(latency > 0); + m_mandatory_q_ptr->enqueue(msg, clockEdge(), latency); m_outstanding_wb++; } } |