gem5  v20.1.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StreamGen Class Referenceabstract

#include <stream_gen.hh>

Inheritance diagram for StreamGen:
FixedStreamGen RandomStreamGen

Public Member Functions

virtual ~StreamGen ()
 
virtual uint32_t pickStreamID ()=0
 
virtual uint32_t pickSubStreamID ()=0
 
bool ssidValid () const
 Returns true if the substreamID generation is valid and hence should be taken into account. More...
 

Static Public Member Functions

static StreamGencreate (const BaseTrafficGenParams *p)
 Factory method for constructing a Stream generator. More...
 

Protected Member Functions

 StreamGen (const BaseTrafficGenParams *p)
 

Protected Attributes

std::vector< uint32_t > streamIds
 Store preset Stream and Substream IDs to use for requests This is the set of available streamIDs the generator can pick. More...
 
std::vector< uint32_t > substreamIds
 

Detailed Description

Definition at line 49 of file stream_gen.hh.

Constructor & Destructor Documentation

◆ StreamGen()

StreamGen::StreamGen ( const BaseTrafficGenParams *  p)
inlineprotected

Definition at line 52 of file stream_gen.hh.

References fatal_if, and streamIds.

◆ ~StreamGen()

virtual StreamGen::~StreamGen ( )
inlinevirtual

Definition at line 64 of file stream_gen.hh.

Member Function Documentation

◆ create()

StreamGen * StreamGen::create ( const BaseTrafficGenParams *  p)
static

Factory method for constructing a Stream generator.

The Stream generator type is selected by the StreamGenType enum parameter.

@params p pointer to BaseTrafficGenParams struct where the stream generator type is stored.

Returns
a pointer to the newly alocated StremGen

Definition at line 43 of file stream_gen.cc.

References Stats::none, MipsISA::p, and MipsISA::random.

◆ pickStreamID()

virtual uint32_t StreamGen::pickStreamID ( )
pure virtual

Implemented in RandomStreamGen, and FixedStreamGen.

◆ pickSubStreamID()

virtual uint32_t StreamGen::pickSubStreamID ( )
pure virtual

Implemented in RandomStreamGen, and FixedStreamGen.

◆ ssidValid()

bool StreamGen::ssidValid ( ) const
inline

Returns true if the substreamID generation is valid and hence should be taken into account.

It is valid if the set of substreamIDs passed as a parameter to the TrafficGenerator is a non empty list.

Returns
true if ssid is valid, false otherwise

Definition at line 88 of file stream_gen.hh.

References substreamIds.

Member Data Documentation

◆ streamIds

std::vector<uint32_t> StreamGen::streamIds
protected

Store preset Stream and Substream IDs to use for requests This is the set of available streamIDs the generator can pick.

The actual ID being picked for a specific memory request is selected by the pickStreamID and pickSubStreamID methods.

Definition at line 98 of file stream_gen.hh.

Referenced by FixedStreamGen::FixedStreamGen(), FixedStreamGen::pickStreamID(), RandomStreamGen::pickStreamID(), and StreamGen().

◆ substreamIds

std::vector<uint32_t> StreamGen::substreamIds
protected

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

Generated on Wed Sep 30 2020 14:02:32 for gem5 by doxygen 1.8.17