gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::TraceCPU::FixedRetryGen::InputStream Class Reference

The InputStream encapsulates a trace file and the internal buffers and populates TraceElements based on the input. More...

Public Member Functions

 InputStream (const std::string &filename)
 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 (TraceElement *element)
 Attempt to read a trace element from the stream, and also notify the caller if the end of the file was reached.
 

Private Attributes

ProtoInputStream trace
 

Detailed Description

The InputStream encapsulates a trace file and the internal buffers and populates TraceElements based on the input.

Definition at line 359 of file trace_cpu.hh.

Constructor & Destructor Documentation

◆ InputStream()

gem5::TraceCPU::FixedRetryGen::InputStream::InputStream ( const std::string & filename)

Create a trace input stream for a given file name.

Parameters
filenamePath to the file to read from

Definition at line 1389 of file trace_cpu.cc.

References gem5::sim_clock::Frequency, panic, ProtoInputStream::read(), and trace.

Member Function Documentation

◆ read()

bool gem5::TraceCPU::FixedRetryGen::InputStream::read ( TraceElement * element)

Attempt to read a trace element from the stream, and also notify the caller if the end of the file was reached.

Parameters
elementTrace element to populate
Returns
True if an element could be read successfully

Definition at line 1411 of file trace_cpu.cc.

References gem5::TraceCPU::FixedRetryGen::TraceElement::addr, gem5::TraceCPU::FixedRetryGen::TraceElement::blocksize, gem5::MemCmd::cmd, gem5::TraceCPU::FixedRetryGen::TraceElement::cmd, gem5::TraceCPU::FixedRetryGen::TraceElement::flags, gem5::TraceCPU::FixedRetryGen::TraceElement::pc, read(), gem5::TraceCPU::FixedRetryGen::TraceElement::tick, and gem5::TraceCPU::FixedRetryGen::trace.

Referenced by gem5::TraceCPU::FixedRetryGen::nextExecute(), and read().

◆ reset()

void gem5::TraceCPU::FixedRetryGen::InputStream::reset ( )

Reset the stream such that it can be played once again.

Definition at line 1405 of file trace_cpu.cc.

References reset(), and gem5::TraceCPU::FixedRetryGen::trace.

Referenced by gem5::TraceCPU::FixedRetryGen::exit(), and reset().

Member Data Documentation

◆ trace

ProtoInputStream gem5::TraceCPU::FixedRetryGen::InputStream::trace
private

Definition at line 363 of file trace_cpu.hh.

Referenced by InputStream().


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

Generated on Tue Jun 18 2024 16:24:15 for gem5 by doxygen 1.11.0