Eden Avivi has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/33500 )

Change subject: misc: Master/Slave terminology
......................................................................

misc: Master/Slave terminology

Changed BridgeMasterPort and BridgeSlavePort

Change-Id: I86dbddad48e981f0dac89a92ea8a8223917bb244
---
M src/mem/bridge.cc
M src/mem/bridge.hh
M src/systemc/tlm_bridge/gem5_to_tlm.hh
M src/systemc/tlm_bridge/tlm_to_gem5.hh
4 files changed, 40 insertions(+), 40 deletions(-)



diff --git a/src/mem/bridge.cc b/src/mem/bridge.cc
index 3cf61f5..d90c5dd 100644
--- a/src/mem/bridge.cc
+++ b/src/mem/bridge.cc
@@ -50,9 +50,9 @@
 #include "debug/Bridge.hh"
 #include "params/Bridge.hh"

-Bridge::BridgeSlavePort::BridgeSlavePort(const std::string& _name,
+Bridge::BridgeResponsePort::BridgeResponsePort(const std::string& _name,
                                          Bridge& _bridge,
-                                         BridgeMasterPort& _masterPort,
+                                         BridgeRequestPort& _masterPort,
                                          Cycles _delay, int _resp_limit,
                                          std::vector<AddrRange> _ranges)
: ResponsePort(_name, &_bridge), bridge(_bridge), masterPort(_masterPort),
@@ -62,9 +62,9 @@
 {
 }

-Bridge::BridgeMasterPort::BridgeMasterPort(const std::string& _name,
+Bridge::BridgeRequestPort::BridgeRequestPort(const std::string& _name,
                                            Bridge& _bridge,
-                                           BridgeSlavePort& _slavePort,
+                                           BridgeResponsePort& _slavePort,
                                            Cycles _delay, int _req_limit)
     : RequestPort(_name, &_bridge), bridge(_bridge), slavePort(_slavePort),
       delay(_delay), reqQueueLimit(_req_limit),
@@ -105,19 +105,19 @@
 }

 bool
-Bridge::BridgeSlavePort::respQueueFull() const
+Bridge::BridgeResponsePort::respQueueFull() const
 {
     return outstandingResponses == respQueueLimit;
 }

 bool
-Bridge::BridgeMasterPort::reqQueueFull() const
+Bridge::BridgeRequestPort::reqQueueFull() const
 {
     return transmitList.size() == reqQueueLimit;
 }

 bool
-Bridge::BridgeMasterPort::recvTimingResp(PacketPtr pkt)
+Bridge::BridgeRequestPort::recvTimingResp(PacketPtr pkt)
 {
     // all checks are done when the request is accepted on the slave
     // side, so we are guaranteed to have space for the response
@@ -139,7 +139,7 @@
 }

 bool
-Bridge::BridgeSlavePort::recvTimingReq(PacketPtr pkt)
+Bridge::BridgeResponsePort::recvTimingReq(PacketPtr pkt)
 {
     DPRINTF(Bridge, "recvTimingReq: %s addr 0x%x\n",
             pkt->cmdString(), pkt->getAddr());
@@ -199,7 +199,7 @@
 }

 void
-Bridge::BridgeSlavePort::retryStalledReq()
+Bridge::BridgeResponsePort::retryStalledReq()
 {
     if (retryReq) {
         DPRINTF(Bridge, "Request waiting for retry, now retrying\n");
@@ -209,7 +209,7 @@
 }

 void
-Bridge::BridgeMasterPort::schedTimingReq(PacketPtr pkt, Tick when)
+Bridge::BridgeRequestPort::schedTimingReq(PacketPtr pkt, Tick when)
 {
     // If we're about to put this packet at the head of the queue, we
     // need to schedule an event to do the transmit.  Otherwise there
@@ -226,7 +226,7 @@


 void
-Bridge::BridgeSlavePort::schedTimingResp(PacketPtr pkt, Tick when)
+Bridge::BridgeResponsePort::schedTimingResp(PacketPtr pkt, Tick when)
 {
     // If we're about to put this packet at the head of the queue, we
     // need to schedule an event to do the transmit.  Otherwise there
@@ -240,7 +240,7 @@
 }

 void
-Bridge::BridgeMasterPort::trySendTiming()
+Bridge::BridgeRequestPort::trySendTiming()
 {
     assert(!transmitList.empty());

@@ -278,7 +278,7 @@
 }

 void
-Bridge::BridgeSlavePort::trySendTiming()
+Bridge::BridgeResponsePort::trySendTiming()
 {
     assert(!transmitList.empty());

@@ -322,19 +322,19 @@
 }

 void
-Bridge::BridgeMasterPort::recvReqRetry()
+Bridge::BridgeRequestPort::recvReqRetry()
 {
     trySendTiming();
 }

 void
-Bridge::BridgeSlavePort::recvRespRetry()
+Bridge::BridgeResponsePort::recvRespRetry()
 {
     trySendTiming();
 }

 Tick
-Bridge::BridgeSlavePort::recvAtomic(PacketPtr pkt)
+Bridge::BridgeResponsePort::recvAtomic(PacketPtr pkt)
 {
     panic_if(pkt->cacheResponding(), "Should not see packets where cache "
              "is responding");
@@ -343,7 +343,7 @@
 }

 void
-Bridge::BridgeSlavePort::recvFunctional(PacketPtr pkt)
+Bridge::BridgeResponsePort::recvFunctional(PacketPtr pkt)
 {
     pkt->pushLabel(name());

@@ -367,7 +367,7 @@
 }

 bool
-Bridge::BridgeMasterPort::trySatisfyFunctional(PacketPtr pkt)
+Bridge::BridgeRequestPort::trySatisfyFunctional(PacketPtr pkt)
 {
     bool found = false;
     auto i = transmitList.begin();
@@ -384,7 +384,7 @@
 }

 AddrRangeList
-Bridge::BridgeSlavePort::getAddrRanges() const
+Bridge::BridgeResponsePort::getAddrRanges() const
 {
     return ranges;
 }
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh
index dca863d..e069276 100644
--- a/src/mem/bridge.hh
+++ b/src/mem/bridge.hh
@@ -88,15 +88,15 @@
     };

     // Forward declaration to allow the slave port to have a pointer
-    class BridgeMasterPort;
+    class BridgeRequestPort;

     /**
      * The port on the side that receives requests and sends
-     * responses. The slave port has a set of address ranges that it
-     * is responsible for. The slave port also has a buffer for the
+     * responses. The reponse port has a set of address ranges that it
+     * is responsible for. The response port also has a buffer for the
      * responses not yet sent.
      */
-    class BridgeSlavePort : public ResponsePort
+    class BridgeResponsePort : public ResponsePort
     {

       private:
@@ -107,7 +107,7 @@
         /**
          * Master port on the other side of the bridge.
          */
-        BridgeMasterPort& masterPort;
+        BridgeRequestPort& masterPort;

         /** Minimum request delay though this bridge. */
         const Cycles delay;
@@ -158,7 +158,7 @@
       public:

         /**
-         * Constructor for the BridgeSlavePort.
+         * Constructor for the BridgeResponsePort.
          *
          * @param _name the port name including the owner
          * @param _bridge the structural owner
@@ -167,8 +167,8 @@
          * @param _resp_limit the size of the response queue
          * @param _ranges a number of address ranges to forward
          */
-        BridgeSlavePort(const std::string& _name, Bridge& _bridge,
-                        BridgeMasterPort& _masterPort, Cycles _delay,
+        BridgeResponsePort(const std::string& _name, Bridge& _bridge,
+                        BridgeRequestPort& _masterPort, Cycles _delay,
                         int _resp_limit, std::vector<AddrRange> _ranges);

         /**
@@ -216,7 +216,7 @@
      * responses. The master port has a buffer for the requests not
      * yet sent.
      */
-    class BridgeMasterPort : public RequestPort
+    class BridgeRequestPort : public RequestPort
     {

       private:
@@ -227,7 +227,7 @@
         /**
          * The slave port on the other side of the bridge.
          */
-        BridgeSlavePort& slavePort;
+        BridgeResponsePort& slavePort;

         /** Minimum delay though this bridge. */
         const Cycles delay;
@@ -256,7 +256,7 @@
       public:

         /**
-         * Constructor for the BridgeMasterPort.
+         * Constructor for the BridgeRequestPort.
          *
          * @param _name the port name including the owner
          * @param _bridge the structural owner
@@ -264,8 +264,8 @@
          * @param _delay the delay in cycles from receiving to sending
          * @param _req_limit the size of the request queue
          */
-        BridgeMasterPort(const std::string& _name, Bridge& _bridge,
-                         BridgeSlavePort& _slavePort, Cycles _delay,
+        BridgeRequestPort(const std::string& _name, Bridge& _bridge,
+                         BridgeResponsePort& _slavePort, Cycles _delay,
                          int _req_limit);

         /**
@@ -306,10 +306,10 @@
     };

     /** Slave port of the bridge. */
-    BridgeSlavePort slavePort;
+    BridgeResponsePort slavePort;

     /** Master port of the bridge. */
-    BridgeMasterPort masterPort;
+    BridgeRequestPort masterPort;

   public:

diff --git a/src/systemc/tlm_bridge/gem5_to_tlm.hh b/src/systemc/tlm_bridge/gem5_to_tlm.hh
index 7e69e3c..b2fdb18 100644
--- a/src/systemc/tlm_bridge/gem5_to_tlm.hh
+++ b/src/systemc/tlm_bridge/gem5_to_tlm.hh
@@ -85,7 +85,7 @@
 class Gem5ToTlmBridge : public Gem5ToTlmBridgeBase
 {
   private:
-    class BridgeSlavePort : public ResponsePort
+    class BridgeResponsePort : public ResponsePort
     {
       protected:
         Gem5ToTlmBridge<BITWIDTH> &bridge;
@@ -128,13 +128,13 @@
         void recvRespRetry() override { bridge.recvRespRetry(); }

       public:
-        BridgeSlavePort(const std::string &name_,
+        BridgeResponsePort(const std::string &name_,
                         Gem5ToTlmBridge<BITWIDTH> &bridge_) :
             ResponsePort(name_, nullptr), bridge(bridge_)
         {}
     };

-    BridgeSlavePort bsp;
+    BridgeResponsePort bsp;
     tlm_utils::simple_initiator_socket<
         Gem5ToTlmBridge<BITWIDTH>, BITWIDTH> socket;
     sc_gem5::TlmInitiatorWrapper<BITWIDTH> wrapper;
diff --git a/src/systemc/tlm_bridge/tlm_to_gem5.hh b/src/systemc/tlm_bridge/tlm_to_gem5.hh
index e2e7540..99f75d1 100644
--- a/src/systemc/tlm_bridge/tlm_to_gem5.hh
+++ b/src/systemc/tlm_bridge/tlm_to_gem5.hh
@@ -89,7 +89,7 @@
         TlmSenderState(tlm::tlm_generic_payload &trans) : trans(trans) {}
     };

-    class BridgeMasterPort : public RequestPort
+    class BridgeRequestPort : public RequestPort
     {
       protected:
         TlmToGem5Bridge<BITWIDTH> &bridge;
@@ -103,7 +103,7 @@
         void recvRangeChange() override { bridge.recvRangeChange(); }

       public:
-        BridgeMasterPort(const std::string &name_,
+        BridgeRequestPort(const std::string &name_,
                          TlmToGem5Bridge<BITWIDTH> &bridge_) :
             RequestPort(name_, nullptr), bridge(bridge_)
         {}
@@ -119,7 +119,7 @@

     bool responseInProgress;

-    BridgeMasterPort bmp;
+    BridgeRequestPort bmp;
     tlm_utils::simple_target_socket<
         TlmToGem5Bridge<BITWIDTH>, BITWIDTH> socket;
     sc_gem5::TlmTargetWrapper<BITWIDTH> wrapper;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33500
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: I86dbddad48e981f0dac89a92ea8a8223917bb244
Gerrit-Change-Number: 33500
Gerrit-PatchSet: 1
Gerrit-Owner: Eden Avivi <eav...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to