From: Gabe Black Date: Fri, 14 Aug 2020 01:18:08 +0000 (-0700) Subject: util,systemc: Update the gem5-within-systemc TLM example code. X-Git-Tag: v20.1.0.0~302 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e824fa85788febaf0eccd274b4d1efd7b734a78;p=gem5.git util,systemc: Update the gem5-within-systemc TLM example code. 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 Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/util/tlm/src/sc_master_port.cc b/util/tlm/src/sc_master_port.cc index 2123b86ae..2d569e871 100644 --- a/util/tlm/src/sc_master_port.cc +++ b/util/tlm/src/sc_master_port.cc @@ -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) diff --git a/util/tlm/src/sc_master_port.hh b/util/tlm/src/sc_master_port.hh index f799b8faf..93f51942d 100644 --- a/util/tlm/src/sc_master_port.hh +++ b/util/tlm/src/sc_master_port.hh @@ -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); }; } diff --git a/util/tlm/src/sc_slave_port.cc b/util/tlm/src/sc_slave_port.cc index 5a01f0c6b..a3b878349 100644 --- a/util/tlm/src/sc_slave_port.cc +++ b/util/tlm/src/sc_slave_port.cc @@ -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) diff --git a/util/tlm/src/sc_slave_port.hh b/util/tlm/src/sc_slave_port.hh index 110619452..ef75aab8c 100644 --- a/util/tlm/src/sc_slave_port.hh +++ b/util/tlm/src/sc_slave_port.hh @@ -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); }; }