gem5
v20.1.0.0
|
The struct GraphNode stores an instruction in the trace file. More...
Public Types | |
typedef std::array< NodeSeqNum, maxRobDep > | RobDepArray |
Typedef for the array containing the ROB dependencies. More... | |
typedef std::array< NodeSeqNum, TheISA::MaxInstSrcRegs > | RegDepArray |
Typedef for the array containing the register dependencies. More... | |
Public Member Functions | |
bool | isLoad () const |
Is the node a load. More... | |
bool | isStore () const |
Is the node a store. More... | |
bool | isComp () const |
Is the node a compute (non load/store) node. More... | |
void | clearRegDep () |
Initialize register dependency array to all zeroes. More... | |
void | clearRobDep () |
Initialize register dependency array to all zeroes. More... | |
bool | removeRegDep (NodeSeqNum reg_dep) |
Remove completed instruction from register dependency array. More... | |
bool | removeRobDep (NodeSeqNum rob_dep) |
Remove completed instruction from order dependency array. More... | |
bool | removeDepOnInst (NodeSeqNum done_seq_num) |
Check for all dependencies on completed inst. More... | |
bool | isStrictlyOrdered () const |
Return true if node has a request which is strictly ordered. More... | |
void | writeElementAsTrace () const |
Write out element in trace-compatible format using debug flag TraceCPUData. More... | |
std::string | typeToStr () const |
Return string specifying the type of the node. More... | |
Public Attributes | |
NodeSeqNum | seqNum |
Instruction sequence number. More... | |
NodeRobNum | robNum |
ROB occupancy number. More... | |
RecordType | type |
Type of the node corresponding to the instruction modelled by it. More... | |
Addr | physAddr |
The address for the request if any. More... | |
Addr | virtAddr |
The virtual address for the request if any. More... | |
uint32_t | size |
Size of request if any. More... | |
Request::Flags | flags |
Request flags if any. More... | |
Addr | pc |
Instruction PC. More... | |
RobDepArray | robDep |
Array of order dependencies. More... | |
uint8_t | numRobDep |
Number of order dependencies. More... | |
uint64_t | compDelay |
Computational delay. More... | |
RegDepArray | regDep |
Array of register dependencies (incoming) if any. More... | |
uint8_t | numRegDep |
Number of register dependencies. More... | |
std::vector< GraphNode * > | dependents |
A vector of nodes dependent (outgoing) on this node. More... | |
Static Public Attributes | |
static const uint8_t | maxRobDep = 2 |
The maximum no. More... | |
The struct GraphNode stores an instruction in the trace file.
The format of the trace file favours constructing a dependency graph of the execution and this struct is used to encapsulate the request data as well as pointers to its dependent GraphNodes.
Definition at line 579 of file trace_cpu.hh.
typedef std::array<NodeSeqNum, TheISA::MaxInstSrcRegs> TraceCPU::ElasticDataGen::GraphNode::RegDepArray |
Typedef for the array containing the register dependencies.
Definition at line 593 of file trace_cpu.hh.
typedef std::array<NodeSeqNum, maxRobDep> TraceCPU::ElasticDataGen::GraphNode::RobDepArray |
Typedef for the array containing the ROB dependencies.
Definition at line 590 of file trace_cpu.hh.
void TraceCPU::ElasticDataGen::GraphNode::clearRegDep | ( | ) |
Initialize register dependency array to all zeroes.
Definition at line 1321 of file trace_cpu.cc.
Referenced by TraceCPU::ElasticDataGen::InputStream::read().
void TraceCPU::ElasticDataGen::GraphNode::clearRobDep | ( | ) |
Initialize register dependency array to all zeroes.
Definition at line 1329 of file trace_cpu.cc.
Referenced by TraceCPU::ElasticDataGen::InputStream::read().
|
inline |
Is the node a compute (non load/store) node.
Definition at line 651 of file trace_cpu.hh.
References type.
|
inline |
Is the node a load.
Definition at line 645 of file trace_cpu.hh.
References type.
Referenced by TraceCPU::ElasticDataGen::execute(), TraceCPU::ElasticDataGen::executeMemReq(), TraceCPU::ElasticDataGen::HardwareResource::isAvailable(), TraceCPU::ElasticDataGen::HardwareResource::occupy(), and TraceCPU::ElasticDataGen::HardwareResource::release().
|
inline |
Is the node a store.
Definition at line 648 of file trace_cpu.hh.
References type.
Referenced by TraceCPU::ElasticDataGen::execute(), TraceCPU::ElasticDataGen::HardwareResource::isAvailable(), TraceCPU::ElasticDataGen::HardwareResource::occupy(), and TraceCPU::ElasticDataGen::HardwareResource::release().
|
inline |
Return true if node has a request which is strictly ordered.
Definition at line 669 of file trace_cpu.hh.
References flags, Flags< T >::isSet(), and Request::STRICT_ORDER.
Referenced by TraceCPU::ElasticDataGen::execute(), TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::HardwareResource::release().
bool TraceCPU::ElasticDataGen::GraphNode::removeDepOnInst | ( | NodeSeqNum | done_seq_num | ) |
Check for all dependencies on completed inst.
Definition at line 1337 of file trace_cpu.cc.
bool TraceCPU::ElasticDataGen::GraphNode::removeRegDep | ( | NodeSeqNum | reg_dep | ) |
Remove completed instruction from register dependency array.
Definition at line 1285 of file trace_cpu.cc.
References DPRINTFR.
bool TraceCPU::ElasticDataGen::GraphNode::removeRobDep | ( | NodeSeqNum | rob_dep | ) |
Remove completed instruction from order dependency array.
Definition at line 1304 of file trace_cpu.cc.
References DPRINTFR.
std::string TraceCPU::ElasticDataGen::GraphNode::typeToStr | ( | ) | const |
Return string specifying the type of the node.
Definition at line 1385 of file trace_cpu.cc.
References type.
Referenced by TraceCPU::ElasticDataGen::checkAndIssue().
void TraceCPU::ElasticDataGen::GraphNode::writeElementAsTrace | ( | ) | const |
Write out element in trace-compatible format using debug flag TraceCPUData.
Definition at line 1352 of file trace_cpu.cc.
References DPRINTFR, ArmISA::i, and X86ISA::physAddr.
uint64_t TraceCPU::ElasticDataGen::GraphNode::compDelay |
Computational delay.
Definition at line 626 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::checkAndIssue(), and TraceCPU::ElasticDataGen::InputStream::read().
std::vector<GraphNode *> TraceCPU::ElasticDataGen::GraphNode::dependents |
A vector of nodes dependent (outgoing) on this node.
A sequential container is chosen because when dependents become free, they attempt to issue in program order.
Definition at line 642 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::completeMemAccess(), and TraceCPU::ElasticDataGen::execute().
Request::Flags TraceCPU::ElasticDataGen::GraphNode::flags |
Request flags if any.
Definition at line 614 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::executeMemReq(), isStrictlyOrdered(), and TraceCPU::ElasticDataGen::InputStream::read().
|
static |
The maximum no.
of ROB dependencies. There can be at most 2 order dependencies which could exist for a store. For a load and comp node there can be at most one order dependency.
Definition at line 587 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::InputStream::read().
uint8_t TraceCPU::ElasticDataGen::GraphNode::numRegDep |
Number of register dependencies.
Definition at line 635 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::checkAndIssue(), TraceCPU::ElasticDataGen::InputStream::read(), and TraceCPU::ElasticDataGen::readNextWindow().
uint8_t TraceCPU::ElasticDataGen::GraphNode::numRobDep |
Number of order dependencies.
Definition at line 623 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::checkAndIssue(), TraceCPU::ElasticDataGen::InputStream::read(), and TraceCPU::ElasticDataGen::readNextWindow().
Addr TraceCPU::ElasticDataGen::GraphNode::pc |
Instruction PC.
Definition at line 617 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().
Addr TraceCPU::ElasticDataGen::GraphNode::physAddr |
The address for the request if any.
Definition at line 605 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().
RegDepArray TraceCPU::ElasticDataGen::GraphNode::regDep |
Array of register dependencies (incoming) if any.
Maximum number of source registers used to set maximum size of the array
Definition at line 632 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::InputStream::read(), and TraceCPU::ElasticDataGen::readNextWindow().
RobDepArray TraceCPU::ElasticDataGen::GraphNode::robDep |
Array of order dependencies.
Definition at line 620 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::InputStream::read(), and TraceCPU::ElasticDataGen::readNextWindow().
NodeRobNum TraceCPU::ElasticDataGen::GraphNode::robNum |
ROB occupancy number.
Definition at line 599 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::checkAndIssue(), TraceCPU::ElasticDataGen::completeMemAccess(), TraceCPU::ElasticDataGen::execute(), TraceCPU::ElasticDataGen::HardwareResource::isAvailable(), TraceCPU::ElasticDataGen::HardwareResource::occupy(), and TraceCPU::ElasticDataGen::InputStream::read().
NodeSeqNum TraceCPU::ElasticDataGen::GraphNode::seqNum |
Instruction sequence number.
Definition at line 596 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::checkAndIssue(), TraceCPU::ElasticDataGen::completeMemAccess(), TraceCPU::ElasticDataGen::execute(), TraceCPU::ElasticDataGen::executeMemReq(), TraceCPU::ElasticDataGen::HardwareResource::isAvailable(), TraceCPU::ElasticDataGen::HardwareResource::occupy(), TraceCPU::ElasticDataGen::InputStream::read(), TraceCPU::ElasticDataGen::readNextWindow(), and TraceCPU::ElasticDataGen::HardwareResource::release().
uint32_t TraceCPU::ElasticDataGen::GraphNode::size |
Size of request if any.
Definition at line 611 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().
RecordType TraceCPU::ElasticDataGen::GraphNode::type |
Type of the node corresponding to the instruction modelled by it.
Definition at line 602 of file trace_cpu.hh.
Referenced by isComp(), isLoad(), isStore(), and TraceCPU::ElasticDataGen::InputStream::read().
Addr TraceCPU::ElasticDataGen::GraphNode::virtAddr |
The virtual address for the request if any.
Definition at line 608 of file trace_cpu.hh.
Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().