util,systemc: Update the gem5-within-systemc TLM example code.
authorGabe Black <gabeblack@google.com>
Fri, 14 Aug 2020 01:18:08 +0000 (18:18 -0700)
committerGabe Black <gabeblack@google.com>
Sun, 16 Aug 2020 04:29:27 +0000 (04:29 +0000)
Some class names within gem5 changed in March of last year, and this
code was not updated to match. Change ExternalMaster::Port to
ExternalMaster::ExternalPort, and ExternalSlave::Port to
ExternalSlave::ExternalPort.

Change-Id: I04c0970c4107de3449473c24c7c6f99ada72bbb3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32640
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/tlm/src/sc_master_port.cc
util/tlm/src/sc_master_port.hh
util/tlm/src/sc_slave_port.cc
util/tlm/src/sc_slave_port.hh

index 2123b86ae1dd2b019784dc2074e8e0189f50d9f0..2d569e871f5931fcbd7be7879c37191be83dfa1b 100644 (file)
@@ -83,7 +83,7 @@ SCMasterPort::SCMasterPort(const std::string& name_,
                            const std::string& systemc_name,
                            ExternalMaster& owner_,
                            Gem5SimControl& simControl)
-  : ExternalMaster::Port(name_, owner_),
+  : ExternalMaster::ExternalPort(name_, owner_),
     peq(this, &SCMasterPort::peq_cb),
     waitForRetry(false),
     pendingRequest(nullptr),
@@ -410,7 +410,7 @@ SCMasterPort::recvRangeChange()
                       "received address range change but ignored it");
 }
 
-ExternalMaster::Port*
+ExternalMaster::ExternalPort*
 SCMasterPortHandler::getExternalPort(const std::string &name,
                                      ExternalMaster &owner,
                                      const std::string &port_data)
index f799b8fafdf5b5297efc4b79ac5d5bc8be1a3d0b..93f51942da6c9c9f9a650fb0d93c019ef634436f 100644 (file)
@@ -71,7 +71,7 @@ class Gem5MasterTransactor;
  * It is assumed that the mode (atomic/timing) does not change during
  * execution.
  */
-class SCMasterPort : public ExternalMaster::Port
+class SCMasterPort : public ExternalMaster::ExternalPort
 {
   private:
     struct TlmSenderState : public Packet::SenderState
@@ -149,9 +149,9 @@ class SCMasterPortHandler : public ExternalMaster::Handler
   public:
     SCMasterPortHandler(Gem5SimControl& control) : control(control) {}
 
-    ExternalMaster::Port *getExternalPort(const std::string &name,
-                                          ExternalMaster &owner,
-                                          const std::string &port_data);
+    ExternalMaster::ExternalPort *
+        getExternalPort(const std::string &name, ExternalMaster &owner,
+                        const std::string &port_data);
 };
 
 }
index 5a01f0c6b04c63b5a9fbbb5a2ab639555863afc8..a3b878349398033f9c68932b6e27d97bc437aa1b 100644 (file)
@@ -361,7 +361,7 @@ SCSlavePort::nb_transport_bw(tlm::tlm_generic_payload& trans,
 SCSlavePort::SCSlavePort(const std::string &name_,
     const std::string &systemc_name,
     ExternalSlave &owner_) :
-    ExternalSlave::Port(name_, owner_),
+    ExternalSlave::ExternalPort(name_, owner_),
     blockingRequest(NULL),
     needToSendRequestRetry(false),
     blockingResponse(NULL),
@@ -380,7 +380,7 @@ SCSlavePort::bindToTransactor(Gem5SlaveTransactor* transactor)
                                                 &SCSlavePort::nb_transport_bw);
 }
 
-ExternalSlave::Port*
+ExternalSlave::ExternalPort*
 SCSlavePortHandler::getExternalPort(const std::string &name,
                                     ExternalSlave &owner,
                                     const std::string &port_data)
index 1106194522031fc14848d915c1c97bc46126cdb6..ef75aab8ca0404da17baa919559b95cdbd60e57a 100644 (file)
@@ -65,7 +65,7 @@ class Gem5SlaveTransactor;
  * original packet as a payload extension, the packet can be restored and send
  * back to the gem5 world upon receiving a response from the SystemC world.
  */
-class SCSlavePort : public ExternalSlave::Port
+class SCSlavePort : public ExternalSlave::ExternalPort
 {
   public:
     /** One instance of pe and the related callback needed */
@@ -125,9 +125,9 @@ class SCSlavePortHandler : public ExternalSlave::Handler
   public:
     SCSlavePortHandler(Gem5SimControl& control) : control(control) {}
 
-    ExternalSlave::Port *getExternalPort(const std::string &name,
-                                         ExternalSlave &owner,
-                                         const std::string &port_data);
+    ExternalSlave::ExternalPort *
+        getExternalPort(const std::string &name, ExternalSlave &owner,
+                        const std::string &port_data);
 };
 
 }