Kovacsics Róbert has uploaded this change for review. ( https://gem5-review.googlesource.com/11810

Change subject: Rename Packet::checkFunctional to doFunctional (+rename callees)
......................................................................

Rename Packet::checkFunctional to doFunctional (+rename callees)

Packet::checkFunctional also wrote data to/from the packet depending
on if it was read/write, respectively, which the 'check' in the name
would suggest otherwise. This renames it to doFunctional, which is
more suggestive. It also renames any function called checkFunctional
which calls Packet::checkFunctional. These are

- Bridge::BridgeMasterPort::checkFunctional
  - calls Packet::checkFunctional
- MSHR::checkFunctional
  - calls Packet::checkFunctional
- MSHR::TargetList::checkFunctional
  - calls Packet::checkFunctional
- Queue<>::checkFunctional
  (of src/mem/cache/queue.hh, not src/cpu/minor/buffers.h)
  - Instantiated with Queue<WriteQueueEntry> and Queue<MSHR>
- WriteQueueEntry
  - calls Packet::checkFunctional
- WriteQueueEntry::TargetList
  - calls Packet::checkFunctional
- MemDelay::checkFunctional
  - calls QueuedSlavePort/QueuedMasterPort::checkFunctional
- Packet::checkFunctional
- PacketQueue::checkFunctional
  - calls Packet::checkFunctional
- QueuedSlavePort::checkFunctional
  - calls PacketQueue::doFunctional
- QueuedMasterPort::checkFunctional
  - calls PacketQueue::doFunctional
- SerialLink::SerialLinkMasterPort::checkFunctional
  - calls Packet::doFunctional

Change-Id: Ieca2579c020c329040da053ba8e25820801b62c5
---
M src/mem/bridge.cc
M src/mem/bridge.hh
M src/mem/cache/base.cc
M src/mem/cache/mshr.cc
M src/mem/cache/mshr.hh
M src/mem/cache/queue.hh
M src/mem/cache/write_queue_entry.cc
M src/mem/cache/write_queue_entry.hh
M src/mem/coherent_xbar.cc
M src/mem/dram_ctrl.cc
M src/mem/dramsim2.cc
M src/mem/mem_delay.cc
M src/mem/mem_delay.hh
M src/mem/noncoherent_xbar.cc
M src/mem/packet.cc
M src/mem/packet.hh
M src/mem/packet_queue.cc
M src/mem/packet_queue.hh
M src/mem/qport.hh
M src/mem/ruby/slicc_interface/AbstractController.cc
M src/mem/serial_link.cc
M src/mem/serial_link.hh
M src/mem/simple_mem.cc
M src/mem/tport.cc
24 files changed, 61 insertions(+), 61 deletions(-)



diff --git a/src/mem/bridge.cc b/src/mem/bridge.cc
index 0c9e2c1..8e408d1 100644
--- a/src/mem/bridge.cc
+++ b/src/mem/bridge.cc
@@ -361,14 +361,14 @@

     // check the response queue
     for (auto i = transmitList.begin();  i != transmitList.end(); ++i) {
-        if (pkt->checkFunctional((*i).pkt)) {
+        if (pkt->doFunctional((*i).pkt)) {
             pkt->makeResponse();
             return;
         }
     }

     // also check the master port's request queue
-    if (masterPort.checkFunctional(pkt)) {
+    if (masterPort.doFunctional(pkt)) {
         return;
     }

@@ -379,13 +379,13 @@
 }

 bool
-Bridge::BridgeMasterPort::checkFunctional(PacketPtr pkt)
+Bridge::BridgeMasterPort::doFunctional(PacketPtr pkt)
 {
     bool found = false;
     auto i = transmitList.begin();

     while (i != transmitList.end() && !found) {
-        if (pkt->checkFunctional((*i).pkt)) {
+        if (pkt->doFunctional((*i).pkt)) {
             pkt->makeResponse();
             found = true;
         }
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh
index f2cc445..095f62d 100644
--- a/src/mem/bridge.hh
+++ b/src/mem/bridge.hh
@@ -295,7 +295,7 @@
          *
          * @return true if we find a match
          */
-        bool checkFunctional(PacketPtr pkt);
+        bool doFunctional(PacketPtr pkt);

       protected:

diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index c1ebdd6..ba117b9 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -664,7 +664,7 @@

     // see if we have data at all (owned or otherwise)
     bool have_data = blk && blk->isValid()
-        && pkt->checkFunctional(&cbpw, blk_addr, is_secure, blkSize,
+        && pkt->doFunctional(&cbpw, blk_addr, is_secure, blkSize,
                                 blk->data);

     // data we have is dirty if marked as such or if we have an
@@ -674,10 +674,10 @@
(mshr && mshr->inService && mshr->isPendingModified()));

     bool done = have_dirty ||
-        cpuSidePort.checkFunctional(pkt) ||
-        mshrQueue.checkFunctional(pkt, blk_addr) ||
-        writeBuffer.checkFunctional(pkt, blk_addr) ||
-        memSidePort.checkFunctional(pkt);
+        cpuSidePort.doFunctional(pkt) ||
+        mshrQueue.doFunctional(pkt, blk_addr) ||
+        writeBuffer.doFunctional(pkt, blk_addr) ||
+        memSidePort.doFunctional(pkt);

     DPRINTF(CacheVerbose, "%s: %s %s%s%s\n", __func__,  pkt->print(),
             (blk && blk->isValid()) ? "valid " : "",
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index 8629b33..2826e78 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -207,10 +207,10 @@


 bool
-MSHR::TargetList::checkFunctional(PacketPtr pkt)
+MSHR::TargetList::doFunctional(PacketPtr pkt)
 {
     for (auto& t : *this) {
-        if (pkt->checkFunctional(t.pkt)) {
+        if (pkt->doFunctional(t.pkt)) {
             return true;
         }
     }
@@ -618,17 +618,17 @@


 bool
-MSHR::checkFunctional(PacketPtr pkt)
+MSHR::doFunctional(PacketPtr pkt)
 {
     // For printing, we treat the MSHR as a whole as single entity.
     // For other requests, we iterate over the individual targets
     // since that's where the actual data lies.
     if (pkt->isPrint()) {
-        pkt->checkFunctional(this, blkAddr, isSecure, blkSize, nullptr);
+        pkt->doFunctional(this, blkAddr, isSecure, blkSize, nullptr);
         return false;
     } else {
-        return (targets.checkFunctional(pkt) ||
-                deferredTargets.checkFunctional(pkt));
+        return (targets.doFunctional(pkt) ||
+                deferredTargets.doFunctional(pkt));
     }
 }

diff --git a/src/mem/cache/mshr.hh b/src/mem/cache/mshr.hh
index 050dbd1..6c97b85 100644
--- a/src/mem/cache/mshr.hh
+++ b/src/mem/cache/mshr.hh
@@ -235,7 +235,7 @@

         void clearDownstreamPending();
         void clearDownstreamPending(iterator begin, iterator end);
-        bool checkFunctional(PacketPtr pkt);
+        bool doFunctional(PacketPtr pkt);
         void print(std::ostream &os, int verbosity,
                    const std::string &prefix) const;
     };
@@ -414,7 +414,7 @@
      */
     void promoteWritable();

-    bool checkFunctional(PacketPtr pkt);
+    bool doFunctional(PacketPtr pkt);

     /**
      * Prints the contents of this MSHR for debugging.
diff --git a/src/mem/cache/queue.hh b/src/mem/cache/queue.hh
index 8e5ccf1..bd66bff 100644
--- a/src/mem/cache/queue.hh
+++ b/src/mem/cache/queue.hh
@@ -177,11 +177,11 @@
         return nullptr;
     }

-    bool checkFunctional(PacketPtr pkt, Addr blk_addr)
+    bool doFunctional(PacketPtr pkt, Addr blk_addr)
     {
         pkt->pushLabel(label);
         for (const auto& entry : allocatedList) {
- if (entry->blkAddr == blk_addr && entry->checkFunctional(pkt)) {
+            if (entry->blkAddr == blk_addr && entry->doFunctional(pkt)) {
                 pkt->popLabel();
                 return true;
             }
diff --git a/src/mem/cache/write_queue_entry.cc b/src/mem/cache/write_queue_entry.cc
index e393731..cc1e503 100644
--- a/src/mem/cache/write_queue_entry.cc
+++ b/src/mem/cache/write_queue_entry.cc
@@ -66,10 +66,10 @@
 }

 bool
-WriteQueueEntry::TargetList::checkFunctional(PacketPtr pkt)
+WriteQueueEntry::TargetList::doFunctional(PacketPtr pkt)
 {
     for (auto& t : *this) {
-        if (pkt->checkFunctional(t.pkt)) {
+        if (pkt->doFunctional(t.pkt)) {
             return true;
         }
     }
@@ -122,16 +122,16 @@
 }

 bool
-WriteQueueEntry::checkFunctional(PacketPtr pkt)
+WriteQueueEntry::doFunctional(PacketPtr pkt)
 {
     // For printing, we treat the WriteQueueEntry as a whole as single
     // entity. For other requests, we iterate over the individual
     // targets since that's where the actual data lies.
     if (pkt->isPrint()) {
-        pkt->checkFunctional(this, blkAddr, isSecure, blkSize, nullptr);
+        pkt->doFunctional(this, blkAddr, isSecure, blkSize, nullptr);
         return false;
     } else {
-        return targets.checkFunctional(pkt);
+        return targets.doFunctional(pkt);
     }
 }

diff --git a/src/mem/cache/write_queue_entry.hh b/src/mem/cache/write_queue_entry.hh
index 5a4b5a8..bea056a 100644
--- a/src/mem/cache/write_queue_entry.hh
+++ b/src/mem/cache/write_queue_entry.hh
@@ -97,7 +97,7 @@

         TargetList() {}
         void add(PacketPtr pkt, Tick readyTime, Counter order);
-        bool checkFunctional(PacketPtr pkt);
+        bool doFunctional(PacketPtr pkt);
         void print(std::ostream &os, int verbosity,
                    const std::string &prefix) const;
     };
@@ -179,7 +179,7 @@
         targets.pop_front();
     }

-    bool checkFunctional(PacketPtr pkt);
+    bool doFunctional(PacketPtr pkt);

     /**
      * Prints the contents of this MSHR for debugging.
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc
index d46f389..2fcb30e 100644
--- a/src/mem/coherent_xbar.cc
+++ b/src/mem/coherent_xbar.cc
@@ -1002,7 +1002,7 @@
             // if we find a response that has the data, then the
// downstream caches/memories may be out of date, so simply stop
             // here
-            if (p->checkFunctional(pkt)) {
+            if (p->doFunctional(pkt)) {
                 if (pkt->needsResponse())
                     pkt->makeResponse();
                 return;
@@ -1025,7 +1025,7 @@
     }

     for (const auto& p : slavePorts) {
-        if (p->checkFunctional(pkt)) {
+        if (p->doFunctional(pkt)) {
             if (pkt->needsResponse())
                 pkt->makeResponse();
             return;
diff --git a/src/mem/dram_ctrl.cc b/src/mem/dram_ctrl.cc
index 1a3eec4..e675ffc 100644
--- a/src/mem/dram_ctrl.cc
+++ b/src/mem/dram_ctrl.cc
@@ -2745,7 +2745,7 @@
 {
     pkt->pushLabel(memory.name());

-    if (!queue.checkFunctional(pkt)) {
+    if (!queue.doFunctional(pkt)) {
         // Default implementation of SimpleTimingPort::recvFunctional()
         // calls recvAtomic() and throws away the latency; we can save a
         // little here by just not calculating the latency.
diff --git a/src/mem/dramsim2.cc b/src/mem/dramsim2.cc
index b900d4d..c057569 100644
--- a/src/mem/dramsim2.cc
+++ b/src/mem/dramsim2.cc
@@ -169,7 +169,7 @@

     // potentially update the packets in our response queue as well
     for (auto i = responseQueue.begin(); i != responseQueue.end(); ++i)
-        pkt->checkFunctional(*i);
+        pkt->doFunctional(*i);

     pkt->popLabel();
 }
diff --git a/src/mem/mem_delay.cc b/src/mem/mem_delay.cc
index 4a682f3..9f5e16d 100644
--- a/src/mem/mem_delay.cc
+++ b/src/mem/mem_delay.cc
@@ -81,10 +81,10 @@
 }

 bool
-MemDelay::checkFunctional(PacketPtr pkt)
+MemDelay::doFunctional(PacketPtr pkt)
 {
-    return slavePort.checkFunctional(pkt) ||
-        masterPort.checkFunctional(pkt);
+    return slavePort.doFunctional(pkt) ||
+        masterPort.doFunctional(pkt);
 }

MemDelay::MasterPort::MasterPort(const std::string &_name, MemDelay &_parent)
@@ -107,7 +107,7 @@
 void
 MemDelay::MasterPort::recvFunctionalSnoop(PacketPtr pkt)
 {
-    if (parent.checkFunctional(pkt)) {
+    if (parent.doFunctional(pkt)) {
         pkt->makeResponse();
     } else {
         parent.slavePort.sendFunctionalSnoop(pkt);
@@ -156,7 +156,7 @@
 void
 MemDelay::SlavePort::recvFunctional(PacketPtr pkt)
 {
-    if (parent.checkFunctional(pkt)) {
+    if (parent.doFunctional(pkt)) {
         pkt->makeResponse();
     } else {
         parent.masterPort.sendFunctional(pkt);
diff --git a/src/mem/mem_delay.hh b/src/mem/mem_delay.hh
index 28c0405..1b0c119 100644
--- a/src/mem/mem_delay.hh
+++ b/src/mem/mem_delay.hh
@@ -125,7 +125,7 @@

     };

-    bool checkFunctional(PacketPtr pkt);
+    bool doFunctional(PacketPtr pkt);

     MasterPort masterPort;
     SlavePort slavePort;
diff --git a/src/mem/noncoherent_xbar.cc b/src/mem/noncoherent_xbar.cc
index 7bd04cb..1394fc2 100644
--- a/src/mem/noncoherent_xbar.cc
+++ b/src/mem/noncoherent_xbar.cc
@@ -297,7 +297,7 @@
         // if we find a response that has the data, then the
         // downstream caches/memories may be out of date, so simply stop
         // here
-        if (p->checkFunctional(pkt)) {
+        if (p->doFunctional(pkt)) {
             if (pkt->needsResponse())
                 pkt->makeResponse();
             return;
diff --git a/src/mem/packet.cc b/src/mem/packet.cc
index 038ae34..ad01cf0 100644
--- a/src/mem/packet.cc
+++ b/src/mem/packet.cc
@@ -223,7 +223,7 @@
 };

 bool
-Packet::checkFunctional(Printable *obj, Addr addr, bool is_secure, int size,
+Packet::doFunctional(Printable *obj, Addr addr, bool is_secure, int size,
                         uint8_t *_data)
 {
     const Addr func_start = getAddr();
diff --git a/src/mem/packet.hh b/src/mem/packet.hh
index 5c04112..fac9008 100644
--- a/src/mem/packet.hh
+++ b/src/mem/packet.hh
@@ -1168,14 +1168,14 @@
      * accordingly.
      */
     bool
-    checkFunctional(PacketPtr other)
+    doFunctional(PacketPtr other)
     {
         // all packets that are carrying a payload should have a valid
         // data pointer
-        return checkFunctional(other, other->getAddr(), other->isSecure(),
-                               other->getSize(),
-                               other->hasData() ?
-                               other->getPtr<uint8_t>() : NULL);
+        return doFunctional(other, other->getAddr(), other->isSecure(),
+                            other->getSize(),
+                            other->hasData() ?
+                            other->getPtr<uint8_t>() : NULL);
     }

     /**
@@ -1206,7 +1206,7 @@
      * memory value.
      */
     bool
-    checkFunctional(Printable *obj, Addr base, bool is_secure, int size,
+    doFunctional(Printable *obj, Addr base, bool is_secure, int size,
                     uint8_t *_data);

     /**
diff --git a/src/mem/packet_queue.cc b/src/mem/packet_queue.cc
index a630f1f..68261f2 100644
--- a/src/mem/packet_queue.cc
+++ b/src/mem/packet_queue.cc
@@ -82,7 +82,7 @@
 }

 bool
-PacketQueue::checkFunctional(PacketPtr pkt)
+PacketQueue::doFunctional(PacketPtr pkt)
 {
     pkt->pushLabel(label);

@@ -92,7 +92,7 @@
     while (!found && i != transmitList.end()) {
         // If the buffered packet contains data, and it overlaps the
         // current packet, then update data
-        found = pkt->checkFunctional(i->pkt);
+        found = pkt->doFunctional(i->pkt);
         ++i;
     }

diff --git a/src/mem/packet_queue.hh b/src/mem/packet_queue.hh
index f7379c9..68cf6b7 100644
--- a/src/mem/packet_queue.hh
+++ b/src/mem/packet_queue.hh
@@ -169,7 +169,7 @@

     /** Check the list of buffered packets against the supplied
      * functional request. */
-    bool checkFunctional(PacketPtr pkt);
+    bool doFunctional(PacketPtr pkt);

     /**
      * Schedule a send event if we are not already waiting for a
diff --git a/src/mem/qport.hh b/src/mem/qport.hh
index b15bdfe..3a39561 100644
--- a/src/mem/qport.hh
+++ b/src/mem/qport.hh
@@ -93,8 +93,8 @@

     /** Check the list of buffered packets against the supplied
      * functional request. */
-    bool checkFunctional(PacketPtr pkt)
-    { return respQueue.checkFunctional(pkt); }
+    bool doFunctional(PacketPtr pkt)
+    { return respQueue.doFunctional(pkt); }
 };

 /**
@@ -159,10 +159,10 @@

     /** Check the list of buffered packets against the supplied
      * functional request. */
-    bool checkFunctional(PacketPtr pkt)
+    bool doFunctional(PacketPtr pkt)
     {
-        return reqQueue.checkFunctional(pkt) ||
-            snoopRespQueue.checkFunctional(pkt);
+        return reqQueue.doFunctional(pkt) ||
+            snoopRespQueue.doFunctional(pkt);
     }
 };

diff --git a/src/mem/ruby/slicc_interface/AbstractController.cc b/src/mem/ruby/slicc_interface/AbstractController.cc
index 5f7eb65..5c7df45 100644
--- a/src/mem/ruby/slicc_interface/AbstractController.cc
+++ b/src/mem/ruby/slicc_interface/AbstractController.cc
@@ -318,7 +318,7 @@
     int num_functional_writes = 0;

     // Check the buffer from the controller to the memory.
-    if (memoryPort.checkFunctional(pkt)) {
+    if (memoryPort.doFunctional(pkt)) {
         num_functional_writes++;
     }

diff --git a/src/mem/serial_link.cc b/src/mem/serial_link.cc
index 97563c0..b63ef50 100644
--- a/src/mem/serial_link.cc
+++ b/src/mem/serial_link.cc
@@ -393,14 +393,14 @@

     // check the response queue
     for (auto i = transmitList.begin();  i != transmitList.end(); ++i) {
-        if (pkt->checkFunctional((*i).pkt)) {
+        if (pkt->doFunctional((*i).pkt)) {
             pkt->makeResponse();
             return;
         }
     }

     // also check the master port's request queue
-    if (masterPort.checkFunctional(pkt)) {
+    if (masterPort.doFunctional(pkt)) {
         return;
     }

@@ -411,13 +411,13 @@
 }

 bool
-SerialLink::SerialLinkMasterPort::checkFunctional(PacketPtr pkt)
+SerialLink::SerialLinkMasterPort::doFunctional(PacketPtr pkt)
 {
     bool found = false;
     auto i = transmitList.begin();

     while (i != transmitList.end() && !found) {
-        if (pkt->checkFunctional((*i).pkt)) {
+        if (pkt->doFunctional((*i).pkt)) {
             pkt->makeResponse();
             found = true;
         }
diff --git a/src/mem/serial_link.hh b/src/mem/serial_link.hh
index 64f262d..6462f58 100644
--- a/src/mem/serial_link.hh
+++ b/src/mem/serial_link.hh
@@ -288,7 +288,7 @@
          *
          * @return true if we find a match
          */
-        bool checkFunctional(PacketPtr pkt);
+        bool doFunctional(PacketPtr pkt);

       protected:

diff --git a/src/mem/simple_mem.cc b/src/mem/simple_mem.cc
index 6914ac4..d73cee5 100644
--- a/src/mem/simple_mem.cc
+++ b/src/mem/simple_mem.cc
@@ -91,7 +91,7 @@
     auto p = packetQueue.begin();
     // potentially update the packets in our packet queue as well
     while (!done && p != packetQueue.end()) {
-        done = pkt->checkFunctional(p->pkt);
+        done = pkt->doFunctional(p->pkt);
         ++p;
     }

diff --git a/src/mem/tport.cc b/src/mem/tport.cc
index fce4f6c..f1ce971 100644
--- a/src/mem/tport.cc
+++ b/src/mem/tport.cc
@@ -54,7 +54,7 @@
 void
 SimpleTimingPort::recvFunctional(PacketPtr pkt)
 {
-    if (!respQueue.checkFunctional(pkt)) {
+    if (!respQueue.doFunctional(pkt)) {
         // do an atomic access and throw away the returned latency
         recvAtomic(pkt);
     }

--
To view, visit https://gem5-review.googlesource.com/11810
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ieca2579c020c329040da053ba8e25820801b62c5
Gerrit-Change-Number: 11810
Gerrit-PatchSet: 1
Gerrit-Owner: Kovacsics Róbert <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to