46 #include "debug/DirectedTest.hh" 51 directedStartEvent([this]{
wakeup(); },
"Directed tick",
59 for (
int i = 0;
i <
p->port_cpuPort_connection_count; ++
i) {
70 for (
int i = 0;
i <
ports.size();
i++)
77 assert(
ports.size() > 0);
84 if (if_name !=
"cpuPort") {
88 if (idx >= static_cast<int>(
ports.size())) {
89 panic(
"RubyDirectedTester::getPort: unknown index %d\n", idx);
99 tester->hitCallback(
id, pkt->
getAddr());
111 assert(idx >= 0 && idx <
ports.size());
120 "completed request for proc: %d addr: 0x%x\n",
141 RubyDirectedTesterParams::create()
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
#define panic(...)
This implements a cprintf based panic() function.
Ports are used to interface objects to each other.
MasterPort * getCpuPort(int idx)
virtual void performCallback(uint32_t proc, Addr address)=0
void setDirectedTester(RubyDirectedTester *directed_tester)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
uint64_t m_requests_completed
Tick curTick()
The current simulated tick.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
std::string csprintf(const char *format, const Args &...args)
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
static const Priority CPU_Tick_Pri
CPU ticks must come after other associated CPU events (such as writebacks).
void schedule(Event &event, Tick when)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::vector< MasterPort * > ports
virtual bool initiate()=0
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
EventFunctionWrapper directedStartEvent
RubyDirectedTesterParams Params
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
virtual const std::string name() const
void exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat, bool serialize)
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (...
virtual bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
DirectedGenerator * generator
RubyDirectedTester(const Params *p)
uint64_t m_requests_to_complete
void hitCallback(NodeID proc, Addr addr)