44#include "debug/TrafficGen.hh"
54 uint8_t read_percent,
Addr data_limit)
55 :
StochasticGen(obj, requestor_id, duration, start_addr, end_addr,
56 block_size, cacheline_size, min_period, max_period,
57 read_percent, data_limit),
58 offset(
offset), superblockSize(superblock_size), strideSize(stride_size),
59 nextAddr(0), dataManipulated(0)
61 assert(superblock_size % block_size == 0);
62 assert(
offset % superblock_size == 0);
63 assert(stride_size % superblock_size == 0);
PacketPtr getPacket(Addr addr, unsigned size, const MemCmd &cmd, Request::FlagsType flags=0)
Generate a new request and associated packet.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Abstract superclass for simulation objects.
const Addr startAddr
Start of address range.
const Tick minPeriod
Request generation period.
const Addr dataLimit
Maximum amount of data to manipulate.
const Addr endAddr
End of address range.
const Addr blocksize
Blocksize and address increment.
const uint8_t readPercent
Percent of generated transactions that should be reads.
Addr dataManipulated
Counter to determine the amount of data manipulated.
PacketPtr getNextPacket()
Get the next generated packet.
StridedGen(SimObject &obj, RequestorID requestor_id, Tick duration, Addr cacheline_size, Addr start_addr, Addr end_addr, Addr offset, Addr block_size, Addr superblock_size, Addr stride_size, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
Create a strided address sequence generator.
Addr nextAddr
Address of next request.
Tick nextPacketTick(bool elastic, Tick delay) const
Determine the tick when the next packet is available.
void enter()
Enter this generator state.
The traffic generator is a module that generates stimuli for the memory system, based on a collection...
std::enable_if_t< std::is_integral_v< T >, T > random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
Declaration of the strided generator that generates sequential requests.