gem5  v19.0.0.0
Public Member Functions | Private Attributes | List of all members
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. More...
 
void reset ()
 Reset the stream such that it can be played once again. More...
 
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. More...
 

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

Constructor & Destructor Documentation

◆ InputStream()

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 1473 of file trace_cpu.cc.

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

Member Function Documentation

◆ read()

bool 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 1495 of file trace_cpu.cc.

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

◆ reset()

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

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

Definition at line 1489 of file trace_cpu.cc.

References ProtoInputStream::reset(), and trace.

Member Data Documentation

◆ trace

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

Definition at line 399 of file trace_cpu.hh.

Referenced by InputStream(), read(), and reset().


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

Generated on Fri Feb 28 2020 16:27:17 for gem5 by doxygen 1.8.13