Go to the documentation of this file.
34 #include "debug/RubyTest.hh"
41 : m_num_writers(_num_writers), m_num_readers(_num_readers),
51 RubyAccessMode_NUM - 1));
58 DPRINTF(RubyTest,
"initiating\n");
72 }
else if (
m_status == TesterStatus_Ready) {
77 "initiating action/check - failed: action/check is pending\n");
84 DPRINTF(RubyTest,
"initiating prefetch\n");
113 req->setContext(
index);
119 uint8_t *
data =
new uint8_t[1];
127 DPRINTF(RubyTest,
"successfully initiated prefetch.\n");
134 "prefetch initiation failed because Port was busy.\n");
142 DPRINTF(RubyTest,
"initiating Flush\n");
164 DPRINTF(RubyTest,
"initiating Flush - successful\n");
171 DPRINTF(RubyTest,
"initiating Action\n");
172 assert(
m_status == TesterStatus_Idle);
187 req->setContext(
index);
198 uint8_t *writeData =
new uint8_t[1];
202 DPRINTF(RubyTest,
"Seq write: index %d data 0x%x check 0x%x\n",
index,
210 DPRINTF(RubyTest,
"initiating action - successful\n");
211 DPRINTF(RubyTest,
"status before action update: %s\n",
212 (TesterStatus_to_string(
m_status)).c_str());
213 m_status = TesterStatus_Action_Pending;
222 DPRINTF(RubyTest,
"failed to initiate action - sequencer not ready\n");
225 DPRINTF(RubyTest,
"status after action update: %s\n",
226 (TesterStatus_to_string(
m_status)).c_str());
232 DPRINTF(RubyTest,
"Initiating Check\n");
233 assert(
m_status == TesterStatus_Ready);
252 req->setContext(
index);
264 DPRINTF(RubyTest,
"initiating check - successful\n");
265 DPRINTF(RubyTest,
"status before check update: %s\n",
266 TesterStatus_to_string(
m_status).c_str());
267 m_status = TesterStatus_Check_Pending;
276 DPRINTF(RubyTest,
"failed to initiate check - cpu port not ready\n");
279 DPRINTF(RubyTest,
"status after check update: %s\n",
280 TesterStatus_to_string(
m_status).c_str());
292 assert(
data != NULL);
294 DPRINTF(RubyTest,
"RubyTester Callback\n");
297 if (
m_status == TesterStatus_Action_Pending) {
298 DPRINTF(RubyTest,
"Action callback write value: %d, currently %d\n",
308 DPRINTF(RubyTest,
"Check %#x, State=Idle store_count: %d\n",
311 DPRINTF(RubyTest,
"Action callback return data now %d\n",
313 }
else if (
m_status == TesterStatus_Check_Pending) {
314 DPRINTF(RubyTest,
"Check callback\n");
316 for (
int byte_number=0; byte_number<
CHECK_SIZE; byte_number++) {
317 if (uint8_t(
m_value + byte_number) !=
data->getByte(byte_number)) {
318 panic(
"Action/check failure: proc: %d address: %#x data: %s "
319 "byte_number: %d m_value+byte_number: %d byte: %d %s"
321 proc, address,
data, byte_number,
323 (
int)
data->getByte(byte_number), *
this, curTime);
326 DPRINTF(RubyTest,
"Action/check success\n");
337 panic(
"Unexpected TesterStatus: %s proc: %d data: %s m_status: %s "
341 DPRINTF(RubyTest,
"proc: %d, Address: 0x%x\n", proc,
343 DPRINTF(RubyTest,
"Callback done\n");
360 assert(
m_status == TesterStatus_Idle);
371 DPRINTF(RubyTest,
"Check %#x, State=Idle, picked initiating node %d\n",
381 << (int)
m_value <<
", status: "
382 <<
m_status <<
", initiating node: "
385 <<
"]" << std::flush;
392 "[%#x, value: %d, status: %s, initiating node: %d, store_count: %d]\n",
void pickInitiatingNode()
Addr makeLineAddress(Addr addr)
RequestorID requestorId()
void incrementCheckCompletions()
void performCallback(NodeID proc, SubBlock *data, Cycles curTime)
std::shared_ptr< Request > RequestPtr
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
RequestPort * getWritableCpuPort(int idx)
@ INST_FETCH
The request was an instruction fetch.
bool isInstDataCpuPort(int idx)
Command
List of all commands associated with a packet.
RubyTester * m_tester_ptr
RequestPort * getReadableCpuPort(int idx)
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
@ PREFETCH
The request is a prefetch.
RubyTester::SenderState SenderState
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
bool isInstOnlyCpuPort(int idx)
void print(std::ostream &out) const
ProbePointArg< PacketInfo > Packet
Packet probe point.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
RubyAccessMode m_access_mode
Check(Addr address, Addr pc, int _num_writers, int _num_readers, RubyTester *_tester)
@ PF_EXCLUSIVE
The request should be prefetched into the exclusive state.
void changeAddress(Addr address)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Cycles is a wrapper class for representing cycle counts, i.e.
std::enable_if< std::is_integral< T >::value, T >::type random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
SenderState * senderState
This packet's sender state.
const T * getConstPtr() const
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17