Go to the documentation of this file.
38 #ifndef __CPU_TRAFFIC_GEN_BASE_HH__
39 #define __CPU_TRAFFIC_GEN_BASE_HH__
43 #include <unordered_map>
46 #include "enums/AddrMap.hh"
53 struct BaseTrafficGenParams;
248 void init()
override;
263 uint8_t read_percent,
Addr data_limit);
269 uint8_t read_percent,
Addr data_limit);
275 uint8_t read_percent,
Addr data_limit,
276 unsigned int num_seq_pkts,
unsigned int page_size,
277 unsigned int nbr_of_banks,
unsigned int nbr_of_banks_util,
278 Enums::AddrMap addr_mapping,
279 unsigned int nbr_of_ranks);
285 uint8_t read_percent,
Addr data_limit,
286 unsigned int num_seq_pkts,
unsigned int page_size,
287 unsigned int nbr_of_banks,
unsigned int nbr_of_banks_util,
288 Enums::AddrMap addr_mapping,
289 unsigned int nbr_of_ranks,
290 unsigned int max_seq_count_per_rank);
294 Addr start_addr_dram,
Addr end_addr_dram,
Addr blocksize_dram,
295 Addr start_addr_nvm,
Addr end_addr_nvm,
Addr blocksize_nvm,
297 uint8_t read_percent,
Addr data_limit,
298 unsigned int num_seq_pkts_dram,
unsigned int page_size_dram,
299 unsigned int nbr_of_banks_dram,
unsigned int nbr_of_banks_util_dram,
300 unsigned int num_seq_pkts_nvm,
unsigned int buffer_size_nvm,
301 unsigned int nbr_of_banks_nvm,
unsigned int nbr_of_banks_util_nvm,
302 Enums::AddrMap addr_mapping,
303 unsigned int nbr_of_ranks_dram,
304 unsigned int nbr_of_ranks_nvm,
305 uint8_t nvm_percent);
311 uint8_t read_percent,
Addr data_limit,
312 unsigned int num_seq_pkts,
unsigned int buffer_size,
313 unsigned int nbr_of_banks,
unsigned int nbr_of_banks_util,
314 Enums::AddrMap addr_mapping,
315 unsigned int nbr_of_ranks);
319 const std::string& trace_file,
Addr addr_offset);
338 #endif //__CPU_TRAFFIC_GEN_BASE_HH__
Stats::Scalar totalReadLatency
Total num of ticks read reqs took to complete
std::shared_ptr< BaseGen > 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)
Base class for all generators, with the shared functionality and virtual functions for entering,...
const PortID InvalidPortID
TrafficGenPort port
The instance of request port used by the traffic generator.
void recvReqRetry()
Receive a retry from the neighbouring port and attempt to resend the waiting packet.
std::shared_ptr< BaseGen > createRandom(Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
Stats::Formula avgReadLatency
Avg num of ticks each read req took to complete
std::shared_ptr< BaseGen > activeGenerator
Currently active generator.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void transition()
Transition to the next generator.
bool allocateWaitingRespSlot(PacketPtr pkt)
Puts this packet in the waitingResp list and returns true if we are above the maximum number of ousta...
uint64_t Tick
Tick count type.
Request port specialisation for the traffic generator.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
RequestPtr req
A pointer to the original request.
Stats::Formula readBW
Read bandwidth in bytes/s
const Tick progressCheck
Time to tolerate waiting for retries (not making progress), until we declare things broken.
EventFunctionWrapper noProgressEvent
Event to keep track of our progress, or lack thereof.
std::shared_ptr< BaseGen > 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)
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Stats::Scalar totalWrites
Count the number writes.
Stats::Scalar bytesRead
Count the number of bytes read.
void noProgress()
Method to inform the user we have made no progress.
DrainState
Object drain/handover states.
This is a simple scalar statistic, like a counter.
BaseTrafficGen(const BaseTrafficGenParams *p)
std::shared_ptr< BaseGen > 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)
Tick nextTransitionTick
Time of next transition.
The traffic generator is a module that generates stimuli for the memory system, based on a collection...
Stats::Formula avgWriteLatency
Avg num of ticks each write reqs took to complete
PacketPtr retryPkt
Packet waiting to be sent.
std::shared_ptr< BaseGen > createLinear(Tick duration, Addr start_addr, Addr end_addr, Addr blocksize, Tick min_period, Tick max_period, uint8_t read_percent, Addr data_limit)
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Ports are used to interface objects to each other.
bool needsResponse() const
Stats::Scalar numRetries
Count the number of retries.
virtual std::shared_ptr< BaseGen > nextGenerator()=0
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
std::shared_ptr< BaseGen > createTrace(Tick duration, const std::string &trace_file, Addr addr_offset)
BaseTrafficGen & trafficGen
Stats::Scalar totalWriteLatency
Total num of ticks write reqs took to complete
bool blockedWaitingResp
Set when we blocked waiting for outstanding reqs.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
std::unique_ptr< StreamGen > streamGenerator
Stream/SubStreamID Generator.
Stats::Scalar numPackets
Count the number of generated packets.
Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from our peer.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string name() const
Return port name (for DPRINTF).
void recvTimingSnoopReq(PacketPtr pkt)
Receive a timing snoop request from the peer.
std::unordered_map< RequestPtr, Tick > waitingResp
Reqs waiting for response.
void serialize(CheckpointOut &cp) const override
Serialize an object.
Stats::Scalar numSuppressed
Count the number of dropped requests.
StatGroup(Stats::Group *parent)
void scheduleUpdate()
Schedule the update event based on nextPacketTick and nextTransitionTick.
Tick nextPacketTick
Time of the next packet.
const RequestorID requestorId
RequestorID used in generated requests.
Stats::Scalar totalReads
Count the number reads.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
bool recvTimingResp(PacketPtr pkt)
EventFunctionWrapper updateEvent
Event for scheduling updates.
BaseTrafficGen::StatGroup stats
std::ostream CheckpointOut
std::shared_ptr< BaseGen > createIdle(Tick duration)
Tick retryPktTick
Tick when the stalled packet was meant to be sent.
const bool elasticReq
Determine whether to add elasticity in the request injection, thus responding to backpressure by slow...
Stats::Scalar retryTicks
Count the time incurred from back-pressure.
void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
const int maxOutstandingReqs
Stats::Formula writeBW
Write bandwidth in bytes/s
std::shared_ptr< BaseGen > createExit(Tick duration)
System *const system
The system used to determine which mode we are currently operating in.
void update()
Schedules event for next update and generates a new packet or requests a new generatoir depending on ...
TrafficGenPort(const std::string &name, BaseTrafficGen &traffic_gen)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::shared_ptr< BaseGen > 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)
Stats::Scalar bytesWritten
Count the number of bytes written.
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17