gem5
[DEVELOP-FOR-23.0]
|
The strided generator generates sequential requests from a start to an end address, with a fixed block size. More...
#include <strided_gen.hh>
Public Member Functions | |
StridedGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, Addr stride_size, int gen_id, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit) | |
Create a strided address sequence generator. More... | |
void | enter () |
Enter this generator state. More... | |
PacketPtr | getNextPacket () |
Get the next generated packet. More... | |
Tick | nextPacketTick (bool elastic, Tick delay) const |
Determine the tick when the next packet is available. More... | |
![]() | |
StochasticGen (SimObject &obj, RequestorID requestor_id, Tick _duration, Addr start_addr, Addr end_addr, Addr _blocksize, Addr cacheline_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit) | |
![]() | |
BaseGen (SimObject &obj, RequestorID requestor_id, Tick _duration) | |
Create a base generator. More... | |
virtual | ~BaseGen () |
std::string | name () const |
Get the name, useful for DPRINTFs. More... | |
virtual void | exit () |
Exit this generator state. More... | |
Private Attributes | |
Addr | nextAddr |
Address of next request. More... | |
Addr | dataManipulated |
Counter to determine the amount of data manipulated. More... | |
Addr | strideSize |
int | genID |
This param is used to indicate the order of a traffic generator among a set of traffic generators, then it is used to calculate the start address separately for each traffic generator in a list of generators. More... | |
Additional Inherited Members | |
![]() | |
const Tick | duration |
Time to spend in this state. More... | |
![]() | |
PacketPtr | getPacket (Addr addr, unsigned size, const MemCmd &cmd, Request::FlagsType flags=0) |
Generate a new request and associated packet. More... | |
![]() | |
const Addr | startAddr |
Start of address range. More... | |
const Addr | endAddr |
End of address range. More... | |
const Addr | blocksize |
Blocksize and address increment. More... | |
const Addr | cacheLineSize |
Cache line size in the simulated system. More... | |
const Tick | minPeriod |
Request generation period. More... | |
const Tick | maxPeriod |
const uint8_t | readPercent |
Percent of generated transactions that should be reads. More... | |
const Addr | dataLimit |
Maximum amount of data to manipulate. More... | |
![]() | |
const std::string | _name |
Name to use for status and debug printing. More... | |
const RequestorID | requestorId |
The RequestorID used for generating requests. More... | |
The strided generator generates sequential requests from a start to an end address, with a fixed block size.
A fraction of the requests are reads, as determined by the read percent. There is an optional data limit for when to stop generating new requests.
Definition at line 62 of file strided_gen.hh.
|
inline |
Create a strided address sequence generator.
Set min_period == max_period for a fixed inter-transaction time.
obj | SimObject owning this sequence generator |
requestor_id | RequestorID related to the memory requests |
_duration | duration of this state before transitioning |
start_addr | Start address |
end_addr | End address |
_blocksize | Size used for transactions injected |
cacheline_size | cache line size in the system |
stride_size | The strided size for consecutive requests |
gen_id | The order of traffic generator in a list of strided \ traffic generators, this param is used to offset the start address of \ each generator accordingly with others. |
min_period | Lower limit of random inter-transaction time |
max_period | Upper limit of random inter-transaction time |
read_percent | Percent of transactions that are reads |
data_limit | Upper limit on how much data to read/write |
Definition at line 88 of file strided_gen.hh.
|
virtual |
Enter this generator state.
Implements gem5::BaseGen.
Definition at line 50 of file strided_gen.cc.
References gem5::StochasticGen::blocksize, dataManipulated, genID, nextAddr, and gem5::StochasticGen::startAddr.
|
virtual |
Get the next generated packet.
Implements gem5::BaseGen.
Definition at line 58 of file strided_gen.cc.
References gem5::StochasticGen::blocksize, dataManipulated, DPRINTF, gem5::StochasticGen::endAddr, genID, gem5::BaseGen::getPacket(), nextAddr, gem5::Random::random(), gem5::random_mt, gem5::StochasticGen::readPercent, gem5::MemCmd::ReadReq, gem5::StochasticGen::startAddr, strideSize, and gem5::MemCmd::WriteReq.
Determine the tick when the next packet is available.
MaxTick means that there will not be any further packets in the current activation cycle of the generator.
elastic | should the injection respond to flow control or not |
delay | time the previous packet spent waiting |
Implements gem5::BaseGen.
Definition at line 91 of file strided_gen.cc.
References gem5::curTick(), gem5::StochasticGen::dataLimit, dataManipulated, DPRINTF, gem5::StochasticGen::maxPeriod, gem5::MaxTick, gem5::StochasticGen::minPeriod, gem5::Random::random(), gem5::random_mt, and sc_core::wait().
|
private |
Counter to determine the amount of data manipulated.
Used to determine if we should continue generating requests.
Definition at line 119 of file strided_gen.hh.
Referenced by enter(), getNextPacket(), and nextPacketTick().
|
private |
This param is used to indicate the order of a traffic generator among a set of traffic generators, then it is used to calculate the start address separately for each traffic generator in a list of generators.
Definition at line 130 of file strided_gen.hh.
Referenced by enter(), and getNextPacket().
|
private |
Address of next request.
Definition at line 112 of file strided_gen.hh.
Referenced by enter(), and getNextPacket().
|
private |
Definition at line 122 of file strided_gen.hh.
Referenced by getNextPacket().