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,
71 "ROB size set to %d exceeds the max. value of %d.",
72 params.sizeROB, UINT16_MAX);
73 fatal_if(params.sizeStoreBuffer > UINT16_MAX,
74 "ROB size set to %d exceeds the max. value of %d.",
75 params.sizeROB, UINT16_MAX);
76 fatal_if(params.sizeLoadBuffer > UINT16_MAX,
77 "Load buffer size set to %d exceeds the max. value of %d.",
78 params.sizeLoadBuffer, UINT16_MAX);
103 DPRINTF(TraceCPUInst,
"Instruction fetch request trace file is \"%s\".\n",
105 DPRINTF(TraceCPUData,
"Data memory request trace file is \"%s\".\n",
117 traceOffset = std::min(first_icache_tick, first_dcache_tick);
118 inform(
"%s: Time offset (tick) found as min of both traces is %lli.",
146 DPRINTF(TraceCPUInst,
"IcacheGen event.\n");
153 "Scheduling next icacheGen event at %d.\n",
172 DPRINTF(TraceCPUData,
"DcacheGen event.\n");
206 "Number of events scheduled to trigger data request generator"),
208 "Number of events scheduled to trigger instruction request generator"),
210 "Number of micro-ops simulated by the Trace CPU"),
213 "Cycles per micro-op used as a proxy for CPI",
214 trace->baseStats.numCycles / numOps)
221 const std::string& _name) :
224 "Max number of dependents observed on a node"),
226 "Max size of the ready list observed"),
228 "Number of first attempts to send a request"),
230 "Number of successful first attempts"),
237 "Last tick simulated from the elastic data trace")
244 DPRINTF(TraceCPUData,
"Initializing data memory request generator "
245 "DcacheGen: elastic issue with retry.\n");
248 "Trace has %d elements. It must have at least %d elements.",
250 DPRINTF(TraceCPUData,
"After 1st read, depGraph size:%d.\n",
254 "Trace has %d elements. It must have at least %d elements.",
256 DPRINTF(TraceCPUData,
"After 2st read, depGraph size:%d.\n",
260 if (
DTRACE(TraceCPUData)) {
265 "Execute tick of the first dependency free node %lli is %d.\n",
266 free_itr->seqNum, free_itr->execTick);
269 return (free_itr->execTick);
276 free_node.execTick -=
offset;
290 DPRINTF(TraceCPUData,
"Reading next window from file.\n");
298 DPRINTF(TraceCPUData,
"Start read: Size of depGraph is %d.\n",
301 uint32_t num_read = 0;
311 DPRINTF(TraceCPUData,
"\tTrace complete!\n");
325 if (new_node->
robDep.empty() && new_node->
regDep.empty()) {
333 DPRINTF(TraceCPUData,
"End read: Size of depGraph is %d.\n",
342 auto dep_it = dep_list.begin();
343 while (dep_it != dep_list.end()) {
345 auto parent_itr =
depGraph.find(*dep_it);
350 parent_itr->second->dependents.push_back(new_node);
351 auto num_depts = parent_itr->second->dependents.size();
359 dep_it = dep_list.erase(dep_it);
367 DPRINTF(TraceCPUData,
"Execute start occupancy:\n");
368 DPRINTFR(TraceCPUData,
"\tdepGraph = %d, readyList = %d, "
386 "Removing from depFreeQueue: seq. num %lli.\n",
401 graph_itr =
depGraph.find(free_itr->seqNum);
402 assert(graph_itr !=
depGraph.end());
410 panic(
"Retry packet's seqence number does not match "
411 "the first node in the readyList.\n");
441 "Node seq. num %lli sent. Waking up dependents..\n",
444 auto child_itr = (node_ptr->
dependents).begin();
445 while (child_itr != (node_ptr->
dependents).end()) {
448 if (!(*child_itr)->isStore() &&
449 (*child_itr)->removeRobDep(node_ptr->
seqNum)) {
452 if ((*child_itr)->robDep.empty() &&
453 (*child_itr)->regDep.empty()) {
461 child_itr = node_ptr->
dependents.erase(child_itr);
472 DPRINTF(TraceCPUData,
"Node seq. num %lli done. Waking"
473 " up dependents..\n", node_ptr->
seqNum);
478 if (child->removeDepOnInst(node_ptr->
seqNum)) {
512 if (
DTRACE(TraceCPUData)) {
514 DPRINTF(TraceCPUData,
"Execute end occupancy:\n");
515 DPRINTFR(TraceCPUData,
"\tdepGraph = %d, readyList = %d, "
522 DPRINTF(TraceCPUData,
"Not scheduling an event as expecting a retry"
523 "event from the cache for seq. num %lli.\n",
540 DPRINTF(TraceCPUData,
"Attempting to schedule @%lli.\n",
545 DPRINTF(TraceCPUData,
"Attempting to schedule @%lli.\n",
554 DPRINTF(TraceCPUData,
"\tExecution Complete!\n");
563 DPRINTF(TraceCPUData,
"Executing memory request %lli (phys addr %d, "
564 "virt addr %d, pc %#x, size %d, flags %d).\n",
573 DPRINTF(TraceCPUData,
"Skipping strictly ordered request %lli.\n",
586 if (!(blk_offset + node_ptr->
size <= blk_size)) {
587 node_ptr->
size = blk_size - blk_offset;
592 auto req = std::make_shared<Request>(
594 req->setReqInstSeqNum(node_ptr->
seqNum);
599 req->setPC(node_ptr->
pc);
606 req->setReqInstSeqNum(node_ptr->
seqNum);
610 uint8_t* pkt_data =
new uint8_t[req->getSize()];
615 memset(pkt_data, 0xA, req->getSize());
627 DPRINTF(TraceCPUData,
"Send failed. Saving packet for retry.\n");
640 assert(node_ptr->
robDep.empty() && node_ptr->
regDep.empty());
644 DPRINTFR(TraceCPUData,
"\t\tseq. num %lli(%s) with rob num %lli is now"
652 DPRINTFR(TraceCPUData,
"\t\tResources available for seq. num %lli. "
653 "Adding to readyList, occupying resources.\n",
665 DPRINTFR(TraceCPUData,
"\t\tResources unavailable for seq. num "
666 "%lli. Adding to depFreeQueue.\n", node_ptr->
seqNum);
669 DPRINTFR(TraceCPUData,
"\t\tResources unavailable for seq. num "
670 "%lli. Still pending issue.\n", node_ptr->
seqNum);
690 auto graph_itr =
depGraph.find(pkt->
req->getReqInstSeqNum());
691 assert(graph_itr !=
depGraph.end());
697 DPRINTF(TraceCPUData,
"Load seq. num %lli response received. Waking up"
698 " dependents..\n", node_ptr->
seqNum);
701 if (child->removeDepOnInst(node_ptr->
seqNum)) {
716 if (
DTRACE(TraceCPUData)) {
737 DPRINTF(TraceCPUData,
"Attempting to schedule @%lli.\n",
748 ready_node.
seqNum = seq_num;
768 if (
retryPkt->
req->getReqInstSeqNum() == itr->seqNum)
775 while (!found && itr !=
readyList.end()) {
778 if (exec_tick < itr->execTick) {
782 }
else if (exec_tick == itr->execTick) {
785 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 M5_VAR_USED
GraphNode* node_ptr = 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());
855 "\tClearing done seq. num %d from inFlightNodes..\n",
858 assert(inFlightNodes.find(done_node->
seqNum) != inFlightNodes.end());
859 inFlightNodes.erase(done_node->
seqNum);
861 if (inFlightNodes.empty()) {
864 oldestInFlightRobNum = UINT64_MAX;
868 oldestInFlightRobNum = inFlightNodes.begin()->second;
872 "\tCleared. inFlightNodes.size() = %d, "
873 "oldestInFlightRobNum = %d\n", inFlightNodes.size(),
874 oldestInFlightRobNum);
880 if (done_node->
isLoad()) {
881 assert(numInFlightLoads != 0);
889 releaseStoreBuffer();
896 assert(numInFlightStores != 0);
904 uint16_t num_in_flight_nodes;
905 if (inFlightNodes.empty()) {
906 num_in_flight_nodes = 0;
907 DPRINTFR(TraceCPUData,
"\t\tChecking resources to issue seq. num %lli:"
908 " #in-flight nodes = 0", new_node->
seqNum);
909 }
else if (new_node->
robNum > oldestInFlightRobNum) {
913 num_in_flight_nodes = new_node->
robNum - oldestInFlightRobNum;
914 DPRINTFR(TraceCPUData,
"\t\tChecking resources to issue seq. num %lli:"
915 " #in-flight nodes = %d - %d = %d", new_node->
seqNum,
916 new_node->
robNum, oldestInFlightRobNum, num_in_flight_nodes);
923 num_in_flight_nodes = 0;
924 DPRINTFR(TraceCPUData,
"\t\tChecking resources to issue seq. num %lli:"
925 " new oldestInFlightRobNum = %d, #in-flight nodes ignored",
928 DPRINTFR(TraceCPUData,
", LQ = %d/%d, SQ = %d/%d.\n",
929 numInFlightLoads, sizeLoadBuffer,
930 numInFlightStores, sizeStoreBuffer);
932 if (num_in_flight_nodes >= sizeROB) {
935 if (new_node->
isLoad() && numInFlightLoads >= sizeLoadBuffer) {
938 if (new_node->
isStore() && numInFlightStores >= sizeStoreBuffer) {
948 return (numInFlightStores != 0 || numInFlightLoads != 0);
954 DPRINTFR(TraceCPUData,
"oldestInFlightRobNum = %d, "
955 "LQ = %d/%d, SQ = %d/%d.\n",
956 oldestInFlightRobNum,
957 numInFlightLoads, sizeLoadBuffer,
958 numInFlightStores, sizeStoreBuffer);
965 "Number of first attempts to send a request"),
967 "Number of successful first attempts"),
971 "Last tick simulated from the fixed inst trace")
979 DPRINTF(TraceCPUInst,
"Initializing instruction fetch request generator"
980 " IcacheGen: fixed issue with retry.\n");
986 panic(
"Read of first message in the trace failed.\n");
996 DPRINTF(TraceCPUInst,
"Trying to send retry packet.\n");
1000 DPRINTF(TraceCPUInst,
"Retry packet sending failed.\n");
1005 DPRINTF(TraceCPUInst,
"Trying to send packet for currElement.\n");
1014 DPRINTF(TraceCPUInst,
"currElement sending failed.\n");
1025 DPRINTF(TraceCPUInst,
"Packet sent successfully, trying to read next "
1065 DPRINTF(TraceCPUInst,
"inst fetch: %c addr %d pc %#x size %d tick %d\n",
1090 uint8_t* pkt_data =
new uint8_t[req->getSize()];
1094 memset(pkt_data, 0xA, req->getSize());
1112 DPRINTF(TraceCPUInst,
"Icache retry received. Scheduling next IcacheGen"
1113 " event @%lli.\n",
curTick());
1122 DPRINTF(TraceCPUData,
"Dcache retry received. Scheduling next DcacheGen"
1123 " event @%lli.\n",
curTick());
1131 DPRINTF(TraceCPUData,
"Scheduling next DcacheGen event at %lli.\n",
1136 DPRINTF(TraceCPUData,
"Re-scheduling next dcache event from %lli"
1162 DPRINTF(TraceCPUData,
"Received timing response from Dcache.\n");
1186 const std::string& filename,
const double time_multiplier) :
1188 timeMultiplier(time_multiplier),
1192 ProtoMessage::InstDepRecordHeader header_msg;
1194 panic(
"Failed to read packet header from %s\n", filename);
1197 panic(
"Trace %s was recorded with a different tick frequency %d\n",
1198 header_msg.tick_freq());
1216 ProtoMessage::InstDepRecord pkt_msg;
1219 element->
seqNum = pkt_msg.seq_num();
1220 element->
type = pkt_msg.type();
1222 element->
compDelay = pkt_msg.comp_delay() * timeMultiplier;
1226 for (
int i = 0;
i < (pkt_msg.rob_dep()).size();
i++) {
1227 element->
robDep.push_back(pkt_msg.rob_dep(
i));
1232 for (
int i = 0;
i < (pkt_msg.reg_dep()).size();
i++) {
1236 bool duplicate =
false;
1237 for (
auto &dep: element->
robDep) {
1238 duplicate |= (pkt_msg.reg_dep(
i) == dep);
1241 element->
regDep.push_back(pkt_msg.reg_dep(
i));
1245 if (pkt_msg.has_p_addr())
1246 element->
physAddr = pkt_msg.p_addr();
1250 if (pkt_msg.has_v_addr())
1251 element->
virtAddr = pkt_msg.v_addr();
1255 if (pkt_msg.has_size())
1256 element->
size = pkt_msg.size();
1260 if (pkt_msg.has_flags())
1261 element->
flags = pkt_msg.flags();
1265 if (pkt_msg.has_pc())
1266 element->
pc = pkt_msg.pc();
1272 if (pkt_msg.has_weight()) {
1273 microOpCount += pkt_msg.weight();
1275 element->
robNum = microOpCount;
1286 for (
auto it = regDep.begin(); it != regDep.end(); it++) {
1287 if (*it == reg_dep) {
1291 "\tFor %lli: Marking register dependency %lli done.\n",
1304 for (
auto it = robDep.begin(); it != robDep.end(); it++) {
1305 if (*it == rob_dep) {
1309 "\tFor %lli: Marking ROB dependency %lli done.\n",
1321 if (!removeRobDep(done_seq_num)) {
1325 M5_VAR_USED
bool regdep_found = removeRegDep(done_seq_num);
1326 assert(regdep_found);
1329 return robDep.empty() && regDep.empty();
1336 DPRINTFR(TraceCPUData,
"%lli", seqNum);
1337 DPRINTFR(TraceCPUData,
",%s", typeToStr());
1338 if (isLoad() || isStore()) {
1340 DPRINTFR(TraceCPUData,
",%i", size);
1341 DPRINTFR(TraceCPUData,
",%i", flags);
1343 DPRINTFR(TraceCPUData,
",%lli", compDelay);
1345 for (
auto &dep: robDep) {
1346 DPRINTFR(TraceCPUData,
",%lli", dep);
1349 for (
auto &dep: regDep) {
1350 DPRINTFR(TraceCPUData,
",%lli", dep);
1352 auto child_itr = dependents.begin();
1353 DPRINTFR(TraceCPUData,
"dependents:");
1354 while (child_itr != dependents.end()) {
1355 DPRINTFR(TraceCPUData,
":%lli", (*child_itr)->seqNum);
1360 #endif // TRACING_ON
1366 return Record::RecordType_Name(
type);
1373 ProtoMessage::PacketHeader header_msg;
1375 panic(
"Failed to read packet header from %s\n", filename);
1378 panic(
"Trace %s was recorded with a different tick frequency %d\n",
1379 header_msg.tick_freq());
1395 element->
cmd = pkt_msg.
cmd();
1396 element->
addr = pkt_msg.addr();
1398 element->
tick = pkt_msg.tick();
1399 element->
flags = pkt_msg.has_flags() ? pkt_msg.flags() : 0;
1400 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 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(const TraceCPUParams ¶ms)
TraceCPU::TraceStats traceStats
Stats::Scalar numSendSucceeded
Stats::Scalar numSchedDcacheEvent
Stats::Scalar numSchedIcacheEvent
RobDepList robDep
List of order dependencies.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
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 reschedule(Event &event, Tick when, bool always=false)
void addToSortedReadyList(NodeSeqNum seq_num, Tick exec_tick)
Add a ready node to the readyList.
void addDepsOnParent(GraphNode *new_node, T &dep_list)
Iterate over the dependencies of a new node and add the new node to the list of dependents of the par...
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.
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.
BaseCPU::BaseCPUStats baseStats
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.
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
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.
void schedule(Event &event, Tick when)
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.
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.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
uint64_t compDelay
Computational delay.
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 modeled by it.
InputStream trace
Input stream used for reading the input trace file.
virtual const std::string name() const
Stats::Scalar numRetrySucceeded
#define UNIT_RATE(T1, T2)
static PacketPtr createWrite(const RequestPtr &req)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
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.
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
RegDepList regDep
List of register dependencies (incoming) if any.
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.
Stats::Scalar maxDependents
Stats for data memory accesses replayed.
Tick curTick()
The universal simulation clock.
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()
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.
#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.
bool isExecComplete() const
Returns the execComplete variable which is set when the last node is executed.
Generated on Tue Jun 22 2021 15:28:27 for gem5 by doxygen 1.8.17