tracer = Param.InstTracer(default_tracer, "Instruction tracer")
- icache_port = MasterPort("Instruction Port")
- dcache_port = MasterPort("Data Port")
+ icache_port = RequestPort("Instruction Port")
+ dcache_port = RequestPort("Data Port")
_cached_ports = ['icache_port', 'dcache_port']
if buildEnv['TARGET_ISA'] in ['x86', 'arm', 'riscv']:
virtual PortProxy::SendFunctionalFunc
getSendFunctional()
{
- auto port = dynamic_cast<MasterPort *>(&getDataPort());
+ auto port = dynamic_cast<RequestPort *>(&getDataPort());
assert(port);
return [port](PacketPtr pkt)->void { port->sendFunctional(pkt); };
}
}
void
-CheckerCPU::setIcachePort(MasterPort *icache_port)
+CheckerCPU::setIcachePort(RequestPort *icache_port)
{
icachePort = icache_port;
}
void
-CheckerCPU::setDcachePort(MasterPort *dcache_port)
+CheckerCPU::setDcachePort(RequestPort *dcache_port)
{
dcachePort = dcache_port;
}
void setSystem(System *system);
- void setIcachePort(MasterPort *icache_port);
+ void setIcachePort(RequestPort *icache_port);
- void setDcachePort(MasterPort *dcache_port);
+ void setDcachePort(RequestPort *dcache_port);
Port &
getDataPort() override
System *systemPtr;
- MasterPort *icachePort;
- MasterPort *dcachePort;
+ RequestPort *icachePort;
+ RequestPort *dcachePort;
ThreadContext *tc;
/**
- * KVM memory port. Uses default MasterPort behavior and provides an
+ * KVM memory port. Uses default RequestPort behavior and provides an
* interface for KVM to transparently submit atomic or timing requests.
*/
- class KVMCpuPort : public MasterPort
+ class KVMCpuPort : public RequestPort
{
public:
KVMCpuPort(const std::string &_name, BaseKvmCPU *_cpu)
- : MasterPort(_name, _cpu), cpu(_cpu), activeMMIOReqs(0)
+ : RequestPort(_name, _cpu), cpu(_cpu), activeMMIOReqs(0)
{ }
/**
* Interface to send Atomic or Timing IO request. Assumes that the pkt
public:
/** Provide a non-protected base class for Minor's Ports as derived
* classes are created by Fetch1 and Execute */
- class MinorCPUPort : public MasterPort
+ class MinorCPUPort : public RequestPort
{
public:
/** The enclosing cpu */
public:
MinorCPUPort(const std::string& name_, MinorCPU &cpu_)
- : MasterPort(name_, &cpu_), cpu(cpu_)
+ : RequestPort(name_, &cpu_), cpu(cpu_)
{ }
};
/**
* IcachePort class for instruction fetch.
*/
- class IcachePort : public MasterPort
+ class IcachePort : public RequestPort
{
protected:
/** Pointer to fetch. */
public:
/** Default constructor. */
IcachePort(DefaultFetch<Impl> *_fetch, FullO3CPU<Impl>* _cpu)
- : MasterPort(_cpu->name() + ".icache_port", _cpu), fetch(_fetch)
+ : RequestPort(_cpu->name() + ".icache_port", _cpu), fetch(_fetch)
{ }
protected:
/** The decoder. */
TheISA::Decoder *decoder[Impl::MaxThreads];
- MasterPort &getInstPort() { return icachePort; }
+ RequestPort &getInstPort() { return icachePort; }
private:
DynInstPtr buildInst(ThreadID tid, StaticInstPtr staticInst,
/**
* DcachePort class for the load/store queue.
*/
- class DcachePort : public MasterPort
+ class DcachePort : public RequestPort
{
protected:
public:
/** Default constructor. */
DcachePort(LSQ<Impl> *_lsq, FullO3CPU<Impl>* _cpu)
- : MasterPort(_cpu->name() + ".dcache_port", _cpu), lsq(_lsq),
+ : RequestPort(_cpu->name() + ".dcache_port", _cpu), lsq(_lsq),
cpu(_cpu)
{ }
/** Another store port is in use */
void cachePortBusy(bool is_load);
- MasterPort &getDataPort() { return dcachePort; }
+ RequestPort &getDataPort() { return dcachePort; }
protected:
/** D-cache is blocked */
void regStats();
/** Sets the pointer to the dcache port. */
- void setDcachePort(MasterPort *dcache_port);
+ void setDcachePort(RequestPort *dcache_port);
/** Perform sanity checks after a drain. */
void drainSanityCheck() const;
LSQ *lsq;
/** Pointer to the dcache port. Used only for sending. */
- MasterPort *dcachePort;
+ RequestPort *dcachePort;
/** Particularisation of the LSQSenderState to the LQ. */
class LQSenderState : public LSQSenderState
template<class Impl>
void
-LSQUnit<Impl>::setDcachePort(MasterPort *dcache_port)
+LSQUnit<Impl>::setDcachePort(RequestPort *dcache_port)
{
dcachePort = dcache_port;
}
}
Tick
-AtomicSimpleCPU::sendPacket(MasterPort &port, const PacketPtr &pkt)
+AtomicSimpleCPU::sendPacket(RequestPort &port, const PacketPtr &pkt)
{
return port.sendAtomic(pkt);
}
*/
bool tryCompleteDrain();
- virtual Tick sendPacket(MasterPort &port, const PacketPtr &pkt);
+ virtual Tick sendPacket(RequestPort &port, const PacketPtr &pkt);
/**
* An AtomicCPUPort overrides the default behaviour of the
* also provides an implementation for the purely virtual timing
* functions and panics on either of these.
*/
- class AtomicCPUPort : public MasterPort
+ class AtomicCPUPort : public RequestPort
{
public:
AtomicCPUPort(const std::string &_name, BaseSimpleCPU* _cpu)
- : MasterPort(_name, _cpu)
+ : RequestPort(_name, _cpu)
{ }
protected:
}
Tick
-NonCachingSimpleCPU::sendPacket(MasterPort &port, const PacketPtr &pkt)
+NonCachingSimpleCPU::sendPacket(RequestPort &port, const PacketPtr &pkt)
{
if (system->isMemAddr(pkt->getAddr())) {
system->getPhysMem().access(pkt);
void verifyMemoryMode() const override;
protected:
- Tick sendPacket(MasterPort &port, const PacketPtr &pkt) override;
+ Tick sendPacket(RequestPort &port, const PacketPtr &pkt) override;
};
#endif // __CPU_SIMPLE_NONCACHING_HH__
* scheduling of handling of incoming packets in the following
* cycle.
*/
- class TimingCPUPort : public MasterPort
+ class TimingCPUPort : public RequestPort
{
public:
TimingCPUPort(const std::string& _name, TimingSimpleCPU* _cpu)
- : MasterPort(_name, _cpu), cpu(_cpu),
+ : RequestPort(_name, _cpu), cpu(_cpu),
retryRespEvent([this]{ sendRetryResp(); }, name())
{ }
bool
InvalidateGenerator::initiate()
{
- MasterPort* port;
+ RequestPort* port;
Request::Flags flags;
PacketPtr pkt;
Packet::Command cmd;
return true;
}
-MasterPort*
+RequestPort*
RubyDirectedTester::getCpuPort(int idx)
{
assert(idx >= 0 && idx < ports.size());
class RubyDirectedTester : public ClockedObject
{
public:
- class CpuPort : public MasterPort
+ class CpuPort : public RequestPort
{
private:
RubyDirectedTester *tester;
public:
CpuPort(const std::string &_name, RubyDirectedTester *_tester,
PortID _id)
- : MasterPort(_name, _tester, _id), tester(_tester)
+ : RequestPort(_name, _tester, _id), tester(_tester)
{}
protected:
Port &getPort(const std::string &if_name,
PortID idx=InvalidPortID) override;
- MasterPort* getCpuPort(int idx);
+ RequestPort* getCpuPort(int idx);
void init() override;
RubyDirectedTester& operator=(const RubyDirectedTester& obj);
uint64_t m_requests_completed;
- std::vector<MasterPort*> ports;
+ std::vector<RequestPort*> ports;
uint64_t m_requests_to_complete;
DirectedGenerator* generator;
};
DPRINTF(DirectedTest, "initiating request\n");
assert(m_status == SeriesRequestGeneratorStatus_Thinking);
- MasterPort* port = m_directed_tester->getCpuPort(m_active_node);
+ RequestPort* port = m_directed_tester->getCpuPort(m_active_node);
Request::Flags flags;
protected:
EventFunctionWrapper tickEvent;
- class CpuPort : public MasterPort
+ class CpuPort : public RequestPort
{
GarnetSyntheticTraffic *tester;
public:
CpuPort(const std::string &_name, GarnetSyntheticTraffic *_tester)
- : MasterPort(_name, _tester), tester(_tester)
+ : RequestPort(_name, _tester), tester(_tester)
{ }
protected:
after decimal point")
response_limit = Param.Cycles(5000000, "Cycles before exiting \
due to lack of progress")
- test = MasterPort("Port to the memory system to test")
+ test = RequestPort("Port to the memory system to test")
system = Param.System(Parent.any, "System we belong to")
progress_check = Param.Cycles(5000000, "Cycles before exiting " \
"due to lack of progress")
- port = MasterPort("Port to the memory system")
+ port = RequestPort("Port to the memory system")
system = Param.System(Parent.any, "System this tester is part of")
# Add the ability to supress error responses on functional
EventFunctionWrapper noResponseEvent;
- class CpuPort : public MasterPort
+ class CpuPort : public RequestPort
{
MemTest &memtest;
public:
CpuPort(const std::string &_name, MemTest &_memtest)
- : MasterPort(_name, &_memtest), memtest(_memtest)
+ : RequestPort(_name, &_memtest), memtest(_memtest)
{ }
protected:
DPRINTF(RubyTest, "initiating prefetch\n");
int index = random_mt.random(0, m_num_readers - 1);
- MasterPort* port = m_tester_ptr->getReadableCpuPort(index);
+ RequestPort* port = m_tester_ptr->getReadableCpuPort(index);
Request::Flags flags;
flags.set(Request::PREFETCH);
DPRINTF(RubyTest, "initiating Flush\n");
int index = random_mt.random(0, m_num_writers - 1);
- MasterPort* port = m_tester_ptr->getWritableCpuPort(index);
+ RequestPort* port = m_tester_ptr->getWritableCpuPort(index);
Request::Flags flags;
assert(m_status == TesterStatus_Idle);
int index = random_mt.random(0, m_num_writers - 1);
- MasterPort* port = m_tester_ptr->getWritableCpuPort(index);
+ RequestPort* port = m_tester_ptr->getWritableCpuPort(index);
Request::Flags flags;
assert(m_status == TesterStatus_Ready);
int index = random_mt.random(0, m_num_readers - 1);
- MasterPort* port = m_tester_ptr->getReadableCpuPort(index);
+ RequestPort* port = m_tester_ptr->getReadableCpuPort(index);
Request::Flags flags;
(idx < (m_num_inst_only_ports + m_num_inst_data_ports)));
}
-MasterPort*
+RequestPort*
RubyTester::getReadableCpuPort(int idx)
{
assert(idx >= 0 && idx < readPorts.size());
return readPorts[idx];
}
-MasterPort*
+RequestPort*
RubyTester::getWritableCpuPort(int idx)
{
assert(idx >= 0 && idx < writePorts.size());
class RubyTester : public ClockedObject
{
public:
- class CpuPort : public MasterPort
+ class CpuPort : public RequestPort
{
private:
RubyTester *tester;
CpuPort(const std::string &_name, RubyTester *_tester, PortID _id,
PortID _index)
- : MasterPort(_name, _tester, _id), tester(_tester),
+ : RequestPort(_name, _tester, _id), tester(_tester),
globalIdx(_index)
{}
bool isInstOnlyCpuPort(int idx);
bool isInstDataCpuPort(int idx);
- MasterPort* getReadableCpuPort(int idx);
- MasterPort* getWritableCpuPort(int idx);
+ RequestPort* getReadableCpuPort(int idx);
+ RequestPort* getWritableCpuPort(int idx);
void init() override;
int m_num_cpus;
uint64_t m_checks_completed;
- std::vector<MasterPort*> writePorts;
- std::vector<MasterPort*> readPorts;
+ std::vector<RequestPort*> writePorts;
+ std::vector<RequestPort*> readPorts;
uint64_t m_checks_to_complete;
int m_deadlock_threshold;
int m_num_writers;
cxx_header = "cpu/testers/traffic_gen/traffic_gen.hh"
# Port used for sending requests and receiving responses
- port = MasterPort("Master port")
+ port = RequestPort("Master port")
# System used to determine the mode of the memory system
system = Param.System(Parent.any, "System this generator is part of")
/** Master port specialisation for the traffic generator */
- class TrafficGenPort : public MasterPort
+ class TrafficGenPort : public RequestPort
{
public:
TrafficGenPort(const std::string& name, BaseTrafficGen& traffic_gen)
- : MasterPort(name, &traffic_gen), trafficGen(traffic_gen)
+ : RequestPort(name, &traffic_gen), trafficGen(traffic_gen)
{ }
protected:
/**
* IcachePort class that interfaces with L1 Instruction Cache.
*/
- class IcachePort : public MasterPort
+ class IcachePort : public RequestPort
{
public:
/** Default constructor. */
IcachePort(TraceCPU* _cpu)
- : MasterPort(_cpu->name() + ".icache_port", _cpu),
+ : RequestPort(_cpu->name() + ".icache_port", _cpu),
owner(_cpu)
{ }
/**
* DcachePort class that interfaces with L1 Data Cache.
*/
- class DcachePort : public MasterPort
+ class DcachePort : public RequestPort
{
public:
/** Default constructor. */
DcachePort(TraceCPU* _cpu)
- : MasterPort(_cpu->name() + ".dcache_port", _cpu),
+ : RequestPort(_cpu->name() + ".dcache_port", _cpu),
owner(_cpu)
{ }
public:
/* Constructor */
FixedRetryGen(TraceCPU& _owner, const std::string& _name,
- MasterPort& _port, MasterID master_id,
+ RequestPort& _port, MasterID master_id,
const std::string& trace_file)
: owner(_owner),
port(_port),
TraceCPU& owner;
/** Reference of the port to be used to issue memory requests. */
- MasterPort& port;
+ RequestPort& port;
/** MasterID used for the requests being sent. */
const MasterID masterID;
public:
/* Constructor */
ElasticDataGen(TraceCPU& _owner, const std::string& _name,
- MasterPort& _port, MasterID master_id,
+ RequestPort& _port, MasterID master_id,
const std::string& trace_file, TraceCPUParams *params)
: owner(_owner),
port(_port),
TraceCPU& owner;
/** Reference of the port to be used to issue memory requests. */
- MasterPort& port;
+ RequestPort& port;
/** MasterID used for the requests being sent. */
const MasterID masterID;