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);
84 req->setReqInstSeqNum(
tester->getActionSeqNum());
87 uint8_t*
data =
new uint8_t[load_size];
91 if (!
port->sendTimingReq(pkt)) {
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),
134 0,
tester->requestorId(), 0,
136 req->setPaddr(address);
137 req->setReqInstSeqNum(
tester->getActionSeqNum());
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];
147 if (!
port->sendTimingReq(pkt)) {
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",
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)
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.
TesterThread(const Params &p)
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
std::string printAddress(Addr addr) const
void validateLoadResp(Location loc, int lane, Value ret_val)
#define panic(...)
This implements a cprintf based panic() function.
const SimObjectParams & _params
Cached copy of the object parameters.
Copyright (c) 2024 Arm Limited 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.