|
gem5
v19.0.0.0
|
The InputStream encapsulates a trace file and the internal buffers and populates GraphNodes based on the input. More...
Public Member Functions | |
| InputStream (const std::string &filename, const double time_multiplier) | |
| Create a trace input stream for a given file name. More... | |
| void | reset () |
| Reset the stream such that it can be played once again. More... | |
| bool | read (GraphNode *element) |
| Attempt to read a trace element from the stream, and also notify the caller if the end of the file was reached. More... | |
| uint32_t | getWindowSize () const |
| Get window size from trace. More... | |
| uint64_t | getMicroOpCount () const |
| Get number of micro-ops modelled in the TraceCPU replay. More... | |
Private Attributes | |
| ProtoInputStream | trace |
| Input file stream for the protobuf trace. More... | |
| const double | timeMultiplier |
| A multiplier for the compute delays in the trace to modulate the Trace CPU frequency either up or down. More... | |
| uint64_t | microOpCount |
| Count of committed ops read from trace plus the filtered ops. More... | |
| uint32_t | windowSize |
| The window size that is read from the header of the protobuf trace and used to process the dependency trace. More... | |
The InputStream encapsulates a trace file and the internal buffers and populates GraphNodes based on the input.
Definition at line 795 of file trace_cpu.hh.
| TraceCPU::ElasticDataGen::InputStream::InputStream | ( | const std::string & | filename, |
| const double | time_multiplier | ||
| ) |
Create a trace input stream for a given file name.
| filename | Path to the file to read from |
| time_multiplier | used to scale the compute delays |
Definition at line 1258 of file trace_cpu.cc.
References SimClock::Frequency, panic, ProtoInputStream::read(), trace, and windowSize.
|
inline |
Get number of micro-ops modelled in the TraceCPU replay.
Definition at line 851 of file trace_cpu.hh.
|
inline |
Get window size from trace.
Definition at line 848 of file trace_cpu.hh.
| bool TraceCPU::ElasticDataGen::InputStream::read | ( | GraphNode * | element | ) |
Attempt to read a trace element from the stream, and also notify the caller if the end of the file was reached.
| element | Trace element to populate |
| size | of register dependency array stored in the element |
Definition at line 1288 of file trace_cpu.cc.
References TraceCPU::ElasticDataGen::GraphNode::asid, TraceCPU::ElasticDataGen::GraphNode::clearRegDep(), TraceCPU::ElasticDataGen::GraphNode::clearRobDep(), TraceCPU::ElasticDataGen::GraphNode::compDelay, TraceCPU::ElasticDataGen::GraphNode::flags, ArmISA::i, ArmISA::j, ArmISA::MaxInstSrcRegs, TraceCPU::ElasticDataGen::GraphNode::maxRobDep, microOpCount, TraceCPU::ElasticDataGen::GraphNode::numRegDep, TraceCPU::ElasticDataGen::GraphNode::numRobDep, TraceCPU::ElasticDataGen::GraphNode::pc, TraceCPU::ElasticDataGen::GraphNode::physAddr, ProtoInputStream::read(), TraceCPU::ElasticDataGen::GraphNode::regDep, TraceCPU::ElasticDataGen::GraphNode::robDep, TraceCPU::ElasticDataGen::GraphNode::robNum, TraceCPU::ElasticDataGen::GraphNode::seqNum, TraceCPU::ElasticDataGen::GraphNode::size, timeMultiplier, trace, TraceCPU::ElasticDataGen::GraphNode::type, and TraceCPU::ElasticDataGen::GraphNode::virtAddr.
Referenced by TraceCPU::FixedRetryGen::nextExecute().
| void TraceCPU::ElasticDataGen::InputStream::reset | ( | ) |
Reset the stream such that it can be played once again.
Definition at line 1282 of file trace_cpu.cc.
References ProtoInputStream::reset(), and trace.
Referenced by TraceCPU::FixedRetryGen::exit().
|
private |
Count of committed ops read from trace plus the filtered ops.
Definition at line 812 of file trace_cpu.hh.
Referenced by read().
|
private |
A multiplier for the compute delays in the trace to modulate the Trace CPU frequency either up or down.
The Trace CPU's clock domain frequency must also be set to match the expected result of frequency scaling.
Definition at line 809 of file trace_cpu.hh.
Referenced by read().
|
private |
Input file stream for the protobuf trace.
Definition at line 801 of file trace_cpu.hh.
Referenced by InputStream(), read(), and reset().
|
private |
The window size that is read from the header of the protobuf trace and used to process the dependency trace.
Definition at line 818 of file trace_cpu.hh.
Referenced by InputStream().