34#include "debug/ProtocolTest.hh"
43 ", CU ID = " + std::to_string(
cuId) +
")";
61 for (
int lane = 0; lane <
numLanes; ++lane) {
68 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Load - Addr %s\n",
72 int load_size =
sizeof(
Value);
75 assert(address % load_size == 0);
77 auto req = std::make_shared<Request>(address, load_size,
80 req->setPaddr(address);
86 uint8_t*
data =
new uint8_t[load_size];
94 panic(
"Not expected failed sendTimingReq\n");
112 for (
int lane = 0; lane <
numLanes; ++lane) {
123 assert(address %
sizeof(
Value) == 0);
125 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Store - Addr %s - "
130 auto req = std::make_shared<Request>(address,
sizeof(
Value),
133 req->setPaddr(address);
139 uint8_t *writeData =
new uint8_t[
sizeof(
Value)];
140 for (
int j = 0; j <
sizeof(
Value); ++j) {
141 writeData[j] = ((uint8_t*)&new_value)[j];
150 panic(
"Not expecting a failed sendTimingReq\n");
173 for (
int lane = 0; lane <
numLanes; ++lane) {
175 assert(location >= 0);
179 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Atomic_Inc - Addr %s\n",
184 assert(address %
sizeof(
Value) == 0);
186 auto req = std::make_shared<Request>(address,
sizeof(
Value),
190 req->setPaddr(address);
196 uint8_t*
data =
new uint8_t[
sizeof(
Value)];
201 panic(
"Not expecting failed sendTimingReq\n");
215 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Acquire\n", this->
getName(),
225 auto acq_req = std::make_shared<Request>(0, 0, 0,
228 acq_req->setPaddr(0);
241 panic(
"Not expecting failed sendTimingReq\n");
248 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Release\n", this->
getName(),
268 DPRINTF(ProtocolTest,
"%s Episode %d: hitCallback - Command %s - "
274 bool isTransactionDone =
true;
319 isTransactionDone =
false;
349 panic(
"Unsupported MemCmd response type");
352 if (isTransactionDone) {
Addr getAddress(Location loc)
Value getLoggedValue(Location loc) const
void updateLogTable(Location loc, int threadId, int episodeId, Value new_value, Tick curTick, int cuId=-1)
static const int INVALID_LOCATION
static const int INVALID_VALUE
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
Location getLocation(int lane) const
virtual void issueReleaseOp()
GpuWavefrontParams Params
AddressManager::Value Value
virtual void issueAcquireOp()
virtual void hitCallback(PacketPtr pkt)
AddressManager::Location Location
virtual void setExtraRequestFlags(RequestPtr req)
GpuWavefront(const Params &p)
const std::string & toString() const
Return the string to a cmd given by idx.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
SenderState * senderState
This packet's sender state.
T * getPtr()
get a pointer to the data ptr.
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
MemCmd cmd
The command field of the packet.
RequestorID requestorId()
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
void setDesc(std::string _description)
AddressManager * addrManager
OutstandingReqTable outstandingAtomics
void validateAtomicResp(Location loc, int lane, Value ret_val)
ProtocolTester::SeqPort * port
OutstandingReqTable outstandingStores
void addOutstandingReqs(OutstandingReqTable &req_table, Addr addr, int lane, Location loc, Value stored_val=AddressManager::INVALID_VALUE)
OutstandingReqTable outstandingLoads
OutstandingReq popOutstandingReq(OutstandingReqTable &req_table, Addr address)
const Episode::Action * curAction
TesterThreadEvent threadEvent
const std::string & getName() const
void validateLoadResp(Location loc, int lane, Value ret_val)
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
bool scheduled() const
Determine if the current event is scheduled.
#define panic(...)
This implements a cprintf based panic() function.
std::string printAddress(Addr addr)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< Request > RequestPtr
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.