gem5  v21.1.0.2
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
gem5::BaseTrafficGen Class Referenceabstract

The traffic generator is a module that generates stimuli for the memory system, based on a collection of simple generator behaviours that are either probabilistic or based on traces. More...

#include <base.hh>

Inheritance diagram for gem5::BaseTrafficGen:
gem5::ClockedObject gem5::SimObject gem5::Clocked gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named gem5::PyTrafficGen gem5::TrafficGen

Classes

struct  StatGroup
 
class  TrafficGenPort
 Request port specialisation for the traffic generator. More...
 

Public Member Functions

 BaseTrafficGen (const BaseTrafficGenParams &p)
 
 ~BaseTrafficGen ()
 
PortgetPort (const std::string &if_name, PortID idx=InvalidPortID) override
 Get a port with a given name and index. More...
 
void init () override
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
DrainState drain () override
 Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
std::shared_ptr< BaseGencreateIdle (Tick duration)
 
std::shared_ptr< BaseGencreateExit (Tick duration)
 
std::shared_ptr< BaseGencreateLinear (Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
 
std::shared_ptr< BaseGencreateRandom (Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
 
std::shared_ptr< BaseGencreateDram (Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts, unsigned int page_size, unsigned int nbr_of_banks, unsigned int nbr_of_banks_util, enums::AddrMap addr_mapping, unsigned int nbr_of_ranks)
 
std::shared_ptr< BaseGencreateDramRot (Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts, unsigned int page_size, unsigned int nbr_of_banks, unsigned int nbr_of_banks_util, enums::AddrMap addr_mapping, unsigned int nbr_of_ranks, unsigned int max_seq_count_per_rank)
 
std::shared_ptr< BaseGencreateHybrid (Tick duration, Addr start_addr_dram, Addr end_addr_dram, Addr blocksize_dram, Addr start_addr_nvm, Addr end_addr_nvm, Addr blocksize_nvm, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts_dram, unsigned int page_size_dram, unsigned int nbr_of_banks_dram, unsigned int nbr_of_banks_util_dram, unsigned int num_seq_pkts_nvm, unsigned int buffer_size_nvm, unsigned int nbr_of_banks_nvm, unsigned int nbr_of_banks_util_nvm, enums::AddrMap addr_mapping, unsigned int nbr_of_ranks_dram, unsigned int nbr_of_ranks_nvm, uint8_t nvm_percent)
 
std::shared_ptr< BaseGencreateNvm (Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit, unsigned int num_seq_pkts, unsigned int buffer_size, unsigned int nbr_of_banks, unsigned int nbr_of_banks_util, enums::AddrMap addr_mapping, unsigned int nbr_of_ranks)
 
std::shared_ptr< BaseGencreateStrided (Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Addr stride_size, int gen_id, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
 
std::shared_ptr< BaseGencreateTrace (Tick duration, const std::string &trace_file, Addr addr_offset)
 
- Public Member Functions inherited from gem5::ClockedObject
 ClockedObject (const ClockedObjectParams &p)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint. More...
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint. More...
 
virtual void regProbePoints ()
 Register probe points for this object. More...
 
virtual void regProbeListeners ()
 Register probe listeners for this object. More...
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object. More...
 
virtual void startup ()
 startup() is the final initialization call before simulation. More...
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining. More...
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes. More...
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::EventManager
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick) -1)
 This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More...
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue. More...
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from gem5::Drainable
DrainState drainState () const
 Return the current drain state of an object. More...
 
virtual void notifyFork ()
 Notify a child process of a fork. More...
 
- Public Member Functions inherited from gem5::statistics::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group. More...
 
virtual ~Group ()
 
virtual void regStats ()
 Callback to set stat parameters. More...
 
virtual void resetStats ()
 Callback to reset stats. More...
 
virtual void preDumpStats ()
 Callback before stats are dumped. More...
 
void addStat (statistics::Info *info)
 Register a stat with this group. More...
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object. More...
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object. More...
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block. More...
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group. More...
 
void mergeStatGroup (Group *block)
 Merge the contents (stats & children) of a block to this block. More...
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 
- Public Member Functions inherited from gem5::Clocked
void updateClockPeriod ()
 Update the tick to the current tick. More...
 
Tick clockEdge (Cycles cycles=Cycles(0)) const
 Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More...
 
Cycles curCycle () const
 Determine the current cycle, corresponding to a tick aligned to a clock edge. More...
 
Tick nextCycle () const
 Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More...
 
uint64_t frequency () const
 
Tick clockPeriod () const
 
double voltage () const
 
Cycles ticksToCycles (Tick t) const
 
Tick cyclesToTicks (Cycles c) const
 

Protected Member Functions

void start ()
 
virtual std::shared_ptr< BaseGennextGenerator ()=0
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain. More...
 
void signalDrainDone () const
 Signal that an object is drained. More...
 
- Protected Member Functions inherited from gem5::Clocked
 Clocked (ClockDomain &clk_domain)
 Create a clocked object and set the clock domain based on the parameters. More...
 
 Clocked (Clocked &)=delete
 
Clockedoperator= (Clocked &)=delete
 
virtual ~Clocked ()
 Virtual destructor due to inheritance. More...
 
void resetClock () const
 Reset the object's clock using the current global tick value. More...
 
virtual void clockPeriodUpdated ()
 A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. More...
 

Protected Attributes

System *const system
 The system used to determine which mode we are currently operating in. More...
 
const bool elasticReq
 Determine whether to add elasticity in the request injection, thus responding to backpressure by slowing things down. More...
 
const Tick progressCheck
 Time to tolerate waiting for retries (not making progress), until we declare things broken. More...
 
std::unordered_map< RequestPtr, TickwaitingResp
 Reqs waiting for response. More...
 
gem5::BaseTrafficGen::StatGroup stats
 
const RequestorID requestorId
 RequestorID used in generated requests. More...
 
std::shared_ptr< BaseGenactiveGenerator
 Currently active generator. More...
 
std::unique_ptr< StreamGenstreamGenerator
 Stream/SubstreamID Generator. More...
 
- Protected Attributes inherited from gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from gem5::EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Private Member Functions

void recvReqRetry ()
 Receive a retry from the neighbouring port and attempt to resend the waiting packet. More...
 
void retryReq ()
 
bool recvTimingResp (PacketPtr pkt)
 
void transition ()
 Transition to the next generator. More...
 
void scheduleUpdate ()
 Schedule the update event based on nextPacketTick and nextTransitionTick. More...
 
void noProgress ()
 Method to inform the user we have made no progress. More...
 
void update ()
 Schedules event for next update and generates a new packet or requests a new generatoir depending on the current time. More...
 
bool allocateWaitingRespSlot (PacketPtr pkt)
 Puts this packet in the waitingResp list and returns true if we are above the maximum number of oustanding requests. More...
 

Private Attributes

EventFunctionWrapper noProgressEvent
 Event to keep track of our progress, or lack thereof. More...
 
Tick nextTransitionTick
 Time of next transition. More...
 
Tick nextPacketTick
 Time of the next packet. More...
 
const int maxOutstandingReqs
 
TrafficGenPort port
 The instance of request port used by the traffic generator. More...
 
PacketPtr retryPkt
 Packet waiting to be sent. More...
 
Tick retryPktTick
 Tick when the stalled packet was meant to be sent. More...
 
bool blockedWaitingResp
 Set when we blocked waiting for outstanding reqs. More...
 
EventFunctionWrapper updateEvent
 Event for scheduling updates. More...
 

Friends

class BaseGen
 

Additional Inherited Members

- Public Types inherited from gem5::ClockedObject
using Params = ClockedObjectParams
 Parameters of ClockedObject. More...
 
- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 
- Static Public Member Functions inherited from gem5::SimObject
static void serializeAll (const std::string &cpt_dir)
 Create a checkpoint by serializing all SimObjects in the system. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
static void setSimObjectResolver (SimObjectResolver *resolver)
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
static SimObjectResolvergetSimObjectResolver ()
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Public Attributes inherited from gem5::ClockedObject
PowerStatepowerState
 

Detailed Description

The traffic generator is a module that generates stimuli for the memory system, based on a collection of simple generator behaviours that are either probabilistic or based on traces.

It can be used stand alone for creating test cases for interconnect and memory controllers, or function as a black box replacement for system components that are not yet modelled in detail, e.g. a video engine or baseband subsystem.

Definition at line 67 of file base.hh.

Constructor & Destructor Documentation

◆ BaseTrafficGen()

gem5::BaseTrafficGen::BaseTrafficGen ( const BaseTrafficGenParams &  p)

Definition at line 70 of file base.cc.

References noProgress().

◆ ~BaseTrafficGen()

gem5::BaseTrafficGen::~BaseTrafficGen ( )

Definition at line 89 of file base.cc.

Member Function Documentation

◆ allocateWaitingRespSlot()

bool gem5::BaseTrafficGen::allocateWaitingRespSlot ( PacketPtr  pkt)
inlineprivate

Puts this packet in the waitingResp list and returns true if we are above the maximum number of oustanding requests.

Definition at line 179 of file base.hh.

References gem5::curTick(), maxOutstandingReqs, gem5::Packet::needsResponse(), gem5::Packet::req, and waitingResp.

Referenced by update().

◆ createDram()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createDram ( Tick  duration,
Addr  start_addr,
Addr  end_addr,
Addr  blocksize,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit,
unsigned int  num_seq_pkts,
unsigned int  page_size,
unsigned int  nbr_of_banks,
unsigned int  nbr_of_banks_util,
enums::AddrMap  addr_mapping,
unsigned int  nbr_of_ranks 
)

Definition at line 412 of file base.cc.

References gem5::System::cacheLineSize(), requestorId, and system.

Referenced by gem5::TrafficGen::parseConfig().

◆ createDramRot()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createDramRot ( Tick  duration,
Addr  start_addr,
Addr  end_addr,
Addr  blocksize,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit,
unsigned int  num_seq_pkts,
unsigned int  page_size,
unsigned int  nbr_of_banks,
unsigned int  nbr_of_banks_util,
enums::AddrMap  addr_mapping,
unsigned int  nbr_of_ranks,
unsigned int  max_seq_count_per_rank 
)

Definition at line 436 of file base.cc.

References gem5::System::cacheLineSize(), requestorId, and system.

Referenced by gem5::TrafficGen::parseConfig().

◆ createExit()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createExit ( Tick  duration)

Definition at line 377 of file base.cc.

References requestorId.

Referenced by gem5::TrafficGen::parseConfig().

◆ createHybrid()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createHybrid ( Tick  duration,
Addr  start_addr_dram,
Addr  end_addr_dram,
Addr  blocksize_dram,
Addr  start_addr_nvm,
Addr  end_addr_nvm,
Addr  blocksize_nvm,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit,
unsigned int  num_seq_pkts_dram,
unsigned int  page_size_dram,
unsigned int  nbr_of_banks_dram,
unsigned int  nbr_of_banks_util_dram,
unsigned int  num_seq_pkts_nvm,
unsigned int  buffer_size_nvm,
unsigned int  nbr_of_banks_nvm,
unsigned int  nbr_of_banks_util_nvm,
enums::AddrMap  addr_mapping,
unsigned int  nbr_of_ranks_dram,
unsigned int  nbr_of_ranks_nvm,
uint8_t  nvm_percent 
)

Definition at line 463 of file base.cc.

References gem5::System::cacheLineSize(), requestorId, and system.

◆ createIdle()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createIdle ( Tick  duration)

Definition at line 370 of file base.cc.

References requestorId.

Referenced by gem5::TrafficGen::parseConfig().

◆ createLinear()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createLinear ( Tick  duration,
Addr  start_addr,
Addr  end_addr,
Addr  blocksize,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit 
)

Definition at line 384 of file base.cc.

References gem5::System::cacheLineSize(), requestorId, and system.

Referenced by gem5::TrafficGen::parseConfig().

◆ createNvm()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createNvm ( Tick  duration,
Addr  start_addr,
Addr  end_addr,
Addr  blocksize,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit,
unsigned int  num_seq_pkts,
unsigned int  buffer_size,
unsigned int  nbr_of_banks,
unsigned int  nbr_of_banks_util,
enums::AddrMap  addr_mapping,
unsigned int  nbr_of_ranks 
)

Definition at line 506 of file base.cc.

References gem5::System::cacheLineSize(), requestorId, and system.

Referenced by gem5::TrafficGen::parseConfig().

◆ createRandom()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createRandom ( Tick  duration,
Addr  start_addr,
Addr  end_addr,
Addr  blocksize,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit 
)

Definition at line 398 of file base.cc.

References gem5::System::cacheLineSize(), requestorId, and system.

Referenced by gem5::TrafficGen::parseConfig().

◆ createStrided()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createStrided ( Tick  duration,
Addr  start_addr,
Addr  end_addr,
Addr  blocksize,
Addr  stride_size,
int  gen_id,
Tick  min_period,
Tick  max_period,
uint8_t  read_percent,
Addr  data_limit 
)

Definition at line 530 of file base.cc.

References gem5::System::cacheLineSize(), requestorId, and system.

◆ createTrace()

std::shared_ptr< BaseGen > gem5::BaseTrafficGen::createTrace ( Tick  duration,
const std::string &  trace_file,
Addr  addr_offset 
)

Definition at line 546 of file base.cc.

References panic, and requestorId.

Referenced by gem5::TrafficGen::parseConfig().

◆ drain()

DrainState gem5::BaseTrafficGen::drain ( )
overridevirtual

Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight.

Draining is mostly used before forking and creating a check point.

This function notifies an object that it needs to drain its state.

If the object does not need further simulation to drain internal buffers, it returns DrainState::Drained and automatically switches to the Drained state. If the object needs more simulation, it returns DrainState::Draining and automatically enters the Draining state. Other return values are invalid.

Note
An object that has entered the Drained state can be disturbed by other objects in the system and consequently stop being drained. These perturbations are not visible in the drain state. The simulator therefore repeats the draining process until all objects return DrainState::Drained on the first call to drain().
Returns
DrainState::Drained if the object is drained at this point in time, DrainState::Draining if it needs further simulation.

Implements gem5::Drainable.

Definition at line 113 of file base.cc.

References gem5::EventManager::deschedule(), gem5::Drained, gem5::Draining, gem5::MaxTick, nextPacketTick, nextTransitionTick, retryPkt, gem5::Event::scheduled(), and updateEvent.

◆ getPort()

Port & gem5::BaseTrafficGen::getPort ( const std::string &  if_name,
PortID  idx = InvalidPortID 
)
overridevirtual

Get a port with a given name and index.

This is used at binding time and returns a reference to a protocol-agnostic port.

gem5 has a request and response port interface. All memory objects are connected together via ports. These ports provide a rigid interface between these memory objects. These ports implement three different memory system modes: timing, atomic, and functional. The most important mode is the timing mode and here timing mode is used for conducting cycle-level timing experiments. The other modes are only used in special circumstances and should not be used to conduct cycle-level timing experiments. The other modes are only used in special circumstances. These ports allow SimObjects to communicate with each other.

Parameters
if_namePort name
idxIndex in the case of a VectorPort
Returns
A reference to the given port

Reimplemented from gem5::SimObject.

Definition at line 94 of file base.cc.

References gem5::SimObject::getPort(), and port.

◆ init()

void gem5::BaseTrafficGen::init ( )
overridevirtual

init() is called after all C++ SimObjects have been created and all ports are connected.

Initializations that are independent of unserialization but rely on a fully instantiated and connected SimObject graph should be done here.

Reimplemented from gem5::SimObject.

Reimplemented in gem5::TrafficGen.

Definition at line 104 of file base.cc.

References fatal, gem5::SimObject::init(), gem5::Port::isConnected(), gem5::Named::name(), and port.

Referenced by gem5::TrafficGen::init().

◆ nextGenerator()

virtual std::shared_ptr<BaseGen> gem5::BaseTrafficGen::nextGenerator ( )
protectedpure virtual

Implemented in gem5::TrafficGen, and gem5::PyTrafficGen.

Referenced by transition().

◆ noProgress()

void gem5::BaseTrafficGen::noProgress ( )
private

Method to inform the user we have made no progress.

Definition at line 329 of file base.cc.

References fatal, gem5::Named::name(), and progressCheck.

Referenced by BaseTrafficGen().

◆ recvReqRetry()

void gem5::BaseTrafficGen::recvReqRetry ( )
private

Receive a retry from the neighbouring port and attempt to resend the waiting packet.

Definition at line 289 of file base.cc.

References DPRINTF, gem5::BaseTrafficGen::StatGroup::numRetries, retryReq(), and stats.

Referenced by gem5::BaseTrafficGen::TrafficGenPort::recvReqRetry().

◆ recvTimingResp()

bool gem5::BaseTrafficGen::recvTimingResp ( PacketPtr  pkt)
private

◆ retryReq()

void gem5::BaseTrafficGen::retryReq ( )
private

◆ scheduleUpdate()

void gem5::BaseTrafficGen::scheduleUpdate ( )
private

Schedule the update event based on nextPacketTick and nextTransitionTick.

Definition at line 258 of file base.cc.

References activeGenerator, gem5::curTick(), DPRINTF, gem5::MaxTick, nextPacketTick, nextTransitionTick, gem5::EventManager::schedule(), transition(), and updateEvent.

Referenced by retryReq(), start(), and update().

◆ serialize()

void gem5::BaseTrafficGen::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Reimplemented in gem5::TrafficGen.

Definition at line 132 of file base.cc.

References DPRINTF, gem5::Named::name(), nextPacketTick, nextTransitionTick, gem5::Event::scheduled(), SERIALIZE_SCALAR, updateEvent, warn, and gem5::Event::when().

Referenced by gem5::TrafficGen::serialize().

◆ start()

void gem5::BaseTrafficGen::start ( )
protected

Definition at line 282 of file base.cc.

References scheduleUpdate(), and transition().

Referenced by gem5::TrafficGen::initState(), and gem5::PyTrafficGen::start().

◆ transition()

void gem5::BaseTrafficGen::transition ( )
private

◆ unserialize()

void gem5::BaseTrafficGen::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Reimplemented in gem5::TrafficGen.

Definition at line 152 of file base.cc.

References gem5::Named::name(), nextPacketTick, nextTransitionTick, gem5::EventManager::schedule(), UNSERIALIZE_SCALAR, updateEvent, and warn.

Referenced by gem5::TrafficGen::unserialize().

◆ update()

void gem5::BaseTrafficGen::update ( )
private

Friends And Related Function Documentation

◆ BaseGen

friend class BaseGen
friend

Definition at line 69 of file base.hh.

Member Data Documentation

◆ activeGenerator

std::shared_ptr<BaseGen> gem5::BaseTrafficGen::activeGenerator
protected

Currently active generator.

Definition at line 343 of file base.hh.

Referenced by gem5::TrafficGen::nextGenerator(), retryReq(), scheduleUpdate(), transition(), and update().

◆ blockedWaitingResp

bool gem5::BaseTrafficGen::blockedWaitingResp
private

Set when we blocked waiting for outstanding reqs.

Definition at line 173 of file base.hh.

Referenced by recvTimingResp(), retryReq(), and update().

◆ elasticReq

const bool gem5::BaseTrafficGen::elasticReq
protected

Determine whether to add elasticity in the request injection, thus responding to backpressure by slowing things down.

Definition at line 82 of file base.hh.

Referenced by retryReq(), transition(), and update().

◆ maxOutstandingReqs

const int gem5::BaseTrafficGen::maxOutstandingReqs
private

Definition at line 126 of file base.hh.

Referenced by allocateWaitingRespSlot().

◆ nextPacketTick

Tick gem5::BaseTrafficGen::nextPacketTick
private

Time of the next packet.

Definition at line 124 of file base.hh.

Referenced by drain(), retryReq(), scheduleUpdate(), serialize(), transition(), unserialize(), and update().

◆ nextTransitionTick

Tick gem5::BaseTrafficGen::nextTransitionTick
private

Time of next transition.

Definition at line 121 of file base.hh.

Referenced by drain(), retryReq(), scheduleUpdate(), serialize(), transition(), unserialize(), and update().

◆ noProgressEvent

EventFunctionWrapper gem5::BaseTrafficGen::noProgressEvent
private

Event to keep track of our progress, or lack thereof.

Definition at line 118 of file base.hh.

Referenced by update().

◆ port

TrafficGenPort gem5::BaseTrafficGen::port
private

The instance of request port used by the traffic generator.

Definition at line 164 of file base.hh.

Referenced by getPort(), init(), retryReq(), and update().

◆ progressCheck

const Tick gem5::BaseTrafficGen::progressCheck
protected

Time to tolerate waiting for retries (not making progress), until we declare things broken.

Definition at line 88 of file base.hh.

Referenced by noProgress(), and update().

◆ requestorId

const RequestorID gem5::BaseTrafficGen::requestorId
protected

RequestorID used in generated requests.

Definition at line 340 of file base.hh.

Referenced by createDram(), createDramRot(), createExit(), createHybrid(), createIdle(), createLinear(), createNvm(), createRandom(), createStrided(), and createTrace().

◆ retryPkt

PacketPtr gem5::BaseTrafficGen::retryPkt
private

Packet waiting to be sent.

Definition at line 167 of file base.hh.

Referenced by drain(), retryReq(), and update().

◆ retryPktTick

Tick gem5::BaseTrafficGen::retryPktTick
private

Tick when the stalled packet was meant to be sent.

Definition at line 170 of file base.hh.

Referenced by retryReq(), and update().

◆ stats

gem5::BaseTrafficGen::StatGroup gem5::BaseTrafficGen::stats
protected

◆ streamGenerator

std::unique_ptr<StreamGen> gem5::BaseTrafficGen::streamGenerator
protected

Stream/SubstreamID Generator.

Definition at line 346 of file base.hh.

Referenced by update().

◆ system

System* const gem5::BaseTrafficGen::system
protected

The system used to determine which mode we are currently operating in.

Definition at line 76 of file base.hh.

Referenced by createDram(), createDramRot(), createHybrid(), createLinear(), createNvm(), createRandom(), createStrided(), gem5::TrafficGen::initState(), and update().

◆ updateEvent

EventFunctionWrapper gem5::BaseTrafficGen::updateEvent
private

Event for scheduling updates.

Definition at line 191 of file base.hh.

Referenced by drain(), scheduleUpdate(), serialize(), transition(), and unserialize().

◆ waitingResp

std::unordered_map<RequestPtr,Tick> gem5::BaseTrafficGen::waitingResp
protected

Reqs waiting for response.

Definition at line 195 of file base.hh.

Referenced by allocateWaitingRespSlot(), and recvTimingResp().


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

Generated on Tue Sep 21 2021 12:27:20 for gem5 by doxygen 1.8.17