Go to the documentation of this file.
49 instRequestorID(params->
system->getRequestorId(this,
"inst")),
50 dataRequestorID(params->
system->getRequestorId(this,
"data")),
51 instTraceFile(params->instTraceFile),
52 dataTraceFile(params->dataTraceFile),
53 icacheGen(*this,
".iside", icachePort, instRequestorID, instTraceFile),
54 dcacheGen(*this,
".dside", dcachePort, dataRequestorID, dataTraceFile,
57 dcacheNextEvent([
this]{ schedDcacheNext(); },
name()),
58 oneTraceComplete(
false),
60 execCompleteEvent(
nullptr),
61 enableEarlyExit(params->enableEarlyExit),
62 progressMsgInterval(params->progressMsgInterval),
63 progressMsgThreshold(params->progressMsgInterval), traceStats(
this)
70 fatal_if(params->sizeROB > UINT16_MAX,
"ROB size set to %d exceeds the "
71 "max. value of %d.\n", params->sizeROB, UINT16_MAX);
72 fatal_if(params->sizeStoreBuffer > UINT16_MAX,
"ROB size set to %d "
73 "exceeds the max. value of %d.\n", params->sizeROB,
75 fatal_if(params->sizeLoadBuffer > UINT16_MAX,
"Load buffer size set to"
76 " %d exceeds the max. value of %d.\n",
77 params->sizeLoadBuffer, UINT16_MAX);
86 TraceCPUParams::create()
113 DPRINTF(TraceCPUInst,
"Instruction fetch request trace file is \"%s\"."
115 DPRINTF(TraceCPUData,
"Data memory request trace file is \"%s\".\n",
127 traceOffset = std::min(first_icache_tick, first_dcache_tick);
128 inform(
"%s: Time offset (tick) found as min of both traces is %lli.\n",
156 DPRINTF(TraceCPUInst,
"IcacheGen event.\n");
162 DPRINTF(TraceCPUInst,
"Scheduling next icacheGen event "
181 DPRINTF(TraceCPUData,
"DcacheGen event.\n");
213 :
Stats::Group(trace),
215 "Number of events scheduled to trigger data request generator"),
217 "Number of events scheduled to trigger instruction request generator"),
218 ADD_STAT(numOps,
"Number of micro-ops simulated by the Trace CPU"),
219 ADD_STAT(cpi,
"Cycles per micro-op used as a proxy for CPI",
220 trace->numCycles / numOps)
226 const std::string& _name)
227 :
Stats::Group(parent, _name.c_str()),
228 ADD_STAT(maxDependents,
"Max number of dependents observed on a node"),
229 ADD_STAT(maxReadyListSize,
"Max size of the ready list observed"),
230 ADD_STAT(numSendAttempted,
"Number of first attempts to send a request"),
231 ADD_STAT(numSendSucceeded,
"Number of successful first attempts"),
232 ADD_STAT(numSendFailed,
"Number of failed first attempts"),
233 ADD_STAT(numRetrySucceeded,
"Number of successful retries"),
234 ADD_STAT(numSplitReqs,
"Number of split requests"),
235 ADD_STAT(numSOLoads,
"Number of strictly ordered loads"),
236 ADD_STAT(numSOStores,
"Number of strictly ordered stores"),
237 ADD_STAT(dataLastTick,
"Last tick simulated from the elastic data trace")
244 DPRINTF(TraceCPUData,
"Initializing data memory request generator "
245 "DcacheGen: elastic issue with retry.\n");
248 panic(
"Trace has %d elements. It must have at least %d elements.\n",
250 DPRINTF(TraceCPUData,
"After 1st read, depGraph size:%d.\n",
254 panic(
"Trace has %d elements. It must have at least %d elements.\n",
256 DPRINTF(TraceCPUData,
"After 2st read, depGraph size:%d.\n",
260 if (
DTRACE(TraceCPUData)) {
264 DPRINTF(TraceCPUData,
"Execute tick of the first dependency free node %lli"
265 " is %d.\n", free_itr->seqNum, free_itr->execTick);
268 return (free_itr->execTick);
274 free_node.execTick -=
offset;
289 DPRINTF(TraceCPUData,
"Reading next window from file.\n");
297 DPRINTF(TraceCPUData,
"Start read: Size of depGraph is %d.\n",
300 uint32_t num_read = 0;
310 DPRINTF(TraceCPUData,
"\tTrace complete!\n");
332 DPRINTF(TraceCPUData,
"End read: Size of depGraph is %d.\n",
337 template<
typename T>
void
339 T& dep_array, uint8_t& num_dep)
341 for (
auto& a_dep : dep_array) {
349 auto parent_itr =
depGraph.find(a_dep);
354 parent_itr->second->dependents.push_back(new_node);
355 auto num_depts = parent_itr->second->dependents.size();
371 DPRINTF(TraceCPUData,
"Execute start occupancy:\n");
372 DPRINTFR(TraceCPUData,
"\tdepGraph = %d, readyList = %d, "
389 DPRINTF(TraceCPUData,
"Removing from depFreeQueue: seq. num "
404 graph_itr =
depGraph.find(free_itr->seqNum);
405 assert(graph_itr !=
depGraph.end());
413 panic(
"Retry packet's seqence number does not match "
414 "the first node in the readyList.\n");
443 DPRINTF(TraceCPUData,
"Node seq. num %lli sent. Waking up "
444 "dependents..\n", node_ptr->
seqNum);
446 auto child_itr = (node_ptr->
dependents).begin();
447 while (child_itr != (node_ptr->
dependents).end()) {
450 if (!(*child_itr)->isStore() &&
451 (*child_itr)->removeRobDep(node_ptr->
seqNum)) {
454 if ((*child_itr)->numRobDep == 0 &&
455 (*child_itr)->numRegDep == 0) {
463 child_itr = node_ptr->
dependents.erase(child_itr);
474 DPRINTF(TraceCPUData,
"Node seq. num %lli done. Waking"
475 " up dependents..\n", node_ptr->
seqNum);
480 if (child->removeDepOnInst(node_ptr->
seqNum)) {
514 if (
DTRACE(TraceCPUData)) {
516 DPRINTF(TraceCPUData,
"Execute end occupancy:\n");
517 DPRINTFR(TraceCPUData,
"\tdepGraph = %d, readyList = %d, "
524 DPRINTF(TraceCPUData,
"Not scheduling an event as expecting a retry"
525 "event from the cache for seq. num %lli.\n",
542 DPRINTF(TraceCPUData,
"Attempting to schedule @%lli.\n",
547 DPRINTF(TraceCPUData,
"Attempting to schedule @%lli.\n",
556 DPRINTF(TraceCPUData,
"\tExecution Complete!\n");
566 DPRINTF(TraceCPUData,
"Executing memory request %lli (phys addr %d, "
567 "virt addr %d, pc %#x, size %d, flags %d).\n",
576 DPRINTF(TraceCPUData,
"Skipping strictly ordered request %lli.\n",
589 if (!(blk_offset + node_ptr->
size <= blk_size)) {
590 node_ptr->
size = blk_size - blk_offset;
595 auto req = std::make_shared<Request>(
597 req->setReqInstSeqNum(node_ptr->
seqNum);
602 req->setPC(node_ptr->
pc);
609 req->setReqInstSeqNum(node_ptr->
seqNum);
613 uint8_t* pkt_data =
new uint8_t[req->getSize()];
618 memset(pkt_data, 0xA, req->getSize());
630 DPRINTF(TraceCPUData,
"Send failed. Saving packet for retry.\n");
647 DPRINTFR(TraceCPUData,
"\t\tseq. num %lli(%s) with rob num %lli is now"
655 DPRINTFR(TraceCPUData,
"\t\tResources available for seq. num %lli. Adding"
656 " to readyList, occupying resources.\n", node_ptr->
seqNum);
668 DPRINTFR(TraceCPUData,
"\t\tResources unavailable for seq. num %lli."
669 " Adding to depFreeQueue.\n", node_ptr->
seqNum);
672 DPRINTFR(TraceCPUData,
"\t\tResources unavailable for seq. num %lli. "
673 "Still pending issue.\n", node_ptr->
seqNum);
693 auto graph_itr =
depGraph.find(pkt->
req->getReqInstSeqNum());
694 assert(graph_itr !=
depGraph.end());
700 DPRINTF(TraceCPUData,
"Load seq. num %lli response received. Waking up"
701 " dependents..\n", node_ptr->
seqNum);
704 if (child->removeDepOnInst(node_ptr->
seqNum)) {
719 if (
DTRACE(TraceCPUData)) {
740 DPRINTF(TraceCPUData,
"Attempting to schedule @%lli.\n",
751 ready_node.
seqNum = seq_num;
770 if (
retryPkt->
req->getReqInstSeqNum() == itr->seqNum)
776 while (!found && itr !=
readyList.end()) {
779 if (exec_tick < itr->execTick)
783 else if (exec_tick == itr->execTick) {
786 if (seq_num < itr->seqNum)
808 DPRINTF(TraceCPUData,
"readyList is empty.\n");
811 DPRINTF(TraceCPUData,
"Printing readyList:\n");
813 auto graph_itr =
depGraph.find(itr->seqNum);
814 GraphNode* node_ptr M5_VAR_USED = graph_itr->second;
815 DPRINTFR(TraceCPUData,
"\t%lld(%s), %lld\n", itr->seqNum,
816 node_ptr->typeToStr(), itr->execTick);
822 uint16_t max_rob, uint16_t max_stores, uint16_t max_loads)
824 sizeStoreBuffer(max_stores),
825 sizeLoadBuffer(max_loads),
826 oldestInFlightRobNum(UINT64_MAX),
838 oldestInFlightRobNum = inFlightNodes.begin()->second;
843 }
else if (new_node->
isStore()) {
853 assert(!inFlightNodes.empty());
854 DPRINTFR(TraceCPUData,
"\tClearing done seq. num %d from inFlightNodes..\n",
857 assert(inFlightNodes.find(done_node->
seqNum) != inFlightNodes.end());
858 inFlightNodes.erase(done_node->
seqNum);
860 if (inFlightNodes.empty()) {
863 oldestInFlightRobNum = UINT64_MAX;
867 oldestInFlightRobNum = inFlightNodes.begin()->second;
870 DPRINTFR(TraceCPUData,
"\tCleared. inFlightNodes.size() = %d, "
871 "oldestInFlightRobNum = %d\n", inFlightNodes.size(),
872 oldestInFlightRobNum);
878 if (done_node->
isLoad()) {
879 assert(numInFlightLoads != 0);
887 releaseStoreBuffer();
894 assert(numInFlightStores != 0);
902 uint16_t num_in_flight_nodes;
903 if (inFlightNodes.empty()) {
904 num_in_flight_nodes = 0;
905 DPRINTFR(TraceCPUData,
"\t\tChecking resources to issue seq. num %lli:"
906 " #in-flight nodes = 0", new_node->
seqNum);
907 }
else if (new_node->
robNum > oldestInFlightRobNum) {
911 num_in_flight_nodes = new_node->
robNum - oldestInFlightRobNum;
912 DPRINTFR(TraceCPUData,
"\t\tChecking resources to issue seq. num %lli:"
913 " #in-flight nodes = %d - %d = %d", new_node->
seqNum,
914 new_node->
robNum, oldestInFlightRobNum, num_in_flight_nodes);
921 num_in_flight_nodes = 0;
922 DPRINTFR(TraceCPUData,
"\t\tChecking resources to issue seq. num %lli:"
923 " new oldestInFlightRobNum = %d, #in-flight nodes ignored",
926 DPRINTFR(TraceCPUData,
", LQ = %d/%d, SQ = %d/%d.\n",
927 numInFlightLoads, sizeLoadBuffer,
928 numInFlightStores, sizeStoreBuffer);
930 if (num_in_flight_nodes >= sizeROB) {
933 if (new_node->
isLoad() && numInFlightLoads >= sizeLoadBuffer) {
936 if (new_node->
isStore() && numInFlightStores >= sizeStoreBuffer) {
945 return (numInFlightStores != 0 || numInFlightLoads != 0);
950 DPRINTFR(TraceCPUData,
"oldestInFlightRobNum = %d, "
951 "LQ = %d/%d, SQ = %d/%d.\n",
952 oldestInFlightRobNum,
953 numInFlightLoads, sizeLoadBuffer,
954 numInFlightStores, sizeStoreBuffer);
958 const std::string& _name)
959 :
Stats::Group(parent, _name.c_str()),
960 ADD_STAT(numSendAttempted,
"Number of first attempts to send a request"),
961 ADD_STAT(numSendSucceeded,
"Number of successful first attempts"),
962 ADD_STAT(numSendFailed,
"Number of failed first attempts"),
963 ADD_STAT(numRetrySucceeded,
"Number of successful retries"),
964 ADD_STAT(instLastTick,
"Last tick simulated from the fixed inst trace")
972 DPRINTF(TraceCPUInst,
"Initializing instruction fetch request generator"
973 " IcacheGen: fixed issue with retry.\n");
979 panic(
"Read of first message in the trace failed.\n");
990 DPRINTF(TraceCPUInst,
"Trying to send retry packet.\n");
994 DPRINTF(TraceCPUInst,
"Retry packet sending failed.\n");
1000 DPRINTF(TraceCPUInst,
"Trying to send packet for currElement.\n");
1009 DPRINTF(TraceCPUInst,
"currElement sending failed.\n");
1020 DPRINTF(TraceCPUInst,
"Packet sent successfully, trying to read next "
1060 DPRINTF(TraceCPUInst,
"inst fetch: %c addr %d pc %#x size %d tick %d\n",
1085 uint8_t* pkt_data =
new uint8_t[req->getSize()];
1089 memset(pkt_data, 0xA, req->getSize());
1107 DPRINTF(TraceCPUInst,
"Icache retry received. Scheduling next IcacheGen"
1108 " event @%lli.\n",
curTick());
1117 DPRINTF(TraceCPUData,
"Dcache retry received. Scheduling next DcacheGen"
1118 " event @%lli.\n",
curTick());
1126 DPRINTF(TraceCPUData,
"Scheduling next DcacheGen event at %lli.\n",
1131 DPRINTF(TraceCPUData,
"Re-scheduling next dcache event from %lli"
1157 DPRINTF(TraceCPUData,
"Received timing response from Dcache.\n");
1181 const std::string& filename,
1182 const double time_multiplier)
1184 timeMultiplier(time_multiplier),
1188 ProtoMessage::InstDepRecordHeader header_msg;
1190 panic(
"Failed to read packet header from %s\n", filename);
1193 panic(
"Trace %s was recorded with a different tick frequency %d\n",
1194 header_msg.tick_freq());
1212 ProtoMessage::InstDepRecord pkt_msg;
1215 element->
seqNum = pkt_msg.seq_num();
1216 element->
type = pkt_msg.type();
1218 element->
compDelay = pkt_msg.comp_delay() * timeMultiplier;
1222 assert((pkt_msg.rob_dep()).size() <= element->
maxRobDep);
1223 for (
int i = 0;
i < (pkt_msg.rob_dep()).size();
i++) {
1231 for (
int i = 0;
i < (pkt_msg.reg_dep()).size();
i++) {
1235 bool duplicate =
false;
1237 duplicate |= (pkt_msg.reg_dep(
i) == element->
robDep[
j]);
1246 if (pkt_msg.has_p_addr())
1247 element->
physAddr = pkt_msg.p_addr();
1251 if (pkt_msg.has_v_addr())
1252 element->
virtAddr = pkt_msg.v_addr();
1256 if (pkt_msg.has_size())
1257 element->
size = pkt_msg.size();
1261 if (pkt_msg.has_flags())
1262 element->
flags = pkt_msg.flags();
1266 if (pkt_msg.has_pc())
1267 element->
pc = pkt_msg.pc();
1273 if (pkt_msg.has_weight()) {
1274 microOpCount += pkt_msg.weight();
1276 element->
robNum = microOpCount;
1287 for (
auto& own_reg_dep : regDep) {
1288 if (own_reg_dep == reg_dep) {
1291 assert(numRegDep > 0);
1293 DPRINTFR(TraceCPUData,
"\tFor %lli: Marking register dependency %lli "
1294 "done.\n", seqNum, reg_dep);
1306 for (
auto& own_rob_dep : robDep) {
1307 if (own_rob_dep == rob_dep) {
1310 assert(numRobDep > 0);
1312 DPRINTFR(TraceCPUData,
"\tFor %lli: Marking ROB dependency %lli "
1313 "done.\n", seqNum, rob_dep);
1322 for (
auto& own_reg_dep : regDep) {
1330 for (
auto& own_rob_dep : robDep) {
1340 if (!removeRobDep(done_seq_num)) {
1344 bool regdep_found M5_VAR_USED = removeRegDep(done_seq_num);
1345 assert(regdep_found);
1348 return (numRobDep == 0 && numRegDep == 0);
1354 DPRINTFR(TraceCPUData,
"%lli", seqNum);
1355 DPRINTFR(TraceCPUData,
",%s", typeToStr());
1356 if (isLoad() || isStore()) {
1358 DPRINTFR(TraceCPUData,
",%i", size);
1359 DPRINTFR(TraceCPUData,
",%i", flags);
1361 DPRINTFR(TraceCPUData,
",%lli", compDelay);
1364 while (robDep[
i] != 0) {
1365 DPRINTFR(TraceCPUData,
",%lli", robDep[
i]);
1370 while (regDep[
i] != 0) {
1371 DPRINTFR(TraceCPUData,
",%lli", regDep[
i]);
1374 auto child_itr = dependents.begin();
1375 DPRINTFR(TraceCPUData,
"dependents:");
1376 while (child_itr != dependents.end()) {
1377 DPRINTFR(TraceCPUData,
":%lli", (*child_itr)->seqNum);
1387 return Record::RecordType_Name(
type);
1394 ProtoMessage::PacketHeader header_msg;
1396 panic(
"Failed to read packet header from %s\n", filename);
1399 panic(
"Trace %s was recorded with a different tick frequency %d\n",
1400 header_msg.tick_freq());
1416 element->
cmd = pkt_msg.
cmd();
1417 element->
addr = pkt_msg.addr();
1419 element->
tick = pkt_msg.tick();
1420 element->
flags = pkt_msg.has_flags() ? pkt_msg.flags() : 0;
1421 element->
pc = pkt_msg.has_pc() ? pkt_msg.pc() : 0;
void completeMemAccess(PacketPtr pkt)
When a load writeback is received, that is when the load completes, release the dependents on it.
const uint64_t progressMsgInterval
Interval of committed instructions specified by the user at which a progress info message is printed.
void schedIcacheNext()
This is the control flow that uses the functionality of the icacheGen to replay the trace.
void addDepsOnParent(GraphNode *new_node, T &dep_array, uint8_t &num_dep)
Iterate over the dependencies of a new node and add the new node to the list of dependents of the par...
void execute()
This is the main execute function which consumes nodes from the sorted readyList.
bool scheduled() const
Determine if the current event is scheduled.
bool removeRobDep(NodeSeqNum rob_dep)
Remove completed instruction from order dependency array.
bool removeDepOnInst(NodeSeqNum done_seq_num)
Check for all dependencies on completed inst.
TraceStats(TraceCPU *trace)
void takeOverFrom(BaseCPU *oldCPU)
Load the state of a CPU from the previous CPU object, invoked on all new CPUs that are about to be sw...
TraceCPU::TraceStats traceStats
Stats::Scalar numSendSucceeded
Stats::Scalar numSchedDcacheEvent
Stats::Scalar numSchedIcacheEvent
std::string typeToStr() const
Return string specifying the type of the node.
virtual Port & getDataPort()=0
Purely virtual method that returns a reference to the data port.
Tick init()
Called from TraceCPU init().
void addToSortedReadyList(NodeSeqNum seq_num, Tick exec_tick)
Add a ready node to the readyList.
int ContextID
Globally unique thread context ID.
Request::FlagsType flags
Potential request flags to use.
CountedExitEvent * execCompleteEvent
A CountedExitEvent which when serviced decrements the counter.
HardwareResource(uint16_t max_rob, uint16_t max_stores, uint16_t max_loads)
Constructor that initializes the sizes of the structures.
unsigned int cacheLineSize() const
Get the cache line size of the system.
void clearRobDep()
Initialize register dependency array to all zeroes.
uint64_t Tick
Tick count type.
bool oneTraceComplete
Set to true when one of the generators finishes replaying its trace.
TraceCPU & owner
Reference of the TraceCPU.
Port & getInstPort()
Used to get a reference to the icache port.
Addr physAddr
The address for the request if any.
void schedDcacheNext()
This is the control flow that uses the functionality of the dcacheGen to replay the trace.
const RequestorID requestorId
RequestorID used for the requests being sent.
RequestPtr req
A pointer to the original request.
void checkAndSchedExitEvent()
This is called when either generator finishes executing from the trace.
bool awaitingResponse() const
Check if there are any outstanding requests, i.e.
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
InputStream trace
Input stream used for reading the input trace file.
NodeRobNum robNum
ROB occupancy number.
std::list< ReadyNode > readyList
List of nodes that are ready to execute.
Struct to store a ready-to-execute node and its execution tick.
Stats::Scalar numSendFailed
Tick when() const
Get the time that the event is scheduled.
HardwareResource hwResource
Hardware resources required to contain in-flight nodes and to throttle issuing of new nodes when reso...
void takeOverFrom(Port *old)
A utility function to make it easier to swap out ports.
Stats::Scalar instLastTick
Last simulated tick by the FixedRetryGen.
FixedRetryGen icacheGen
Instance of FixedRetryGen to replay instruction read requests.
This struct stores a line in the trace file.
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
void adjustInitTraceOffset(Tick &offset)
Adjust traceOffset based on what TraceCPU init() determines on comparing the offsets in the fetch req...
bool traceComplete
Set to true when end of trace is reached.
NodeSeqNum seqNum
Instruction sequence number.
RequestPort & port
Reference of the port to be used to issue memory requests.
bool isStrictlyOrdered() const
Return true if node has a request which is strictly ordered.
Stats::Scalar numSendAttempted
Stats for instruction accesses replayed.
void exit()
Exit the FixedRetryGen.
bool isTraceComplete()
Returns the traceComplete variable which is set when end of the input trace file is reached.
FixedRetryGenStatGroup(Stats::Group *parent, const std::string &_name)
name is the extension to the name for these stats
void dcacheRetryRecvd()
When data cache port receives a retry, schedule event dcacheNextEvent.
RequestPort & port
Reference of the port to be used to issue memory requests.
Stats::Scalar numSendSucceeded
bool nextExecute()
Reads a line of the trace file.
Counter value() const
Return the current value of this stat as its base type.
TraceCPU & owner
Reference of the TraceCPU.
MemCmd cmd
Specifies if the request is to be a read or a write.
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
Stats::Scalar numRetrySucceeded
void recvReqRetry()
Handle a retry signalled by the cache if data access failed in the first attempt.
bool recvTimingResp(PacketPtr pkt)
Receive the timing reponse and call dcacheRecvTimingResp() method of the dcacheGen to handle completi...
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
TraceCPU::ElasticDataGen::ElasticDataGenStatGroup elasticStats
TraceElement currElement
Store an element read from the trace to send as the next packet.
bool recvTimingResp(PacketPtr pkt)
Receive the timing reponse and simply delete the packet since instruction fetch requests are issued a...
static PacketPtr createRead(const RequestPtr &req)
Constructor-like methods that return Packets based on Request objects.
Request::Flags flags
Request flags if any.
bool execComplete
Set true when execution of trace is complete.
void clearRegDep()
Initialize register dependency array to all zeroes.
Tick tick
The time at which the request should be sent.
bool removeRegDep(NodeSeqNum reg_dep)
Remove completed instruction from register dependency array.
Stats::Scalar numSOStores
void printReadyList()
Print readyList for debugging using debug flag TraceCPUData.
std::vector< GraphNode * > dependents
A vector of nodes dependent (outgoing) on this node.
uint64_t compDelay
Computational delay.
TraceCPU(TraceCPUParams *params)
bool isAvailable(const GraphNode *new_node) const
Check if structures required to issue a node are free.
The struct GraphNode stores an instruction in the trace file.
void exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat, bool serialize)
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (...
Tick init()
Called from TraceCPU init().
uint64_t progressMsgThreshold
bool isStore() const
Is the node a store.
Stats::Scalar numSplitReqs
bool readNextWindow()
Reads a line of the trace file.
const bool enableEarlyExit
Exit when any one Trace CPU completes its execution.
std::unordered_map< NodeSeqNum, GraphNode * > depGraph
Store the depGraph of GraphNodes.
EventFunctionWrapper icacheNextEvent
Event for the control flow method schedIcacheNext()
void schedDcacheNextEvent(Tick when)
Schedule event dcacheNextEvent at the given tick.
ProbePointArg< PacketInfo > Packet
Packet probe point.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void releaseStoreBuffer()
Release store buffer entry for a completed store.
const std::string & name()
void clear()
Make this element invalid.
RecordType type
Type of the node corresponding to the instruction modelled by it.
InputStream trace
Input stream used for reading the input trace file.
uint8_t numRegDep
Number of register dependencies.
Stats::Scalar numRetrySucceeded
static PacketPtr createWrite(const RequestPtr &req)
bool send(Addr addr, unsigned size, const MemCmd &cmd, Request::FlagsType flags, Addr pc)
Creates a new request assigning the request parameters passed by the arguments.
uint32_t size
Size of request if any.
NodeSeqNum seqNum
The sequence number of the ready node.
Stats::Scalar dataLastTick
Tick when ElasticDataGen completes execution.
void dcacheRecvTimingResp(PacketPtr pkt)
When data cache port receives a response, this calls the dcache generator method handle to complete t...
ElasticDataGenStatGroup(Stats::Group *parent, const std::string &_name)
name is the extension to the name for these stats
Derived & precision(int _precision)
Set the precision and marks this stat to print at the end of simulation.
uint8_t numRobDep
Number of order dependencies.
void release(const GraphNode *done_node)
Release appropriate structures for a completed node.
void exit()
Exit the ElasticDataGen.
PacketPtr executeMemReq(GraphNode *node_ptr)
Creates a new request for a load or store assigning the request parameters.
TraceCPU::FixedRetryGen::FixedRetryGenStatGroup fixedStats
void occupy(const GraphNode *new_node)
Occupy appropriate structures for an issued node.
Stats::Scalar maxReadyListSize
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
std::queue< const GraphNode * > depFreeQueue
Queue of dependency-free nodes that are pending issue because resources are not available.
Stats::Scalar numOps
Stat for number of simulated micro-ops.
Stats::Scalar numSendAttempted
Cycles is a wrapper class for representing cycle counts, i.e.
bool isValid() const
Check validity of this element.
std::string dataTraceFile
uint64_t NodeSeqNum
Node sequence number type.
static int numTraceCPUs
Number of Trace CPUs in the system used as a shared variable and passed to the CountedExitEvent event...
bool isLoad() const
Is the node a load.
PacketPtr retryPkt
PacketPtr used to store the packet to retry.
Addr virtAddr
The virtual address for the request if any.
static const uint8_t maxRobDep
The maximum no.
Stats::Scalar maxDependents
Stats for data memory accesses replayed.
bool traceComplete
Set to true when end of trace is reached.
bool checkAndIssue(const GraphNode *node_ptr, bool first=true)
Attempts to issue a node once the node's source dependencies are complete.
bool tryNext()
This tries to send current or retry packet and returns true if successfull.
const uint32_t windowSize
Window size within which to check for dependencies.
EventFunctionWrapper dcacheNextEvent
Event for the control flow method schedDcacheNext()
RobDepArray robDep
Array of order dependencies.
Addr addr
The address for the request.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
bool nextRead
Set to true when the next window of instructions need to be read.
Stats::Scalar numSendFailed
void recvReqRetry()
Handle a retry signalled by the cache if instruction read failed in the first attempt.
const RequestorID requestorId
RequestorID used for the requests being sent.
Port & getDataPort()
Used to get a reference to the dcache port.
void printOccupancy()
Print resource occupancy for debugging.
void icacheRetryRecvd()
When instruction cache port receives a retry, schedule event icacheNextEvent.
PacketPtr retryPkt
PacketPtr used to store the packet to retry.
virtual Port & getInstPort()=0
Purely virtual method that returns a reference to the instruction port.
void updateNumOps(uint64_t rob_num)
Stats::Formula cpi
Stat for the CPI.
Addr blocksize
The size of the access for the request.
ElasticDataGen dcacheGen
Instance of ElasticDataGen to replay data read and write requests.
Tick traceOffset
This stores the time offset in the trace, which is taken away from the ready times of requests.
Tick execTick
The tick at which the ready node must be executed.
int64_t delta
Stores the difference in the send ticks of the current and last packets.
RegDepArray regDep
Array of register dependencies (incoming) if any.
#define panic(...)
This implements a cprintf based panic() function.
std::string instTraceFile
File names for input instruction and data traces.
The trace cpu replays traces generated using the elastic trace probe attached to the O3 CPU model.
void writeElementAsTrace() const
Write out element in trace-compatible format using debug flag TraceCPUData.
Tick curTick()
The current simulated tick.
bool isExecComplete() const
Returns the execComplete variable which is set when the last node is executed.
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17