gem5  v20.1.0.0
Public Member Functions | Protected Member Functions | List of all members
RandomStreamGen Class Reference

#include <stream_gen.hh>

Inheritance diagram for RandomStreamGen:
StreamGen

Public Member Functions

 RandomStreamGen (const BaseTrafficGenParams *p)
 
uint32_t pickStreamID () override
 
uint32_t pickSubStreamID () override
 
- Public Member Functions inherited from StreamGen
virtual ~StreamGen ()
 
bool ssidValid () const
 Returns true if the substreamID generation is valid and hence should be taken into account. More...
 

Protected Member Functions

uint32_t randomPick (const std::vector< uint32_t > &svec)
 Function to pick one of the preset Stream or Substream ID. More...
 
- Protected Member Functions inherited from StreamGen
 StreamGen (const BaseTrafficGenParams *p)
 

Additional Inherited Members

- Static Public Member Functions inherited from StreamGen
static StreamGencreate (const BaseTrafficGenParams *p)
 Factory method for constructing a Stream generator. More...
 
- Protected Attributes inherited from StreamGen
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 121 of file stream_gen.hh.

Constructor & Destructor Documentation

◆ RandomStreamGen()

RandomStreamGen::RandomStreamGen ( const BaseTrafficGenParams *  p)
inline

Definition at line 124 of file stream_gen.hh.

Member Function Documentation

◆ pickStreamID()

uint32_t RandomStreamGen::pickStreamID ( )
inlineoverridevirtual

Implements StreamGen.

Definition at line 128 of file stream_gen.hh.

References randomPick(), and StreamGen::streamIds.

◆ pickSubStreamID()

uint32_t RandomStreamGen::pickSubStreamID ( )
inlineoverridevirtual

Implements StreamGen.

Definition at line 131 of file stream_gen.hh.

References randomPick(), and StreamGen::substreamIds.

◆ randomPick()

uint32_t RandomStreamGen::randomPick ( const std::vector< uint32_t > &  svec)
protected

Function to pick one of the preset Stream or Substream ID.

Definition at line 57 of file stream_gen.cc.

References Random::random(), and random_mt.

Referenced by pickStreamID(), and pickSubStreamID().


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

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