Hello Tony Gutierrez,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/29939
to review the following change.
Change subject: mem-ruby: Add support for MemSync reqs in VIPER
......................................................................
mem-ruby: Add support for MemSync reqs in VIPER
Change-Id: Ib129e82be5348c641a8ae18093324bcedfb38abe
---
M src/mem/ruby/system/GPUCoalescer.cc
M src/mem/ruby/system/GPUCoalescer.hh
M src/mem/ruby/system/RubyPort.cc
M src/mem/ruby/system/VIPERCoalescer.cc
M src/mem/ruby/system/VIPERCoalescer.hh
5 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/src/mem/ruby/system/GPUCoalescer.cc
b/src/mem/ruby/system/GPUCoalescer.cc
index d9793fa..80bc19a 100644
--- a/src/mem/ruby/system/GPUCoalescer.cc
+++ b/src/mem/ruby/system/GPUCoalescer.cc
@@ -553,24 +553,25 @@
assert(pkt->req->hasInstSeqNum());
if (pkt->cmd == MemCmd::MemSyncReq) {
- // let the child coalescer handle MemSyncReq because this is
- // cache coherence protocol specific
- return RequestStatus_Issued;
- }
- // otherwise, this must be either read or write command
- assert(pkt->isRead() || pkt->isWrite());
+ // issue mem_sync requests immediately to the cache system without
+ // going through uncoalescedTable like normal LD/ST/Atomic requests
+ issueMemSyncRequest(pkt);
+ } else {
+ // otherwise, this must be either read or write command
+ assert(pkt->isRead() || pkt->isWrite());
- // the pkt is temporarily stored in the uncoalesced table until
- // it's picked for coalescing process later in this cycle or in a
- // future cycle
- uncoalescedTable.insertPacket(pkt);
- DPRINTF(GPUCoalescer, "Put pkt with addr 0x%X to uncoalescedTable\n",
- pkt->getAddr());
+ // the pkt is temporarily stored in the uncoalesced table until
+ // it's picked for coalescing process later in this cycle or in a
+ // future cycle
+ uncoalescedTable.insertPacket(pkt);
+ DPRINTF(GPUCoalescer, "Put pkt with addr 0x%X to
uncoalescedTable\n",
+ pkt->getAddr());
- // we schedule an issue event here to process the uncoalesced table
- // and try to issue Ruby request to cache system
- if (!issueEvent.scheduled()) {
- schedule(issueEvent, curTick());
+ // we schedule an issue event here to process the uncoalesced table
+ // and try to issue Ruby request to cache system
+ if (!issueEvent.scheduled()) {
+ schedule(issueEvent, curTick());
+ }
}
// we always return RequestStatus_Issued in this coalescer
diff --git a/src/mem/ruby/system/GPUCoalescer.hh
b/src/mem/ruby/system/GPUCoalescer.hh
index fc52d61..8498acb 100644
--- a/src/mem/ruby/system/GPUCoalescer.hh
+++ b/src/mem/ruby/system/GPUCoalescer.hh
@@ -367,7 +367,7 @@
// since the two following issue functions are protocol-specific,
// they must be implemented in a derived coalescer
virtual void issueRequest(CoalescedRequest* crequest) = 0;
-// virtual void issueMemSyncRequest(PacketPtr pkt) = 0;
+ virtual void issueMemSyncRequest(PacketPtr pkt) = 0;
void kernelCallback(int wavefront_id);
diff --git a/src/mem/ruby/system/RubyPort.cc
b/src/mem/ruby/system/RubyPort.cc
index 92fed81..331452e 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -251,7 +251,7 @@
}
// Check for pio requests and directly send them to the dedicated
// pio port.
- if (pkt->cmd != MemCmd::MemFenceReq) {
+ if (pkt->cmd != MemCmd::MemSyncReq) {
if (!isPhysMemAddress(pkt->getAddr())) {
assert(ruby_port->memMasterPort.isConnected());
DPRINTF(RubyPort, "Request address %#x assumed to be a "
@@ -312,7 +312,7 @@
// Check for pio requests and directly send them to the dedicated
// pio port.
- if (pkt->cmd != MemCmd::MemFenceReq) {
+ if (pkt->cmd != MemCmd::MemSyncReq) {
if (!isPhysMemAddress(pkt->getAddr())) {
assert(ruby_port->memMasterPort.isConnected());
DPRINTF(RubyPort, "Request address %#x assumed to be a "
@@ -539,7 +539,7 @@
}
// Flush, acquire, release requests don't access physical memory
- if (pkt->isFlush() || pkt->cmd == MemCmd::MemFenceReq) {
+ if (pkt->isFlush() || pkt->cmd == MemCmd::MemSyncReq) {
accessPhysMem = false;
}
diff --git a/src/mem/ruby/system/VIPERCoalescer.cc
b/src/mem/ruby/system/VIPERCoalescer.cc
index eafce6d..1a08fb5 100644
--- a/src/mem/ruby/system/VIPERCoalescer.cc
+++ b/src/mem/ruby/system/VIPERCoalescer.cc
@@ -264,6 +264,11 @@
}
void
+VIPERCoalescer::issueMemSyncRequest(PacketPtr pkt)
+{
+}
+
+void
VIPERCoalescer::invTCPCallback(Addr addr)
{
assert(m_cache_inv_pkt && m_num_pending_invs > 0);
diff --git a/src/mem/ruby/system/VIPERCoalescer.hh
b/src/mem/ruby/system/VIPERCoalescer.hh
index 59420e0..0c139a0 100644
--- a/src/mem/ruby/system/VIPERCoalescer.hh
+++ b/src/mem/ruby/system/VIPERCoalescer.hh
@@ -61,6 +61,7 @@
void invTCPCallback(Addr address);
RequestStatus makeRequest(PacketPtr pkt);
void issueRequest(CoalescedRequest* crequest);
+ void issueMemSyncRequest(PacketPtr pkt) override;
private:
void invTCP();
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/29939
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib129e82be5348c641a8ae18093324bcedfb38abe
Gerrit-Change-Number: 29939
Gerrit-PatchSet: 1
Gerrit-Owner: Anthony Gutierrez <[email protected]>
Gerrit-Reviewer: Tony Gutierrez <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s