abstract = True
# one port in each direction
- master = MasterPort("Master port")
- slave = SlavePort("Slave port")
+ master = RequestPort("Master port")
+ slave = ResponsePort("Slave port")
# Range address mapper that maps a set of original ranges to a set of
class Bridge(ClockedObject):
type = 'Bridge'
cxx_header = "mem/bridge.hh"
- slave = SlavePort('Slave port')
- master = MasterPort('Master port')
+ slave = ResponsePort('Slave port')
+ master = RequestPort('Master port')
req_size = Param.Unsigned(16, "The number of requests to buffer")
resp_size = Param.Unsigned(16, "The number of responses to buffer")
delay = Param.Latency('0ns', "The latency of this bridge")
system = Param.System(Parent.any, "System that the monitor belongs to.")
# one port in each direction
- master = MasterPort("Master port")
- slave = SlavePort("Slave port")
+ master = RequestPort("Master port")
+ slave = ResponsePort("Slave port")
# control the sample period window length of this monitor
sample_period = Param.Clock("1ms", "Sample period for histograms")
type = 'ExternalMaster'
cxx_header = "mem/external_master.hh"
- port = MasterPort("Master port")
+ port = RequestPort("Master port")
port_type = Param.String('stub', 'Registered external port handler'
' to pass this port to in instantiation')
cxx_header = "mem/mem_checker_monitor.hh"
# one port in each direction
- master = MasterPort("Master port")
- slave = SlavePort("Slave port")
- cpu_side = SlavePort("Alias for slave")
- mem_side = MasterPort("Alias for master")
+ master = RequestPort("Master port")
+ slave = ResponsePort("Slave port")
+ cpu_side = ResponsePort("Alias for slave")
+ mem_side = RequestPort("Alias for master")
warn_only = Param.Bool(False, "Warn about violations only")
memchecker = Param.MemChecker("Instance shared with other monitors")
cxx_header = 'mem/mem_delay.hh'
abstract = True
- master = MasterPort("Master port")
- slave = SlavePort("Slave port")
+ master = RequestPort("Master port")
+ slave = ResponsePort("Slave port")
class SimpleMemDelay(MemDelay):
type = 'SimpleMemDelay'
class SerialLink(ClockedObject):
type = 'SerialLink'
cxx_header = "mem/serial_link.hh"
- slave = SlavePort('Slave port')
- master = MasterPort('Master port')
+ slave = ResponsePort('Slave port')
+ master = RequestPort('Master port')
req_size = Param.Unsigned(16, "The number of requests to buffer")
resp_size = Param.Unsigned(16, "The number of responses to buffer")
delay = Param.Latency('0ns', "The latency of this serial_link")
# The default port can be left unconnected, or be used to connect
# a default slave port
- default = MasterPort("Port for connecting an optional default slave")
+ default = RequestPort("Port for connecting an optional default slave")
# The default port can be used unconditionally, or based on
# address range, in which case it may overlap with other
};
- class MapperMasterPort : public MasterPort
+ class MapperMasterPort : public RequestPort
{
public:
MapperMasterPort(const std::string& _name, AddrMapper& _mapper)
- : MasterPort(_name, &_mapper), mapper(_mapper)
+ : RequestPort(_name, &_mapper), mapper(_mapper)
{ }
protected:
/** Instance of master port, facing the memory side */
MapperMasterPort masterPort;
- class MapperSlavePort : public SlavePort
+ class MapperSlavePort : public ResponsePort
{
public:
MapperSlavePort(const std::string& _name, AddrMapper& _mapper)
- : SlavePort(_name, &_mapper), mapper(_mapper)
+ : ResponsePort(_name, &_mapper), mapper(_mapper)
{ }
protected:
BridgeMasterPort& _masterPort,
Cycles _delay, int _resp_limit,
std::vector<AddrRange> _ranges)
- : SlavePort(_name, &_bridge), bridge(_bridge), masterPort(_masterPort),
+ : ResponsePort(_name, &_bridge), bridge(_bridge), masterPort(_masterPort),
delay(_delay), ranges(_ranges.begin(), _ranges.end()),
outstandingResponses(0), retryReq(false), respQueueLimit(_resp_limit),
sendEvent([this]{ trySendTiming(); }, _name)
Bridge& _bridge,
BridgeSlavePort& _slavePort,
Cycles _delay, int _req_limit)
- : MasterPort(_name, &_bridge), bridge(_bridge), slavePort(_slavePort),
+ : RequestPort(_name, &_bridge), bridge(_bridge), slavePort(_slavePort),
delay(_delay), reqQueueLimit(_req_limit),
sendEvent([this]{ trySendTiming(); }, _name)
{
* is responsible for. The slave port also has a buffer for the
* responses not yet sent.
*/
- class BridgeSlavePort : public SlavePort
+ class BridgeSlavePort : public ResponsePort
{
private:
* responses. The master port has a buffer for the requests not
* yet sent.
*/
- class BridgeMasterPort : public MasterPort
+ class BridgeMasterPort : public RequestPort
{
private:
sequential_access = Param.Bool(False,
"Whether to access tags and data sequentially")
- cpu_side = SlavePort("Upstream port closer to the CPU and/or device")
- mem_side = MasterPort("Downstream port closer to memory")
+ cpu_side = ResponsePort("Upstream port closer to the CPU and/or device")
+ mem_side = RequestPort("Downstream port closer to memory")
addr_ranges = VectorParam.AddrRange([AllMemory],
"Address range for the CPU-side port (to allow striping)")
class Base;
}
class MSHR;
-class MasterPort;
+class RequestPort;
class QueueEntry;
struct BaseCacheParams;
public:
- CacheReqPacketQueue(BaseCache &cache, MasterPort &port,
+ CacheReqPacketQueue(BaseCache &cache, RequestPort &port,
SnoopRespPacketQueue &snoop_resp_queue,
const std::string &label) :
ReqPacketQueue(cache, port, label), cache(cache),
// are enumerated starting from zero
for (int i = 0; i < p->port_master_connection_count; ++i) {
std::string portName = csprintf("%s.master[%d]", name(), i);
- MasterPort* bp = new CoherentXBarMasterPort(portName, *this, i);
+ RequestPort* bp = new CoherentXBarMasterPort(portName, *this, i);
masterPorts.push_back(bp);
reqLayers.push_back(new ReqLayer(*bp, *this,
csprintf("reqLayer%d", i)));
if (p->port_default_connection_count) {
defaultPortID = masterPorts.size();
std::string portName = name() + ".default";
- MasterPort* bp = new CoherentXBarMasterPort(portName, *this,
+ RequestPort* bp = new CoherentXBarMasterPort(portName, *this,
defaultPortID);
masterPorts.push_back(bp);
reqLayers.push_back(new ReqLayer(*bp, *this, csprintf("reqLayer%d",
CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
{
// determine the source port based on the id
- SlavePort *src_port = slavePorts[slave_port_id];
+ ResponsePort *src_port = slavePorts[slave_port_id];
// remember if the packet is an express snoop
bool is_express_snoop = pkt->isExpressSnoop();
CoherentXBar::recvTimingResp(PacketPtr pkt, PortID master_port_id)
{
// determine the source port based on the id
- MasterPort *src_port = masterPorts[master_port_id];
+ RequestPort *src_port = masterPorts[master_port_id];
// determine the destination
const auto route_lookup = routeTo.find(pkt->req);
CoherentXBar::recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id)
{
// determine the source port based on the id
- SlavePort* src_port = slavePorts[slave_port_id];
+ ResponsePort* src_port = slavePorts[slave_port_id];
// get the destination
const auto route_lookup = routeTo.find(pkt->req);
}
} else {
// get the master port that mirrors this slave port internally
- MasterPort* snoop_port = snoopRespPorts[slave_port_id];
+ RequestPort* snoop_port = snoopRespPorts[slave_port_id];
assert(dest_port_id < respLayers.size());
if (!respLayers[dest_port_id]->tryTiming(snoop_port)) {
DPRINTF(CoherentXBar, "%s: src %s packet %s BUSY\n", __func__,
* instantiated for each of the slave interfaces connecting to the
* crossbar.
*/
- class CoherentXBarMasterPort : public MasterPort
+ class CoherentXBarMasterPort : public RequestPort
{
private:
/** A reference to the crossbar to which this port belongs. */
CoherentXBarMasterPort(const std::string &_name,
CoherentXBar &_xbar, PortID _id)
- : MasterPort(_name, &_xbar, _id), xbar(_xbar)
+ : RequestPort(_name, &_xbar, _id), xbar(_xbar)
{ }
protected:
* from a slave port and forwarding it through an outgoing slave
* port. It is effectively a dangling master port.
*/
- class SnoopRespPort : public MasterPort
+ class SnoopRespPort : public RequestPort
{
private:
* Create a snoop response port that mirrors a given slave port.
*/
SnoopRespPort(QueuedSlavePort& slave_port, CoherentXBar& _xbar) :
- MasterPort(slave_port.name() + ".snoopRespPort", &_xbar),
+ RequestPort(slave_port.name() + ".snoopRespPort", &_xbar),
slavePort(slave_port) { }
/**
* send function of the slave port is called. Besides this, these
* functions can also perform actions for capturing statistics.
*/
- class MonitorMasterPort : public MasterPort
+ class MonitorMasterPort : public RequestPort
{
public:
MonitorMasterPort(const std::string& _name, CommMonitor& _mon)
- : MasterPort(_name, &_mon), mon(_mon)
+ : RequestPort(_name, &_mon), mon(_mon)
{ }
protected:
* send function of the master port is called. Besides this, these
* functions can also perform actions for capturing statistics.
*/
- class MonitorSlavePort : public SlavePort
+ class MonitorSlavePort : public ResponsePort
{
public:
MonitorSlavePort(const std::string& _name, CommMonitor& _mon)
- : SlavePort(_name, &_mon), mon(_mon)
+ : ResponsePort(_name, &_mon), mon(_mon)
{ }
protected:
* port which is to be bound to. A port handler will usually construct a
* bridge object in the external system to accomodate the port-to-port
* mapping but this bridge is not exposed to gem5 other than be the
- * presentation of the MasterPort which can be bound.
+ * presentation of the RequestPort which can be bound.
*
- * The external port must provide a gem5 MasterPort interface.
+ * The external port must provide a gem5 RequestPort interface.
*/
#ifndef __MEM_EXTERNAL_MASTER_HH__
{
public:
/** Derive from this class to create an external port interface */
- class ExternalPort : public MasterPort
+ class ExternalPort : public RequestPort
{
protected:
ExternalMaster &owner;
public:
ExternalPort(const std::string &name_,
ExternalMaster &owner_) :
- MasterPort(name_, &owner_), owner(owner_)
+ RequestPort(name_, &owner_), owner(owner_)
{ }
~ExternalPort() { }
/* Handlers are specific to *types* of port not specific port
* instantiations. A handler will typically build a bridge to the
- * external port from gem5 and provide gem5 with a MasterPort that can be
+ * external port from gem5 and provide gem5 with a RequestPort that can be
* bound to for each call to Handler::getExternalPort.*/
class Handler
{
bool HMCController::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
{
// determine the source port based on the id
- SlavePort *src_port = slavePorts[slave_port_id];
+ ResponsePort *src_port = slavePorts[slave_port_id];
// we should never see express snoops on a non-coherent component
assert(!pkt->isExpressSnoop());
* send function of the slave port is called. Besides this, these
* functions can also perform actions for capturing statistics.
*/
- class MonitorMasterPort : public MasterPort
+ class MonitorMasterPort : public RequestPort
{
public:
MonitorMasterPort(const std::string& _name, MemCheckerMonitor& _mon)
- : MasterPort(_name, &_mon), mon(_mon)
+ : RequestPort(_name, &_mon), mon(_mon)
{ }
protected:
* send function of the master port is called. Besides this, these
* functions can also perform actions for capturing statistics.
*/
- class MonitorSlavePort : public SlavePort
+ class MonitorSlavePort : public ResponsePort
{
public:
MonitorSlavePort(const std::string& _name, MemCheckerMonitor& _mon)
- : SlavePort(_name, &_mon), mon(_mon)
+ : ResponsePort(_name, &_mon), mon(_mon)
{ }
protected:
masterPort.trySatisfyFunctional(pkt);
}
-MemDelay::MasterPort::MasterPort(const std::string &_name, MemDelay &_parent)
+MemDelay::RequestPort::RequestPort(const std::string &_name, MemDelay &_parent)
: QueuedMasterPort(_name, &_parent,
_parent.reqQueue, _parent.snoopRespQueue),
parent(_parent)
}
bool
-MemDelay::MasterPort::recvTimingResp(PacketPtr pkt)
+MemDelay::RequestPort::recvTimingResp(PacketPtr pkt)
{
// technically the packet only reaches us after the header delay,
// and typically we also need to deserialise any payload
}
void
-MemDelay::MasterPort::recvFunctionalSnoop(PacketPtr pkt)
+MemDelay::RequestPort::recvFunctionalSnoop(PacketPtr pkt)
{
if (parent.trySatisfyFunctional(pkt)) {
pkt->makeResponse();
}
Tick
-MemDelay::MasterPort::recvAtomicSnoop(PacketPtr pkt)
+MemDelay::RequestPort::recvAtomicSnoop(PacketPtr pkt)
{
const Tick delay = parent.delaySnoopResp(pkt);
}
void
-MemDelay::MasterPort::recvTimingSnoopReq(PacketPtr pkt)
+MemDelay::RequestPort::recvTimingSnoopReq(PacketPtr pkt)
{
parent.slavePort.sendTimingSnoopReq(pkt);
}
-MemDelay::SlavePort::SlavePort(const std::string &_name, MemDelay &_parent)
+MemDelay::ResponsePort::
+ResponsePort(const std::string &_name, MemDelay &_parent)
: QueuedSlavePort(_name, &_parent, _parent.respQueue),
parent(_parent)
{
}
Tick
-MemDelay::SlavePort::recvAtomic(PacketPtr pkt)
+MemDelay::ResponsePort::recvAtomic(PacketPtr pkt)
{
const Tick delay = parent.delayReq(pkt) + parent.delayResp(pkt);
}
bool
-MemDelay::SlavePort::recvTimingReq(PacketPtr pkt)
+MemDelay::ResponsePort::recvTimingReq(PacketPtr pkt)
{
// technically the packet only reaches us after the header
// delay, and typically we also need to deserialise any
}
void
-MemDelay::SlavePort::recvFunctional(PacketPtr pkt)
+MemDelay::ResponsePort::recvFunctional(PacketPtr pkt)
{
if (parent.trySatisfyFunctional(pkt)) {
pkt->makeResponse();
}
bool
-MemDelay::SlavePort::recvTimingSnoopResp(PacketPtr pkt)
+MemDelay::ResponsePort::recvTimingSnoopResp(PacketPtr pkt)
{
const Tick when = curTick() + parent.delaySnoopResp(pkt);
Port &getPort(const std::string &if_name,
PortID idx=InvalidPortID) override;
- class MasterPort : public QueuedMasterPort
+ class RequestPort : public QueuedMasterPort
{
public:
- MasterPort(const std::string &_name, MemDelay &_parent);
+ RequestPort(const std::string &_name, MemDelay &_parent);
protected:
bool recvTimingResp(PacketPtr pkt) override;
MemDelay& parent;
};
- class SlavePort : public QueuedSlavePort
+ class ResponsePort : public QueuedSlavePort
{
public:
- SlavePort(const std::string &_name, MemDelay &_parent);
+ ResponsePort(const std::string &_name, MemDelay &_parent);
protected:
Tick recvAtomic(PacketPtr pkt) override;
bool trySatisfyFunctional(PacketPtr pkt);
- MasterPort masterPort;
- SlavePort slavePort;
+ RequestPort masterPort;
+ ResponsePort slavePort;
ReqPacketQueue reqQueue;
RespPacketQueue respQueue;
// are enumerated starting from zero
for (int i = 0; i < p->port_master_connection_count; ++i) {
std::string portName = csprintf("%s.master[%d]", name(), i);
- MasterPort* bp = new NoncoherentXBarMasterPort(portName, *this, i);
+ RequestPort* bp = new NoncoherentXBarMasterPort(portName, *this, i);
masterPorts.push_back(bp);
reqLayers.push_back(new ReqLayer(*bp, *this,
csprintf("reqLayer%d", i)));
if (p->port_default_connection_count) {
defaultPortID = masterPorts.size();
std::string portName = name() + ".default";
- MasterPort* bp = new NoncoherentXBarMasterPort(portName, *this,
+ RequestPort* bp = new NoncoherentXBarMasterPort(portName, *this,
defaultPortID);
masterPorts.push_back(bp);
reqLayers.push_back(new ReqLayer(*bp, *this, csprintf("reqLayer%d",
NoncoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
{
// determine the source port based on the id
- SlavePort *src_port = slavePorts[slave_port_id];
+ ResponsePort *src_port = slavePorts[slave_port_id];
// we should never see express snoops on a non-coherent crossbar
assert(!pkt->isExpressSnoop());
NoncoherentXBar::recvTimingResp(PacketPtr pkt, PortID master_port_id)
{
// determine the source port based on the id
- MasterPort *src_port = masterPorts[master_port_id];
+ RequestPort *src_port = masterPorts[master_port_id];
// determine the destination
const auto route_lookup = routeTo.find(pkt->req);
* instantiated for each of the slave ports connecting to the
* crossbar.
*/
- class NoncoherentXBarMasterPort : public MasterPort
+ class NoncoherentXBarMasterPort : public RequestPort
{
private:
NoncoherentXBarMasterPort(const std::string &_name,
NoncoherentXBar &_xbar, PortID _id)
- : MasterPort(_name, &_xbar, _id), xbar(_xbar)
+ : RequestPort(_name, &_xbar, _id), xbar(_xbar)
{ }
protected:
}
}
-ReqPacketQueue::ReqPacketQueue(EventManager& _em, MasterPort& _masterPort,
+ReqPacketQueue::ReqPacketQueue(EventManager& _em, RequestPort& _masterPort,
const std::string _label)
: PacketQueue(_em, _label, name(_masterPort, _label)),
masterPort(_masterPort)
}
SnoopRespPacketQueue::SnoopRespPacketQueue(EventManager& _em,
- MasterPort& _masterPort,
+ RequestPort& _masterPort,
bool force_order,
const std::string _label)
: PacketQueue(_em, _label, name(_masterPort, _label), force_order),
return masterPort.sendTimingSnoopResp(pkt);
}
-RespPacketQueue::RespPacketQueue(EventManager& _em, SlavePort& _slavePort,
+RespPacketQueue::RespPacketQueue(EventManager& _em, ResponsePort& _slavePort,
bool force_order,
const std::string _label)
: PacketQueue(_em, _label, name(_slavePort, _label), force_order),
protected:
- MasterPort& masterPort;
+ RequestPort& masterPort;
// Static definition so it can be called when constructing the parent
// without us being completely initialized.
- static const std::string name(const MasterPort& masterPort,
+ static const std::string name(const RequestPort& masterPort,
const std::string& label)
{ return masterPort.name() + "-" + label; }
* @param _masterPort Master port used to send the packets
* @param _label Label to push on the label stack for print request packets
*/
- ReqPacketQueue(EventManager& _em, MasterPort& _masterPort,
+ ReqPacketQueue(EventManager& _em, RequestPort& _masterPort,
const std::string _label = "ReqPacketQueue");
virtual ~ReqPacketQueue() { }
protected:
- MasterPort& masterPort;
+ RequestPort& masterPort;
// Static definition so it can be called when constructing the parent
// without us being completely initialized.
- static const std::string name(const MasterPort& masterPort,
+ static const std::string name(const RequestPort& masterPort,
const std::string& label)
{ return masterPort.name() + "-" + label; }
* @param force_order Force insertion order for packets with same address
* @param _label Label to push on the label stack for print request packets
*/
- SnoopRespPacketQueue(EventManager& _em, MasterPort& _masterPort,
+ SnoopRespPacketQueue(EventManager& _em, RequestPort& _masterPort,
bool force_order = false,
const std::string _label = "SnoopRespPacketQueue");
protected:
- SlavePort& slavePort;
+ ResponsePort& slavePort;
// Static definition so it can be called when constructing the parent
// without us being completely initialized.
- static const std::string name(const SlavePort& slavePort,
+ static const std::string name(const ResponsePort& slavePort,
const std::string& label)
{ return slavePort.name() + "-" + label; }
* @param force_order Force insertion order for packets with same address
* @param _label Label to push on the label stack for print request packets
*/
- RespPacketQueue(EventManager& _em, SlavePort& _slavePort,
+ RespPacketQueue(EventManager& _em, ResponsePort& _slavePort,
bool force_order = false,
const std::string _label = "RespPacketQueue");
PortProxy(SendFunctionalFunc func, unsigned int cacheLineSize) :
sendFunctional(func), _cacheLineSize(cacheLineSize)
{}
- PortProxy(const MasterPort &port, unsigned int cacheLineSize) :
+ PortProxy(const RequestPort &port, unsigned int cacheLineSize) :
sendFunctional([&port](PacketPtr pkt)->void {
port.sendFunctional(pkt);
}), _cacheLineSize(cacheLineSize)
type = 'QoSMemSinkCtrl'
cxx_header = "mem/qos/mem_sink.hh"
cxx_class = "QoS::MemSinkCtrl"
- port = SlavePort("Slave ports")
+ port = ResponsePort("Response ports")
# the basic configuration of the controller architecture, note
# that each entry corresponds to a burst for the specific DRAM
* queue is a parameter to allow tailoring of the queue implementation
* (used in the cache).
*/
-class QueuedSlavePort : public SlavePort
+class QueuedSlavePort : public ResponsePort
{
protected:
*/
QueuedSlavePort(const std::string& name, SimObject* owner,
RespPacketQueue &resp_queue, PortID id = InvalidPortID) :
- SlavePort(name, owner, id), respQueue(resp_queue)
+ ResponsePort(name, owner, id), respQueue(resp_queue)
{ }
virtual ~QueuedSlavePort() { }
* independent, and so each queue manages its own flow control
* (retries).
*/
-class QueuedMasterPort : public MasterPort
+class QueuedMasterPort : public RequestPort
{
protected:
ReqPacketQueue &req_queue,
SnoopRespPacketQueue &snoop_resp_queue,
PortID id = InvalidPortID) :
- MasterPort(name, owner, id), reqQueue(req_queue),
+ RequestPort(name, owner, id), reqQueue(req_queue),
snoopRespQueue(snoop_resp_queue)
{ }
random delays if RubySystem \
randomization flag is True)")
- master = MasterPort("Master port to MessageBuffer receiver")
- slave = SlavePort("Slave port from MessageBuffer sender")
+ master = RequestPort("Master port to MessageBuffer receiver")
+ slave = ResponsePort("Slave port from MessageBuffer sender")
AbstractController::MemoryPort::MemoryPort(const std::string &_name,
AbstractController *_controller,
PortID id)
- : MasterPort(_name, _controller, id), controller(_controller)
+ : RequestPort(_name, _controller, id), controller(_controller)
{
}
* Port that forwards requests and receives responses from the
* memory controller.
*/
- class MemoryPort : public MasterPort
+ class MemoryPort : public RequestPort
{
private:
// Controller that operates this port.
Param.Cycles(1, "Default latency for requests added to the " \
"mandatory queue on top-level controllers")
- memory = MasterPort("Port for attaching a memory controller")
+ memory = RequestPort("Port for attaching a memory controller")
system = Param.System(Parent.any, "system object parameter")
slave = VectorSlavePort("CPU slave port")
master = VectorMasterPort("CPU master port")
- pio_master_port = MasterPort("Ruby mem master port")
- mem_master_port = MasterPort("Ruby mem master port")
- pio_slave_port = SlavePort("Ruby pio slave port")
- mem_slave_port = SlavePort("Ruby memory port")
+ pio_master_port = RequestPort("Ruby mem master port")
+ mem_master_port = RequestPort("Ruby mem master port")
+ pio_slave_port = ResponsePort("Ruby pio slave port")
+ mem_slave_port = ResponsePort("Ruby memory port")
using_ruby_tester = Param.Bool(False, "")
no_retry_on_stall = Param.Bool(False, "")
Cycles _delay, int _resp_limit,
const std::vector<AddrRange>&
_ranges)
- : SlavePort(_name, &_serial_link), serial_link(_serial_link),
+ : ResponsePort(_name, &_serial_link), serial_link(_serial_link),
masterPort(_masterPort), delay(_delay),
ranges(_ranges.begin(), _ranges.end()),
outstandingResponses(0), retryReq(false),
_name, SerialLink& _serial_link,
SerialLinkSlavePort& _slavePort,
Cycles _delay, int _req_limit)
- : MasterPort(_name, &_serial_link), serial_link(_serial_link),
+ : RequestPort(_name, &_serial_link), serial_link(_serial_link),
slavePort(_slavePort), delay(_delay), reqQueueLimit(_req_limit),
sendEvent([this]{ trySendTiming(); }, _name)
{
* is responsible for. The slave port also has a buffer for the
* responses not yet sent.
*/
- class SerialLinkSlavePort : public SlavePort
+ class SerialLinkSlavePort : public ResponsePort
{
private:
* responses. The master port has a buffer for the requests not
* yet sent.
*/
- class SerialLinkMasterPort : public MasterPort
+ class SerialLinkMasterPort : public RequestPort
{
private:
}
std::pair<SnoopFilter::SnoopList, Cycles>
-SnoopFilter::lookupRequest(const Packet* cpkt, const SlavePort& slave_port)
+SnoopFilter::lookupRequest(const Packet* cpkt, const ResponsePort& slave_port)
{
DPRINTF(SnoopFilter, "%s: src %s packet %s\n", __func__,
slave_port.name(), cpkt->print());
void
SnoopFilter::updateSnoopResponse(const Packet* cpkt,
- const SlavePort& rsp_port,
- const SlavePort& req_port)
+ const ResponsePort& rsp_port,
+ const ResponsePort& req_port)
{
DPRINTF(SnoopFilter, "%s: rsp %s req %s packet %s\n",
__func__, rsp_port.name(), req_port.name(), cpkt->print());
void
SnoopFilter::updateSnoopForward(const Packet* cpkt,
- const SlavePort& rsp_port, const MasterPort& req_port)
+ const ResponsePort& rsp_port, const RequestPort& req_port)
{
DPRINTF(SnoopFilter, "%s: rsp %s req %s packet %s\n",
__func__, rsp_port.name(), req_port.name(), cpkt->print());
}
void
-SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port)
+SnoopFilter::updateResponse(const Packet* cpkt, const ResponsePort& slave_port)
{
DPRINTF(SnoopFilter, "%s: src %s packet %s\n",
__func__, slave_port.name(), cpkt->print());
* @return Pair of a vector of snoop target ports and lookup latency.
*/
std::pair<SnoopList, Cycles> lookupRequest(const Packet* cpkt,
- const SlavePort& slave_port);
+ const ResponsePort& slave_port);
/**
* For an un-successful request, revert the change to the snoop
* additional steering thanks to the snoop filter.
*
* @param cpkt Pointer to const Packet containing the snoop.
- * @return Pair with a vector of SlavePorts that need snooping and a lookup
- * latency.
+ * @return Pair with a vector of ResponsePorts that need snooping and a
+ * lookup latency.
*/
std::pair<SnoopList, Cycles> lookupSnoop(const Packet* cpkt);
* will update the corresponding state in the filter.
*
* @param cpkt Pointer to const Packet holding the snoop response.
- * @param rsp_port SlavePort that sends the response.
- * @param req_port SlavePort that made the original request and is the
+ * @param rsp_port ResponsePort that sends the response.
+ * @param req_port ResponsePort that made the original request and is the
* destination of the snoop response.
*/
- void updateSnoopResponse(const Packet *cpkt, const SlavePort& rsp_port,
- const SlavePort& req_port);
+ void updateSnoopResponse(const Packet *cpkt, const ResponsePort& rsp_port,
+ const ResponsePort& req_port);
/**
* Pass snoop responses that travel downward through the snoop
* additional routing happens.
*
* @param cpkt Pointer to const Packet holding the snoop response.
- * @param rsp_port SlavePort that sends the response.
- * @param req_port MasterPort through which the response is forwarded.
+ * @param rsp_port ResponsePort that sends the response.
+ * @param req_port RequestPort through which the response is forwarded.
*/
- void updateSnoopForward(const Packet *cpkt, const SlavePort& rsp_port,
- const MasterPort& req_port);
+ void updateSnoopForward(const Packet *cpkt, const ResponsePort& rsp_port,
+ const RequestPort& req_port);
/**
* Update the snoop filter with a response from below (outer /
* the snoop filter.
*
* @param cpkt Pointer to const Packet holding the snoop response.
- * @param slave_port SlavePort that made the original request and
+ * @param slave_port ResponsePort that made the original request and
* is the target of this response.
*/
- void updateResponse(const Packet *cpkt, const SlavePort& slave_port);
+ void updateResponse(const Packet *cpkt, const ResponsePort& slave_port);
virtual void regStats();
typedef std::bitset<SNOOP_MASK_SIZE> SnoopMask;
/**
- * Per cache line item tracking a bitmask of SlavePorts who have an
+ * Per cache line item tracking a bitmask of ResponsePorts who have an
* outstanding request to this line (requested) or already share a
* cache line with this address (holder).
*/
/**
* Convert a single port to a corresponding, one-hot bitmask
- * @param port SlavePort that should be converted.
+ * @param port ResponsePort that should be converted.
* @return One-hot bitmask corresponding to the port.
*/
- SnoopMask portToMask(const SlavePort& port) const;
+ SnoopMask portToMask(const ResponsePort& port) const;
/**
* Converts a bitmask of ports into the corresponing list of ports
* @param ports SnoopMask of the requested ports
- * @return SnoopList containing all the requested SlavePorts
+ * @return SnoopList containing all the requested ResponsePorts
*/
SnoopList maskToPortList(SnoopMask ports) const;
};
inline SnoopFilter::SnoopMask
-SnoopFilter::portToMask(const SlavePort& port) const
+SnoopFilter::portToMask(const ResponsePort& port) const
{
assert(port.getId() != InvalidPortID);
// if this is not a snooping port, return a zero mask
void
TokenMasterPort::bind(Port &peer)
{
- MasterPort::bind(peer);
+ RequestPort::bind(peer);
}
void
TokenSlavePort::bind(Port& peer)
{
// TokenSlavePort is allowed to bind to either TokenMasterPort or a
- // MasterPort as fallback. If the type is a MasterPort, tokenMasterPort
+ // RequestPort as fallback. If the type is a RequestPort, tokenMasterPort
// is set to nullptr to indicate tokens should not be exchanged.
auto *token_master_port = dynamic_cast<TokenMasterPort*>(&peer);
- auto *master_port = dynamic_cast<MasterPort*>(&peer);
+ auto *master_port = dynamic_cast<RequestPort*>(&peer);
if (!token_master_port && !master_port) {
fatal("Attempt to bind port %s to unsupported slave port %s.",
name(), peer.name());
void
TokenSlavePort::unbind()
{
- SlavePort::responderUnbind();
+ ResponsePort::responderUnbind();
tokenMasterPort = nullptr;
}
"Attempted to retry a response when no retry was queued!\n");
PacketPtr pkt = respQueue.front();
- bool success = SlavePort::sendTimingResp(pkt);
+ bool success = ResponsePort::sendTimingResp(pkt);
if (success) {
respQueue.pop_front();
bool
TokenSlavePort::sendTimingResp(PacketPtr pkt)
{
- bool success = SlavePort::sendTimingResp(pkt);
+ bool success = ResponsePort::sendTimingResp(pkt);
if (!success) {
respQueue.push_back(pkt);
class TokenManager;
class TokenSlavePort;
-class TokenMasterPort : public MasterPort
+class TokenMasterPort : public RequestPort
{
private:
/* Manager to track tokens between this token port pair. */
public:
TokenMasterPort(const std::string& name, SimObject* owner,
PortID id = InvalidPortID) :
- MasterPort(name, owner, id), tokenManager(nullptr)
+ RequestPort(name, owner, id), tokenManager(nullptr)
{ }
/**
void setTokenManager(TokenManager *_tokenManager);
};
-class TokenSlavePort : public SlavePort
+class TokenSlavePort : public ResponsePort
{
private:
TokenMasterPort *tokenMasterPort;
public:
TokenSlavePort(const std::string& name, ClockedObject *owner,
PortID id = InvalidPortID) :
- SlavePort(name, owner, id), tokenMasterPort(nullptr)
+ ResponsePort(name, owner, id), tokenMasterPort(nullptr)
{ }
~TokenSlavePort() { }
/**
* Crossbar layer template instantiations. Could be removed with _impl.hh
- * file, but since there are only two given options (MasterPort and
- * SlavePort) it seems a bit excessive at this point.
+ * file, but since there are only two given options (RequestPort and
+ * ResponsePort) it seems a bit excessive at this point.
*/
-template class BaseXBar::Layer<SlavePort, MasterPort>;
-template class BaseXBar::Layer<MasterPort, SlavePort>;
+template class BaseXBar::Layer<ResponsePort, RequestPort>;
+template class BaseXBar::Layer<RequestPort, ResponsePort>;
/**
* Sending the actual retry, in a manner specific to the
- * individual layers. Note that for a MasterPort, there is
+ * individual layers. Note that for a RequestPort, there is
* both a RequestLayer and a SnoopResponseLayer using the same
* port, but using different functions for the flow control.
*/
};
- class ReqLayer : public Layer<SlavePort, MasterPort>
+ class ReqLayer : public Layer<ResponsePort, RequestPort>
{
public:
/**
* @param _xbar the crossbar this layer belongs to
* @param _name the layer's name
*/
- ReqLayer(MasterPort& _port, BaseXBar& _xbar, const std::string& _name) :
+ ReqLayer(RequestPort& _port, BaseXBar& _xbar,
+ const std::string& _name) :
Layer(_port, _xbar, _name)
{}
protected:
void
- sendRetry(SlavePort* retry_port) override
+ sendRetry(ResponsePort* retry_port) override
{
retry_port->sendRetryReq();
}
};
- class RespLayer : public Layer<MasterPort, SlavePort>
+ class RespLayer : public Layer<RequestPort, ResponsePort>
{
public:
/**
* @param _xbar the crossbar this layer belongs to
* @param _name the layer's name
*/
- RespLayer(SlavePort& _port, BaseXBar& _xbar,
+ RespLayer(ResponsePort& _port, BaseXBar& _xbar,
const std::string& _name) :
Layer(_port, _xbar, _name)
{}
protected:
void
- sendRetry(MasterPort* retry_port) override
+ sendRetry(RequestPort* retry_port) override
{
retry_port->sendRetryResp();
}
};
- class SnoopRespLayer : public Layer<SlavePort, MasterPort>
+ class SnoopRespLayer : public Layer<ResponsePort, RequestPort>
{
public:
/**
* @param _xbar the crossbar this layer belongs to
* @param _name the layer's name
*/
- SnoopRespLayer(MasterPort& _port, BaseXBar& _xbar,
+ SnoopRespLayer(RequestPort& _port, BaseXBar& _xbar,
const std::string& _name) :
Layer(_port, _xbar, _name)
{}
protected:
void
- sendRetry(SlavePort* retry_port) override
+ sendRetry(ResponsePort* retry_port) override
{
retry_port->sendRetrySnoopResp();
}
/** The master and slave ports of the crossbar */
std::vector<QueuedSlavePort*> slavePorts;
- std::vector<MasterPort*> masterPorts;
+ std::vector<RequestPort*> masterPorts;
/** Port that handles requests that don't match any of the interfaces.*/
PortID defaultPortID;