49 : _name(obj.
name()), requestorId(requestor_id),
68 uint8_t* pkt_data =
new uint8_t[req->getSize()];
72 std::fill_n(pkt_data, req->getSize(), (uint8_t)
requestorId);
81 Addr _blocksize,
Addr cacheline_size,
83 uint8_t read_percent,
Addr data_limit)
84 :
BaseGen(obj, requestor_id, _duration),
85 startAddr(start_addr), endAddr(end_addr),
86 blocksize(_blocksize), cacheLineSize(cacheline_size),
87 minPeriod(min_period), maxPeriod(max_period),
88 readPercent(read_percent), dataLimit(data_limit)
91 fatal(
"TrafficGen %s block size (%d) is larger than "
92 "cache line size (%d)\n",
name(),
95 if (read_percent > 100)
96 fatal(
"%s cannot have more than 100% reads",
name());
98 if (min_period > max_period)
99 fatal(
"%s cannot have min_period > max_period",
name());
Declaration of the base generator class for all generators.
Base class for all generators, with the shared functionality and virtual functions for entering,...
PacketPtr getPacket(Addr addr, unsigned size, const MemCmd &cmd, Request::FlagsType flags=0)
Generate a new request and associated packet.
BaseGen(SimObject &obj, RequestorID requestor_id, Tick _duration)
Create a base generator.
const RequestorID requestorId
The RequestorID used for generating requests.
std::string name() const
Get the name, useful for DPRINTFs.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
Abstract superclass for simulation objects.
const Addr cacheLineSize
Cache line size in the simulated system.
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)
const Addr blocksize
Blocksize and address increment.
#define fatal(...)
This implements a cprintf based fatal() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< Request > RequestPtr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
const std::string & name()