gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::RandomStreamGen Class Reference

#include <stream_gen.hh>

Inheritance diagram for gem5::RandomStreamGen:
gem5::StreamGen

Public Member Functions

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

Protected Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from gem5::StreamGen
static StreamGencreate (const BaseTrafficGenParams &p)
 Factory method for constructing a Stream generator.
 
- Protected Attributes inherited from gem5::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.
 
std::vector< uint32_t > substreamIds
 

Detailed Description

Definition at line 124 of file stream_gen.hh.

Constructor & Destructor Documentation

◆ RandomStreamGen()

gem5::RandomStreamGen::RandomStreamGen ( const BaseTrafficGenParams & p)
inline

Definition at line 127 of file stream_gen.hh.

Member Function Documentation

◆ pickStreamID()

uint32_t gem5::RandomStreamGen::pickStreamID ( )
inlineoverridevirtual

Implements gem5::StreamGen.

Definition at line 131 of file stream_gen.hh.

References randomPick(), and gem5::StreamGen::streamIds.

◆ pickSubstreamID()

uint32_t gem5::RandomStreamGen::pickSubstreamID ( )
inlineoverridevirtual

Implements gem5::StreamGen.

Definition at line 134 of file stream_gen.hh.

References randomPick(), and gem5::StreamGen::substreamIds.

◆ randomPick()

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

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

Definition at line 60 of file stream_gen.cc.

References gem5::Random::random(), and gem5::random_mt.

Referenced by pickStreamID(), and pickSubstreamID().


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

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