gem5  v21.0.1.0
Public Types | Public Member Functions | Public Attributes | List of all members
TraceCPU::ElasticDataGen::GraphNode Class Reference

The struct GraphNode stores an instruction in the trace file. More...

Public Types

typedef std::list< NodeSeqNumRobDepList
 Typedef for the list containing the ROB dependencies. More...
 
typedef std::list< NodeSeqNumRegDepList
 Typedef for the list 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...
 
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 modeled 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...
 
RobDepList robDep
 List of order dependencies. More...
 
uint64_t compDelay
 Computational delay. More...
 
RegDepList regDep
 List of register dependencies (incoming) if any. More...
 
std::vector< GraphNode * > dependents
 A vector of nodes dependent (outgoing) on this node. More...
 

Detailed Description

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 555 of file trace_cpu.hh.

Member Typedef Documentation

◆ RegDepList

Typedef for the list containing the register dependencies.

Definition at line 562 of file trace_cpu.hh.

◆ RobDepList

Typedef for the list containing the ROB dependencies.

Definition at line 559 of file trace_cpu.hh.

Member Function Documentation

◆ isComp()

bool TraceCPU::ElasticDataGen::GraphNode::isComp ( ) const
inline

Is the node a compute (non load/store) node.

Definition at line 617 of file trace_cpu.hh.

References type.

◆ isLoad()

bool TraceCPU::ElasticDataGen::GraphNode::isLoad ( ) const
inline

◆ isStore()

bool TraceCPU::ElasticDataGen::GraphNode::isStore ( ) const
inline

◆ isStrictlyOrdered()

bool TraceCPU::ElasticDataGen::GraphNode::isStrictlyOrdered ( ) const
inline

Return true if node has a request which is strictly ordered.

Definition at line 630 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().

◆ removeDepOnInst()

bool TraceCPU::ElasticDataGen::GraphNode::removeDepOnInst ( NodeSeqNum  done_seq_num)

Check for all dependencies on completed inst.

Definition at line 1318 of file trace_cpu.cc.

◆ removeRegDep()

bool TraceCPU::ElasticDataGen::GraphNode::removeRegDep ( NodeSeqNum  reg_dep)

Remove completed instruction from register dependency array.

Definition at line 1284 of file trace_cpu.cc.

References DPRINTFR.

◆ removeRobDep()

bool TraceCPU::ElasticDataGen::GraphNode::removeRobDep ( NodeSeqNum  rob_dep)

Remove completed instruction from order dependency array.

Definition at line 1302 of file trace_cpu.cc.

References DPRINTFR.

◆ typeToStr()

std::string TraceCPU::ElasticDataGen::GraphNode::typeToStr ( ) const

Return string specifying the type of the node.

Definition at line 1364 of file trace_cpu.cc.

References X86ISA::type.

Referenced by TraceCPU::ElasticDataGen::checkAndIssue().

◆ writeElementAsTrace()

void TraceCPU::ElasticDataGen::GraphNode::writeElementAsTrace ( ) const

Write out element in trace-compatible format using debug flag TraceCPUData.

Definition at line 1333 of file trace_cpu.cc.

References DPRINTFR, and X86ISA::physAddr.

Member Data Documentation

◆ compDelay

uint64_t TraceCPU::ElasticDataGen::GraphNode::compDelay

Computational delay.

Definition at line 595 of file trace_cpu.hh.

Referenced by TraceCPU::ElasticDataGen::checkAndIssue(), and TraceCPU::ElasticDataGen::InputStream::read().

◆ dependents

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 608 of file trace_cpu.hh.

Referenced by TraceCPU::ElasticDataGen::completeMemAccess(), and TraceCPU::ElasticDataGen::execute().

◆ flags

Request::Flags TraceCPU::ElasticDataGen::GraphNode::flags

◆ pc

Addr TraceCPU::ElasticDataGen::GraphNode::pc

Instruction PC.

Definition at line 589 of file trace_cpu.hh.

Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().

◆ physAddr

Addr TraceCPU::ElasticDataGen::GraphNode::physAddr

The address for the request if any.

Definition at line 577 of file trace_cpu.hh.

Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().

◆ regDep

RegDepList TraceCPU::ElasticDataGen::GraphNode::regDep

List of register dependencies (incoming) if any.

Maximum number of source registers used to set maximum size of the array

Definition at line 601 of file trace_cpu.hh.

Referenced by TraceCPU::ElasticDataGen::checkAndIssue(), TraceCPU::ElasticDataGen::InputStream::read(), and TraceCPU::ElasticDataGen::readNextWindow().

◆ robDep

RobDepList TraceCPU::ElasticDataGen::GraphNode::robDep

◆ robNum

NodeRobNum TraceCPU::ElasticDataGen::GraphNode::robNum

◆ seqNum

NodeSeqNum TraceCPU::ElasticDataGen::GraphNode::seqNum

◆ size

uint32_t TraceCPU::ElasticDataGen::GraphNode::size

Size of request if any.

Definition at line 583 of file trace_cpu.hh.

Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().

◆ type

RecordType TraceCPU::ElasticDataGen::GraphNode::type

Type of the node corresponding to the instruction modeled by it.

Definition at line 574 of file trace_cpu.hh.

Referenced by isComp(), isLoad(), isStore(), and TraceCPU::ElasticDataGen::InputStream::read().

◆ virtAddr

Addr TraceCPU::ElasticDataGen::GraphNode::virtAddr

The virtual address for the request if any.

Definition at line 580 of file trace_cpu.hh.

Referenced by TraceCPU::ElasticDataGen::executeMemReq(), and TraceCPU::ElasticDataGen::InputStream::read().


The documentation for this class was generated from the following files:

Generated on Tue Jun 22 2021 15:28:45 for gem5 by doxygen 1.8.17