34#ifndef __HBM_CTRL_HH__
35#define __HBM_CTRL_HH__
39#include <unordered_set>
44#include "params/HBMCtrl.hh"
110 bool row_cmd)
override;
128 Tick max_multi_cmd_split = 0)
override;
212 if (pseudo_channel == 0) {
215 assert(pseudo_channel == 1);
227 if (pseudo_channel == 0) {
230 assert(pseudo_channel == 1);
244 if (pseudo_channel == 0) {
252 virtual void init()
override;
253 virtual void startup()
override;
Interface to DRAM devices with media specific parameters, statistics, and functions.
bool readQueueFullPC1(unsigned int pkt_count) const
void recvMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &_backdoor) override
uint64_t readQueueSizePC1
virtual void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
AddrRangeList getAddrRanges() override
uint64_t readQueueSizePC0
Following counters are used to keep track of the entries in read/write queue for each pseudo channel ...
bool respondEventScheduled(uint8_t pseudo_channel) const override
Is there a respondEvent scheduled?
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
bool retryRdReqPC1
Remember if we have to retry a request for second pseudo channel.
void restartScheduler(Tick tick, uint8_t pseudo_channel) override
restart the controller scheduler
void recvFunctional(PacketPtr pkt) override
virtual void drainResume() override
Resume execution after a successful drain.
EventFunctionWrapper respondEventPC1
uint64_t writeQueueSizePC1
bool recvTimingReq(PacketPtr pkt) override
bool writeQueueFullPC1(unsigned int pkt_count) const
bool partitionedQ
This indicates if the R/W queues will be partitioned among pseudo channels.
uint64_t writeQueueSizePC0
void pruneBurstTick() override
Remove commands that have already issued from rowBurstTicks and colBurstTicks.
virtual void startup() override
startup() is the final initialization call before simulation.
std::unordered_multiset< Tick > colBurstTicks
This is used to ensure that the column command bandwidth does not exceed the allowable media constrai...
bool readQueueFullPC0(unsigned int pkt_count) const
Check if the read queue partition of both pseudo channels has room for more entries.
std::unordered_multiset< Tick > rowBurstTicks
Holds count of row commands issued in burst window starting at defined Tick.
Tick recvAtomic(PacketPtr pkt) override
bool requestEventScheduled(uint8_t pseudo_channel) const override
Is there a read/write burst Event scheduled?
EventFunctionWrapper nextReqEventPC1
NextReq and Respond events for second pseudo channel.
HBMCtrl(const HBMCtrlParams &p)
Tick verifyMultiCmd(Tick cmd_tick, Tick max_cmds_per_burst, Tick max_multi_cmd_split=0) override
Check for command bus contention for multi-cycle (2 currently) command.
std::deque< MemPacket * > respQueuePC1
Response queue for pkts sent to second pseudo channel The first pseudo channel uses MemCtrl::respQueu...
bool respQEmpty() override
DRAMInterface * pc0Int
Pointers to interfaces of the two pseudo channels pc0Int is same as MemCtrl::dram (it will be pointin...
Tick verifySingleCmd(Tick cmd_tick, Tick max_cmds_per_burst, bool row_cmd) override
Check for command bus contention for single cycle command.
bool writeQueueFullPC0(unsigned int pkt_count) const
Check if the write queue partition of both pseudo channels has room for more entries.
std::deque< MemPacket * > respQueue
Response queue where read packets wait after we're done working with them, but it's not time to send ...
virtual bool requestEventScheduled(uint8_t pseudo_channel=0) const
Is there a read/write burst Event scheduled?
virtual void restartScheduler(Tick tick, uint8_t pseudo_channel=0)
restart the controller This can be used by interfaces to restart the scheduler after maintainence com...
virtual bool respondEventScheduled(uint8_t pseudo_channel=0) const
Is there a respondEvent scheduled?
MemCtrl(const MemCtrlParams &p)
General interface to memory device Includes functions and parameters shared across media types.
uint8_t schedule(RequestorID id, uint64_t data)
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
Copyright (c) 2024 Arm Limited All rights reserved.
MemBackdoor * MemBackdoorPtr
uint64_t Tick
Tick count type.