29#ifndef __CPU_TESTERS_SPATTER_GEN_SPATTER_GEN_HH__
30#define __CPU_TESTERS_SPATTER_GEN_SPATTER_GEN_HH__
33#include <unordered_map>
39#include "enums/SpatterKernelType.hh"
40#include "enums/SpatterProcessingMode.hh"
43#include "params/SpatterGen.hh"
98 const std::string &
name):
233 virtual void startup()
override;
240 uint32_t
id, uint32_t delta, uint32_t
count,
242 size_t index_size,
Addr base_index_addr,
243 size_t value_size,
Addr base_value_addr,
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
ClockedObjectParams Params
Parameters of ClockedObject.
std::function< void(void)> callback
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
const std::string name() const
Return port name (for DPRINTF).
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
SpatterGenEvent(const std::function< void(void)> &callback, const std::string &name)
virtual void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
void sendPacket(PacketPtr pkt)
virtual bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
SpatterGenPort(SpatterGen *owner, const std::string &name)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
bool initAccessOk(int int_regs, int fp_regs, Tick when) const
bool recvTimingResp(PacketPtr pkt)
TimedQueue< SpatterAccess * > receiveBuffer
void processNextGenEvent()
SpatterProcessingMode mode
std::vector< Tick > portBusyUntil
bool ultAccessOk(int int_regs, int fp_regs, Tick when) const
SpatterGenEvent nextSendEvent
void processNextSendEvent()
SpatterGen(const Params ¶ms)
enums::SpatterKernelType SpatterKernelType
Tick firstGeneratorAvailableTime
virtual void startup() override
startup() is the final initialization call before simulation.
void proceedPastSyncPoint()
void addKernel(uint32_t id, uint32_t delta, uint32_t count, SpatterKernelType type, size_t index_size, Addr base_index_addr, size_t value_size, Addr base_value_addr, const std::vector< uint32_t > &indices)
bool interAccessOk(int int_regs, int fp_regs, Tick when) const
SpatterGenEvent nextGenEvent
Tick firstPortAvailableTime
std::queue< SpatterKernel > kernels
enums::SpatterProcessingMode SpatterProcessingMode
std::unordered_map< RequestPtr, Tick > requestDepartureTime
TimedQueue< PacketPtr > requestBuffer
std::vector< Tick > generatorBusyUntil
void scheduleNextSendEvent(Tick when)
void scheduleNextGenEvent(Tick when)
int numPendingMemRequests
This is a simple scalar statistic, like a counter.
ClockedObject declaration and implementation.
const std::string name() const
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Declaration of the Packet class.
Declaration of Statistics objects.
statistics::Scalar valueBytesRead
statistics::Scalar numIndexReads
statistics::Scalar totalValueWriteLatency
virtual void regStats() override
Callback to set stat parameters.
statistics::Histogram totalIndirectAccessLatency
statistics::Histogram valueAccessLatency
statistics::Scalar totalValueReadLatency
statistics::Scalar indexBytesRead
statistics::Scalar numValueWrites
statistics::Histogram indexAccessLatency
statistics::Scalar valueBytesWritten
statistics::Scalar totalIndexReadLatency
statistics::Scalar numValueReads
SpatterGenStats(SpatterGen *spatter_gen)