Go to the documentation of this file.
38 #ifndef __CPU_TRAFFIC_GEN_TRAFFIC_GEN_HH__
39 #define __CPU_TRAFFIC_GEN_TRAFFIC_GEN_HH__
41 #include <unordered_map>
45 struct TrafficGenParams;
116 std::unordered_map<uint32_t, std::shared_ptr<BaseGen>>
states;
127 void init()
override;
135 #endif //__CPU_TRAFFIC_GEN_TRAFFIC_GEN_HH__
Struct to represent a probabilistic transition during parsing.
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::string resolveFile(const std::string &name)
Resolve a file path in the configuration file.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::unordered_map< uint32_t, std::shared_ptr< BaseGen > > states
Map of generator states.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
The traffic generator is a module that generates stimuli for the memory system, based on a collection...
size_t nextState()
Use the transition matrix to find the next state index.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
std::shared_ptr< BaseGen > nextGenerator() override
uint32_t currState
Index of the current state.
TrafficGen(const TrafficGenParams *p)
std::vector< std::vector< double > > transitionMatrix
State transition matrix.
virtual const std::string name() const
void parseConfig()
Parse the config file and build the state map and transition matrix.
std::ostream CheckpointOut
const std::string configFile
The config file to parse.
The traffic generator is a module that generates stimuli for the memory system, based on a collection...
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17