From 4bcb6023f1dce368ff28f31f2960b32d16ae77b6 Mon Sep 17 00:00:00 2001 From: Pablo Prieto Date: Thu, 6 Jun 2019 16:33:26 +0200 Subject: [PATCH] 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19148 Reviewed-by: Jason Lowe-Power Reviewed-by: Anthony Gutierrez Maintainer: Anthony Gutierrez Tested-by: kokoro --- src/mem/ruby/system/VIPERCoalescer.cc | 32 ++++++++++++++++++++------- 1 file 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 msg = std::make_shared( 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 msg = std::make_shared( 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 msg = std::make_shared( 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 msg = std::make_shared( 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++; } } -- 2.30.2