Go to the documentation of this file.
36 #include "debug/ProtocolTest.hh"
60 for (
int lane = 0; lane <
numLanes; ++lane) {
67 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Load - Addr %s\n",
71 int load_size =
sizeof(
Value);
74 assert(address % load_size == 0);
76 auto req = std::make_shared<Request>(address, load_size,
79 req->setPaddr(address);
85 uint8_t*
data =
new uint8_t[load_size];
93 panic(
"Not expected failed sendTimingReq\n");
111 for (
int lane = 0; lane <
numLanes; ++lane) {
122 assert(address %
sizeof(
Value) == 0);
124 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Store - Addr %s - "
129 auto req = std::make_shared<Request>(address,
sizeof(
Value),
132 req->setPaddr(address);
138 uint8_t *writeData =
new uint8_t[
sizeof(
Value)];
139 for (
int j = 0;
j <
sizeof(
Value); ++
j) {
140 writeData[
j] = ((uint8_t*)&new_value)[
j];
149 panic(
"Not expecting a failed sendTimingReq\n");
172 for (
int lane = 0; lane <
numLanes; ++lane) {
174 assert(location >= 0);
178 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Atomic_Inc - Addr %s\n",
183 assert(address %
sizeof(
Value) == 0);
185 auto req = std::make_shared<Request>(address,
sizeof(
Value),
189 req->setPaddr(address);
195 uint8_t*
data =
new uint8_t[
sizeof(
Value)];
200 panic(
"Not expecting failed sendTimingReq\n");
214 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Acquire\n", this->
getName(),
224 auto acq_req = std::make_shared<Request>(0, 0, 0,
227 acq_req->setPaddr(0);
240 panic(
"Not expecting failed sendTimingReq\n");
247 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Release\n", this->
getName(),
267 DPRINTF(ProtocolTest,
"%s Episode %d: hitCallback - Command %s - "
273 bool isTransactionDone =
true;
318 isTransactionDone =
false;
348 panic(
"Unsupported MemCmd response type");
351 if (isTransactionDone) {
Location getLocation(int lane) const
RequestorID requestorId()
OutstandingReqTable outstandingStores
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
@ INV_L1
mem_sync_op flags
bool scheduled() const
Determine if the current event is scheduled.
AddressManager::Value Value
void setDesc(std::string _description)
Addr getAddress(Location loc)
const std::string to_string(sc_enc enc)
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
std::shared_ptr< Request > RequestPtr
virtual void setExtraRequestFlags(RequestPtr req)
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
AddressManager * addrManager
GpuWavefrontParams Params
virtual void hitCallback(PacketPtr pkt)
OutstandingReqTable outstandingLoads
virtual void issueReleaseOp()
Value getLoggedValue(Location loc) const
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
const std::string & toString() const
Return the string to a cmd given by idx.
virtual void issueAcquireOp()
RubyTester::SenderState SenderState
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
const Episode::Action * curAction
OutstandingReq popOutstandingReq(OutstandingReqTable &req_table, Addr address)
AddressManager::Location Location
ProbePointArg< PacketInfo > Packet
Packet probe point.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void validateAtomicResp(Location loc, int lane, Value ret_val)
MemCmd cmd
The command field of the packet.
OutstandingReqTable outstandingAtomics
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
TesterThreadEvent threadEvent
T * getPtr()
get a pointer to the data ptr.
Tick curTick()
The universal simulation clock.
SenderState * senderState
This packet's sender state.
void addOutstandingReqs(OutstandingReqTable &req_table, Addr addr, int lane, Location loc, Value stored_val=AddressManager::INVALID_VALUE)
const std::string & getName() const
void updateLogTable(Location loc, int threadId, int episodeId, Value new_value, Tick curTick, int cuId=-1)
static const int INVALID_LOCATION
GpuWavefront(const Params &p)
std::string printAddress(Addr addr)
ProtocolTester::SeqPort * port
void validateLoadResp(Location loc, int lane, Value ret_val)
#define panic(...)
This implements a cprintf based panic() function.
static const int INVALID_VALUE
Generated on Tue Mar 23 2021 19:41:25 for gem5 by doxygen 1.8.17