gem5 v24.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. | |
void | reset () |
Reset the stream such that it can be played once again. | |
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. | |
uint32_t | getWindowSize () const |
Get window size from trace. | |
uint64_t | getMicroOpCount () const |
Get number of micro-ops modelled in the TraceCPU replay. | |
Private Attributes | |
ProtoInputStream | trace |
Input file stream for the protobuf trace. | |
const double | timeMultiplier |
A multiplier for the compute delays in the trace to modulate the Trace CPU frequency either up or down. | |
uint64_t | microOpCount |
Count of committed ops read from trace plus the filtered ops. | |
uint32_t | windowSize |
The window size that is read from the header of the protobuf trace and used to process the dependency trace. | |
The InputStream encapsulates a trace file and the internal buffers and populates GraphNodes based on the input.
Definition at line 746 of file trace_cpu.hh.
gem5::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 1205 of file trace_cpu.cc.
References gem5::sim_clock::Frequency, panic, ProtoInputStream::read(), trace, and windowSize.
|
inline |
Get number of micro-ops modelled in the TraceCPU replay.
Definition at line 800 of file trace_cpu.hh.
References microOpCount.
Referenced by gem5::TraceCPU::ElasticDataGen::getMicroOpCount().
|
inline |
bool gem5::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 1234 of file trace_cpu.cc.
References gem5::TraceCPU::ElasticDataGen::GraphNode::compDelay, gem5::TraceCPU::ElasticDataGen::GraphNode::flags, gem5::ArmISA::i, gem5::TraceCPU::ElasticDataGen::GraphNode::pc, gem5::TraceCPU::ElasticDataGen::GraphNode::physAddr, read(), gem5::TraceCPU::ElasticDataGen::GraphNode::regDep, gem5::TraceCPU::ElasticDataGen::GraphNode::robDep, gem5::TraceCPU::ElasticDataGen::GraphNode::robNum, gem5::TraceCPU::ElasticDataGen::GraphNode::seqNum, gem5::TraceCPU::ElasticDataGen::GraphNode::size, gem5::TraceCPU::ElasticDataGen::trace, gem5::TraceCPU::ElasticDataGen::GraphNode::type, and gem5::TraceCPU::ElasticDataGen::GraphNode::virtAddr.
Referenced by read(), and gem5::TraceCPU::ElasticDataGen::readNextWindow().
void gem5::TraceCPU::ElasticDataGen::InputStream::reset | ( | ) |
Reset the stream such that it can be played once again.
Definition at line 1228 of file trace_cpu.cc.
References reset(), and gem5::TraceCPU::ElasticDataGen::trace.
Referenced by gem5::TraceCPU::ElasticDataGen::exit(), and reset().
|
private |
Count of committed ops read from trace plus the filtered ops.
Definition at line 761 of file trace_cpu.hh.
Referenced by getMicroOpCount().
|
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 758 of file trace_cpu.hh.
|
private |
Input file stream for the protobuf trace.
Definition at line 750 of file trace_cpu.hh.
Referenced by InputStream().
|
private |
The window size that is read from the header of the protobuf trace and used to process the dependency trace.
Definition at line 767 of file trace_cpu.hh.
Referenced by getWindowSize(), and InputStream().