34#include "debug/ProtocolTest.hh"
71 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Load - Addr %s\n",
75 int load_size =
sizeof(
Value);
78 assert(address % load_size == 0);
80 auto req = std::make_shared<Request>(address, load_size,
83 req->setPaddr(address);
87 uint8_t*
data =
new uint8_t[load_size];
92 panic(
"Not expected failed sendTimingReq\n");
126 assert(address %
sizeof(
Value) == 0);
128 DPRINTF(ProtocolTest,
"%s Episode %d: Issuing Store - Addr %s - "
133 auto req = std::make_shared<Request>(address,
sizeof(
Value),
136 req->setPaddr(address);
140 uint8_t *writeData =
new uint8_t[
sizeof(
Value)];
141 for (
int j = 0; j <
sizeof(
Value); ++j) {
142 writeData[j] = ((uint8_t*)&new_value)[j];
148 panic(
"Not expecting a failed sendTimingReq\n");
163 DPRINTF(ProtocolTest,
"Issuing Atomic Op ...\n");
178 DPRINTF(ProtocolTest,
"Issuing Acquire Op ...\n");
193 DPRINTF(ProtocolTest,
"Issuing Release Op ...\n");
212 DPRINTF(ProtocolTest,
"%s Episode %d: hitCallback - Command %s -"
227 assert(req.
lane == 0);
247 assert(req.
lane == 0);
276 panic(
"UnsupportedMemCmd response type: %s",
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.
DmaThread(const Params &_params)
AddressManager::Location Location
AddressManager::Value Value
void hitCallback(PacketPtr pkt)
Location getLocation(int lane) const
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.
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)
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.
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.