Go to the documentation of this file.
46 #include "debug/DirectedTest.hh"
51 directedStartEvent([this]{
wakeup(); },
"Directed tick",
53 m_requests_to_complete(
p->requests_to_complete),
54 generator(
p->generator)
56 m_requests_completed = 0;
59 for (
int i = 0;
i <
p->port_cpuPort_connection_count; ++
i) {
65 schedule(directedStartEvent, 1);
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);
111 assert(idx >= 0 && idx <
ports.size());
120 "completed request for proc: %d addr: 0x%x\n",
141 RubyDirectedTesterParams::create()
void setDirectedTester(RubyDirectedTester *directed_tester)
uint64_t m_requests_to_complete
DirectedGenerator * generator
static const Priority CPU_Tick_Pri
CPU ticks must come after other associated CPU events (such as writebacks).
uint64_t m_requests_completed
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
std::vector< RequestPort * > ports
virtual void performCallback(uint32_t proc, Addr address)=0
RubyDirectedTester(const Params *p)
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void schedule(Event &event, Tick when)
RubyDirectedTesterParams Params
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
EventFunctionWrapper directedStartEvent
Ports are used to interface objects to each other.
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 initiate()=0
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & name()
RequestPort * getCpuPort(int idx)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void hitCallback(NodeID proc, Addr addr)
RubyDirectedTester * tester
virtual bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
std::string csprintf(const char *format, const Args &...args)
#define panic(...)
This implements a cprintf based panic() function.
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17