Go to the documentation of this file.
36 #include "debug/ProtocolTest.hh"
63 for (
int lane = 0; lane <
numLanes; ++lane) {
70 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Load - Addr %s\n",
74 int load_size =
sizeof(
Value);
77 assert(address % load_size == 0);
79 auto req = std::make_shared<Request>(address, load_size,
82 req->setPaddr(address);
88 uint8_t*
data =
new uint8_t[load_size];
96 panic(
"Not expected failed sendTimingReq\n");
114 for (
int lane = 0; lane <
numLanes; ++lane) {
125 assert(address %
sizeof(
Value) == 0);
127 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Store - Addr %s - "
132 auto req = std::make_shared<Request>(address,
sizeof(
Value),
135 req->setPaddr(address);
141 uint8_t *writeData =
new uint8_t[
sizeof(
Value)];
142 for (
int j = 0;
j <
sizeof(
Value); ++
j) {
143 writeData[
j] = ((uint8_t*)&new_value)[
j];
152 panic(
"Not expecting a failed sendTimingReq\n");
175 for (
int lane = 0; lane <
numLanes; ++lane) {
177 assert(location >= 0);
181 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Atomic_Inc - Addr %s\n",
186 assert(address %
sizeof(
Value) == 0);
188 auto req = std::make_shared<Request>(address,
sizeof(
Value),
192 req->setPaddr(address);
198 uint8_t*
data =
new uint8_t[
sizeof(
Value)];
203 panic(
"Not expecting failed sendTimingReq\n");
217 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Acquire\n", this->
getName(),
227 auto acq_req = std::make_shared<Request>(0, 0, 0,
230 acq_req->setPaddr(0);
243 panic(
"Not expecting failed sendTimingReq\n");
250 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Release\n", this->
getName(),
270 DPRINTF(ProtocolTest,
"%s Episode %d: hitCallback - Command %s - "
276 bool isTransactionDone =
true;
321 isTransactionDone =
false;
351 panic(
"Unsupported MemCmd response type");
354 if (isTransactionDone) {
Tick curTick()
The universal simulation clock.
void setDesc(std::string _description)
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
virtual void issueReleaseOp()
GpuWavefrontParams Params
AddressManager::Value Value
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
std::string printAddress(Addr addr)
GpuWavefront(const Params &p)
ProtocolTester::SeqPort * port
const Episode::Action * curAction
const std::string to_string(sc_enc enc)
OutstandingReqTable outstandingAtomics
TesterThreadEvent threadEvent
AddressManager::Location Location
RequestorID requestorId()
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
const std::string & getName() const
OutstandingReqTable outstandingStores
OutstandingReq popOutstandingReq(OutstandingReqTable &req_table, Addr address)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
ProbePointArg< PacketInfo > Packet
Packet probe point.
void validateLoadResp(Location loc, int lane, Value ret_val)
std::shared_ptr< Request > RequestPtr
void updateLogTable(Location loc, int threadId, int episodeId, Value new_value, Tick curTick, int cuId=-1)
static const int INVALID_VALUE
virtual void setExtraRequestFlags(RequestPtr req)
MemCmd cmd
The command field of the packet.
Location getLocation(int lane) const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
AddressManager * addrManager
SenderState * senderState
This packet's sender state.
static const int INVALID_LOCATION
void addOutstandingReqs(OutstandingReqTable &req_table, Addr addr, int lane, Location loc, Value stored_val=AddressManager::INVALID_VALUE)
OutstandingReqTable outstandingLoads
const std::string & toString() const
Return the string to a cmd given by idx.
virtual void hitCallback(PacketPtr pkt)
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
virtual void issueAcquireOp()
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
void validateAtomicResp(Location loc, int lane, Value ret_val)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Value getLoggedValue(Location loc) const
bool scheduled() const
Determine if the current event is scheduled.
#define panic(...)
This implements a cprintf based panic() function.
Addr getAddress(Location loc)
RubyTester::SenderState SenderState
T * getPtr()
get a pointer to the data ptr.
Generated on Wed Jul 28 2021 12:10:25 for gem5 by doxygen 1.8.17