gem5
v19.0.0.0
|
The DRAM controller is a single-channel memory controller capturing the most important timing constraints associated with a contemporary DRAM. More...
#include <dram_ctrl.hh>
Classes | |
class | Bank |
A basic class to track the bank state, i.e. More... | |
class | BurstHelper |
A burst helper helps organize and manage a packet that is larger than the DRAM burst size. More... | |
struct | Command |
Simple structure to hold the values needed to keep track of commands for DRAMPower. More... | |
class | DRAMPacket |
A DRAM packet stores packets along with the timestamp of when the packet entered the queue, and also the decoded address. More... | |
struct | DRAMStats |
All statistics that the model needs to capture. More... | |
class | MemoryPort |
class | Rank |
Rank class includes a vector of banks. More... | |
struct | RankStats |
Public Member Functions | |
DRAMCtrl (const DRAMCtrlParams *p) | |
DrainState | drain () override |
Notify an object that it needs to drain its state. More... | |
Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) override |
Get a port with a given name and index. More... | |
virtual void | init () override |
Initialise this memory. More... | |
virtual void | startup () override |
startup() is the final initialization call before simulation. More... | |
virtual void | drainResume () override |
Resume execution after a successful drain. More... | |
bool | allRanksDrained () const |
Return true once refresh is complete for all ranks and there are no additional commands enqueued. More... | |
![]() | |
MemCtrl (const QoSMemCtrlParams *) | |
QoS Memory base class. More... | |
virtual | ~MemCtrl () |
void | init () override |
Initializes this object. More... | |
BusState | getBusState () const |
Gets the current bus state. More... | |
BusState | getBusStateNext () const |
Gets the next bus state. More... | |
bool | hasMaster (MasterID m_id) const |
hasMaster returns true if the selected master(ID) has been registered in the memory controller, which happens if the memory controller has received at least a packet from that master. More... | |
uint64_t | getReadQueueSize (const uint8_t prio) const |
Gets a READ queue size. More... | |
uint64_t | getWriteQueueSize (const uint8_t prio) const |
Gets a WRITE queue size. More... | |
uint64_t | getTotalReadQueueSize () const |
Gets the total combined READ queues size. More... | |
uint64_t | getTotalWriteQueueSize () const |
Gets the total combined WRITE queues size. More... | |
Tick | getServiceTick (const uint8_t prio) const |
Gets the last service tick related to a QoS Priority. More... | |
uint8_t | numPriorities () const |
Gets the total number of priority levels in the QoS memory controller. More... | |
![]() | |
AbstractMemory (const Params *p) | |
virtual | ~AbstractMemory () |
bool | isNull () const |
See if this is a null memory that should never store data and always return zero. More... | |
void | setBackingStore (uint8_t *pmem_addr) |
Set the host memory backing store to be used by this memory controller. More... | |
const std::list< LockedAddr > & | getLockedAddrList () const |
Get the list of locked addresses to allow checkpointing. More... | |
void | addLockedAddr (LockedAddr addr) |
Add a locked address to allow for checkpointing. More... | |
System * | system () const |
read the system pointer Implemented for completeness with the setter More... | |
void | system (System *sys) |
Set the system pointer on this memory This can't be done via a python parameter because the system needs pointers to all the memories and the reverse would create a cycle in the object graph. More... | |
const Params * | params () const |
AddrRange | getAddrRange () const |
Get the address range. More... | |
uint8_t * | toHostAddr (Addr addr) const |
Transform a gem5 address space address into its physical counterpart in the host address space. More... | |
uint64_t | size () const |
Get the memory size. More... | |
Addr | start () const |
Get the start address. More... | |
bool | isConfReported () const |
Should this memory be passed to the kernel and part of the OS physical memory layout. More... | |
bool | isInAddrMap () const |
Some memories are used as shadow memories or should for other reasons not be part of the global address map. More... | |
bool | isKvmMap () const |
When shadow memories are in use, KVM may want to make one or the other, but cannot map both into the guest address space. More... | |
void | access (PacketPtr pkt) |
Perform an untimed memory access and update all the state (e.g. More... | |
void | functionalAccess (PacketPtr pkt) |
Perform an untimed memory read or write without changing anything but the memory itself. More... | |
![]() | |
ClockedObject (const ClockedObjectParams *p) | |
const Params * | params () const |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Enums::PwrState | pwrState () const |
std::string | pwrStateName () const |
std::vector< double > | pwrStateWeights () const |
Returns the percentage residency for each power state. More... | |
void | computeStats () |
Record stats values like state residency by computing the time difference from previous update. More... | |
void | pwrState (Enums::PwrState) |
![]() | |
const Params * | params () const |
SimObject (const Params *_params) | |
virtual | ~SimObject () |
virtual const std::string | name () const |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. More... | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. More... | |
virtual void | regProbePoints () |
Register probe points for this object. More... | |
virtual void | regProbeListeners () |
Register probe listeners for this object. More... | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. More... | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. More... | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. More... | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
![]() | |
EventManager (EventManager &em) | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
EventQueue * | eventQueue () const |
void | schedule (Event &event, Tick when) |
void | deschedule (Event &event) |
void | reschedule (Event &event, Tick when, bool always=false) |
void | schedule (Event *event, Tick when) |
void | deschedule (Event *event) |
void | reschedule (Event *event, Tick when, bool always=false) |
void | wakeupEventQueue (Tick when=(Tick) -1) |
void | setCurTick (Tick newVal) |
![]() | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
![]() | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
![]() | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. More... | |
virtual void | resetStats () |
Callback to reset stats. More... | |
virtual void | preDumpStats () |
Callback before stats are dumped. More... | |
void | addStat (Stats::Info *info) |
Register a stat with this group. More... | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. More... | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. More... | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. More... | |
![]() | |
void | updateClockPeriod () |
Update the tick to the current tick. More... | |
Tick | clockEdge (Cycles cycles=Cycles(0)) const |
Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More... | |
Cycles | curCycle () const |
Determine the current cycle, corresponding to a tick aligned to a clock edge. More... | |
Tick | nextCycle () const |
Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More... | |
uint64_t | frequency () const |
Tick | clockPeriod () const |
double | voltage () const |
Cycles | ticksToCycles (Tick t) const |
Tick | cyclesToTicks (Cycles c) const |
Protected Member Functions | |
Tick | recvAtomic (PacketPtr pkt) |
void | recvFunctional (PacketPtr pkt) |
bool | recvTimingReq (PacketPtr pkt) |
![]() | |
void | addMaster (const MasterID m_id) |
Initializes dynamically counters and statistics for a given Master. More... | |
void | logRequest (BusState dir, MasterID m_id, uint8_t qos, Addr addr, uint64_t entries) |
Called upon receiving a request or updates statistics and updates queues status. More... | |
void | logResponse (BusState dir, MasterID m_id, uint8_t qos, Addr addr, uint64_t entries, double delay) |
Called upon receiving a response, updates statistics and updates queues status. More... | |
template<typename Queues > | |
uint8_t | qosSchedule (std::initializer_list< Queues *> queues_ptr, uint64_t queue_entry_size, const PacketPtr pkt) |
Assign priority to a packet by executing the configured QoS policy. More... | |
uint8_t | schedule (MasterID m_id, uint64_t data) |
uint8_t | schedule (const PacketPtr pkt) |
BusState | selectNextBusState () |
Returns next bus direction (READ or WRITE) based on configured policy. More... | |
void | setCurrentBusState () |
Set current bus direction (READ or WRITE) from next selected one. More... | |
void | recordTurnaroundStats () |
Record statistics on turnarounds based on busStateNext and busState values. More... | |
template<typename Queues > | |
void | escalate (std::initializer_list< Queues *> queues, uint64_t queue_entry_size, MasterID m_id, uint8_t tgt_prio) |
Escalates/demotes priority of all packets belonging to the passed master to given priority value. More... | |
template<typename Queues > | |
void | escalateQueues (Queues &queues, uint64_t queue_entry_size, MasterID m_id, uint8_t curr_prio, uint8_t tgt_prio) |
Escalates/demotes priority of all packets belonging to the passed master to given priority value in a specified cluster of queues (e.g. More... | |
![]() | |
bool | checkLockedAddrList (PacketPtr pkt) |
void | trackLoadLocked (PacketPtr pkt) |
bool | writeOK (PacketPtr pkt) |
![]() | |
Drainable () | |
virtual | ~Drainable () |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
![]() | |
Clocked (ClockDomain &clk_domain) | |
Create a clocked object and set the clock domain based on the parameters. More... | |
Clocked (Clocked &)=delete | |
Clocked & | operator= (Clocked &)=delete |
virtual | ~Clocked () |
Virtual destructor due to inheritance. More... | |
void | resetClock () const |
Reset the object's clock using the current global tick value. More... | |
virtual void | clockPeriodUpdated () |
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. More... | |
Private Types | |
enum | PowerState { PWR_IDLE = 0, PWR_REF, PWR_SREF, PWR_PRE_PDN, PWR_ACT, PWR_ACT_PDN } |
The power state captures the different operational states of the DRAM and interacts with the bus read/write state machine, and the refresh state machine. More... | |
enum | RefreshState { REF_IDLE = 0, REF_DRAIN, REF_PD_EXIT, REF_SREF_EXIT, REF_PRE, REF_START, REF_RUN } |
The refresh state is used to control the progress of the refresh scheduling. More... | |
typedef std::deque< DRAMPacket * > | DRAMPacketQueue |
Private Member Functions | |
void | processNextReqEvent () |
Bunch of things requires to setup "events" in gem5 When event "respondEvent" occurs for example, the method processRespondEvent is called; no parameters are allowed in these methods. More... | |
void | processRespondEvent () |
bool | readQueueFull (unsigned int pktCount) const |
Check if the read queue has room for more entries. More... | |
bool | writeQueueFull (unsigned int pktCount) const |
Check if the write queue has room for more entries. More... | |
void | addToReadQueue (PacketPtr pkt, unsigned int pktCount) |
When a new read comes in, first check if the write q has a pending request to the same address. If not, decode the address to populate rank/bank/row, create one or mutliple "dram_pkt", and push them to the back of the read queue. More... | |
void | addToWriteQueue (PacketPtr pkt, unsigned int pktCount) |
Decode the incoming pkt, create a dram_pkt and push to the back of the write queue. More... | |
void | doDRAMAccess (DRAMPacket *dram_pkt) |
Actually do the DRAM access - figure out the latency it will take to service the req based on bank state, channel state etc and then update those states to account for this request. Based on this, update the packet's "readyTime" and move it to the response q from where it will eventually go back to the outside world. More... | |
void | accessAndRespond (PacketPtr pkt, Tick static_latency) |
When a packet reaches its "readyTime" in the response Q, use the "access()" method in AbstractMemory to actually create the response packet, and send it back to the outside world requestor. More... | |
DRAMPacket * | decodeAddr (const PacketPtr pkt, Addr dramPktAddr, unsigned int size, bool isRead) const |
Address decoder to figure out physical mapping onto ranks, banks, and rows. More... | |
Addr | getCtrlAddr (Addr addr) |
Get an address in a dense range which starts from 0. More... | |
DRAMPacketQueue::iterator | chooseNext (DRAMPacketQueue &queue, Tick extra_col_delay) |
The memory schduler/arbiter - picks which request needs to go next, based on the specified policy such as FCFS or FR-FCFS and moves it to the head of the queue. More... | |
DRAMPacketQueue::iterator | chooseNextFRFCFS (DRAMPacketQueue &queue, Tick extra_col_delay) |
For FR-FCFS policy reorder the read/write queue depending on row buffer hits and earliest bursts available in DRAM. More... | |
std::pair< std::vector< uint32_t >, bool > | minBankPrep (const DRAMPacketQueue &queue, Tick min_col_at) const |
Find which are the earliest banks ready to issue an activate for the enqueued requests. More... | |
void | activateBank (Rank &rank_ref, Bank &bank_ref, Tick act_tick, uint32_t row) |
Keep track of when row activations happen, in order to enforce the maximum number of activations in the activation window. More... | |
void | prechargeBank (Rank &rank_ref, Bank &bank_ref, Tick pre_at, bool trace=true) |
Precharge a given bank and also update when the precharge is done. More... | |
void | printQs () const |
Used for debugging to observe the contents of the queues. More... | |
Addr | burstAlign (Addr addr) const |
Burst-align an address. More... | |
void | updatePowerStats (Rank &rank_ref) |
This function increments the energy when called. More... | |
Static Private Member Functions | |
static bool | sortTime (const Command &cmd, const Command &cmd_next) |
Function for sorting Command structures based on timeStamp. More... | |
Private Attributes | |
MemoryPort | port |
Our incoming port, for a multi-ported controller add a crossbar in front of it. More... | |
bool | isTimingMode |
Remember if the memory system is in timing mode. More... | |
bool | retryRdReq |
Remember if we have to retry a request when available. More... | |
bool | retryWrReq |
EventFunctionWrapper | nextReqEvent |
EventFunctionWrapper | respondEvent |
std::vector< DRAMPacketQueue > | readQueue |
The controller's main read and write queues, with support for QoS reordering. More... | |
std::vector< DRAMPacketQueue > | writeQueue |
std::unordered_set< Addr > | isInWriteQueue |
To avoid iterating over the write queue to check for overlapping transactions, maintain a set of burst addresses that are currently queued. More... | |
std::deque< DRAMPacket * > | respQueue |
Response queue where read packets wait after we're done working with them, but it's not time to send the response yet. More... | |
std::vector< Rank * > | ranks |
Vector of ranks. More... | |
const uint32_t | deviceSize |
The following are basic design parameters of the memory controller, and are initialized based on parameter values. More... | |
const uint32_t | deviceBusWidth |
const uint32_t | burstLength |
const uint32_t | deviceRowBufferSize |
const uint32_t | devicesPerRank |
const uint32_t | burstSize |
const uint32_t | rowBufferSize |
const uint32_t | columnsPerRowBuffer |
const uint32_t | columnsPerStripe |
const uint32_t | ranksPerChannel |
const uint32_t | bankGroupsPerRank |
const bool | bankGroupArch |
const uint32_t | banksPerRank |
uint32_t | rowsPerBank |
const uint32_t | readBufferSize |
const uint32_t | writeBufferSize |
const uint32_t | writeHighThreshold |
const uint32_t | writeLowThreshold |
const uint32_t | minWritesPerSwitch |
uint32_t | writesThisTime |
uint32_t | readsThisTime |
const Tick M5_CLASS_VAR_USED | tCK |
Basic memory timing parameters initialized based on parameter values. More... | |
const Tick | tRTW |
const Tick | tCS |
const Tick | tBURST |
const Tick | tCCD_L_WR |
const Tick | tCCD_L |
const Tick | tRCD |
const Tick | tCL |
const Tick | tRP |
const Tick | tRAS |
const Tick | tWR |
const Tick | tRTP |
const Tick | tRFC |
const Tick | tREFI |
const Tick | tRRD |
const Tick | tRRD_L |
const Tick | tXAW |
const Tick | tXP |
const Tick | tXS |
const uint32_t | activationLimit |
const Tick | rankToRankDly |
const Tick | wrToRdDly |
const Tick | rdToWrDly |
Enums::MemSched | memSchedPolicy |
Memory controller configuration initialized based on parameter values. More... | |
Enums::AddrMap | addrMapping |
Enums::PageManage | pageMgmt |
const uint32_t | maxAccessesPerRow |
Max column accesses (read and write) per row, before forcefully closing it. More... | |
const Tick | frontendLatency |
Pipeline latency of the controller frontend. More... | |
const Tick | backendLatency |
Pipeline latency of the backend and PHY. More... | |
Tick | nextBurstAt |
Till when must we wait before issuing next RD/WR burst? More... | |
Tick | prevArrival |
Tick | nextReqTime |
The soonest you have to start thinking about the next request is the longest access time that can occur before nextBurstAt. More... | |
DRAMStats | stats |
uint8_t | activeRank |
uint64_t | timeStampOffset |
Tick | lastStatsResetTick |
The time when stats were last reset used to calculate average power. More... | |
bool | enableDRAMPowerdown |
Enable or disable DRAM powerdown states. More... | |
std::unique_ptr< Packet > | pendingDelete |
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent call. More... | |
Additional Inherited Members | |
![]() | |
enum | BusState { READ, WRITE } |
Bus Direction. More... | |
![]() | |
typedef AbstractMemoryParams | Params |
![]() | |
typedef ClockedObjectParams | Params |
Parameters of ClockedObject. More... | |
![]() | |
typedef SimObjectParams | Params |
![]() | |
static void | serializeAll (CheckpointOut &cp) |
Serialize all SimObjects in the system. More... | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. More... | |
![]() | |
static const std::string & | currentSection () |
Get the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
![]() | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
![]() | |
const std::unique_ptr< Policy > | policy |
QoS Policy, assigns QoS priority to the incoming packets. More... | |
const std::unique_ptr< TurnaroundPolicy > | turnPolicy |
QoS Bus Turnaround Policy: selects the bus direction (READ/WRITE) More... | |
const std::unique_ptr< QueuePolicy > | queuePolicy |
QoS Queue Policy: selects packet among same-priority queue. More... | |
const uint8_t | _numPriorities |
Number of configured QoS priorities. More... | |
const bool | qosPriorityEscalation |
Enables QoS priority escalation. More... | |
const bool | qosSyncroScheduler |
Enables QoS synchronized scheduling invokes the QoS scheduler on all masters, at every packet arrival. More... | |
std::unordered_map< MasterID, const std::string > | masters |
Hash of master ID - master name. More... | |
std::unordered_map< MasterID, std::vector< uint64_t > > | packetPriorities |
Hash of masters - number of packets queued per priority. More... | |
std::unordered_map< MasterID, std::unordered_map< uint64_t, std::deque< uint64_t > > > | requestTimes |
Hash of masters - address of request - queue of times of request. More... | |
std::vector< Tick > | serviceTick |
Vector of QoS priorities/last service time. More... | |
std::vector< uint64_t > | readQueueSizes |
Read request packets queue length in #packets, per QoS priority. More... | |
std::vector< uint64_t > | writeQueueSizes |
Write request packets queue length in #packets, per QoS priority. More... | |
uint64_t | totalReadQueueSize |
Total read request packets queue length in #packets. More... | |
uint64_t | totalWriteQueueSize |
Total write request packets queue length in #packets. More... | |
BusState | busState |
Bus state used to control the read/write switching and drive the scheduling of the next request. More... | |
BusState | busStateNext |
bus state for next request event triggered More... | |
QoS::MemCtrl::MemCtrlStats | stats |
![]() | |
AddrRange | range |
uint8_t * | pmemAddr |
MemBackdoor | backdoor |
const bool | confTableReported |
const bool | inAddrMap |
const bool | kvmMap |
std::list< LockedAddr > | lockedAddrList |
System * | _system |
Pointer to the System object. More... | |
AbstractMemory::MemStats | stats |
![]() | |
Enums::PwrState | _currPwrState |
To keep track of the current power state. More... | |
Tick | prvEvalTick |
ClockedObject::ClockedObjectStats | stats |
![]() | |
const SimObjectParams * | _params |
Cached copy of the object parameters. More... | |
![]() | |
EventQueue * | eventq |
A pointer to this object's event queue. More... | |
The DRAM controller is a single-channel memory controller capturing the most important timing constraints associated with a contemporary DRAM.
For multi-channel memory systems, the controller is combined with a crossbar model, with the channel address interleaving taking part in the crossbar.
As a basic design principle, this controller model is not cycle callable, but instead uses events to: 1) decide when new decisions can be made, 2) when resources become available, 3) when things are to be considered done, and 4) when to send things back. Through these simple principles, the model delivers high performance, and lots of flexibility, allowing users to evaluate the system impact of a wide range of memory technologies, such as DDR3/4, LPDDR2/3/4, WideIO1/2, HBM and HMC.
For more details, please see Hansson et al, "Simulating DRAM controllers for future system architecture exploration", Proc. ISPASS, 2014. If you use this model as part of your research please cite the paper.
The low-power functionality implements a staggered powerdown similar to that described in "Optimized Active and Power-Down Mode Refresh Control in 3D-DRAMs" by Jung et al, VLSI-SoC, 2014.
Definition at line 98 of file dram_ctrl.hh.
|
private |
Definition at line 724 of file dram_ctrl.hh.
|
private |
The power state captures the different operational states of the DRAM and interacts with the bus read/write state machine, and the refresh state machine.
PWR_IDLE : The idle state in which all banks are closed From here can transition to: PWR_REF, PWR_ACT, PWR_PRE_PDN
PWR_REF : Auto-refresh state. Will transition when refresh is complete based on power state prior to PWR_REF From here can transition to: PWR_IDLE, PWR_PRE_PDN, PWR_SREF
PWR_SREF : Self-refresh state. Entered after refresh if previous state was PWR_PRE_PDN From here can transition to: PWR_IDLE
PWR_PRE_PDN : Precharge power down state From here can transition to: PWR_REF, PWR_IDLE
PWR_ACT : Activate state in which one or more banks are open From here can transition to: PWR_IDLE, PWR_ACT_PDN
PWR_ACT_PDN : Activate power down state From here can transition to: PWR_ACT
Enumerator | |
---|---|
PWR_IDLE | |
PWR_REF | |
PWR_SREF | |
PWR_PRE_PDN | |
PWR_ACT | |
PWR_ACT_PDN |
Definition at line 224 of file dram_ctrl.hh.
|
private |
The refresh state is used to control the progress of the refresh scheduling.
When normal operation is in progress the refresh state is idle. Once tREFI has elasped, a refresh event is triggered to start the following STM transitions which are used to issue a refresh and return back to normal operation
REF_IDLE : IDLE state used during normal operation From here can transition to: REF_DRAIN
REF_SREF_EXIT : Exiting a self-refresh; refresh event scheduled after self-refresh exit completes From here can transition to: REF_DRAIN
REF_DRAIN : Drain state in which on going accesses complete. From here can transition to: REF_PD_EXIT
REF_PD_EXIT : Evaluate pwrState and issue wakeup if needed Next state dependent on whether banks are open From here can transition to: REF_PRE, REF_START
REF_PRE : Close (precharge) all open banks From here can transition to: REF_START
REF_START : Issue refresh command and update DRAMPower stats From here can transition to: REF_RUN
REF_RUN : Refresh running, waiting for tRFC to expire From here can transition to: REF_IDLE, REF_SREF_EXIT
Enumerator | |
---|---|
REF_IDLE | |
REF_DRAIN | |
REF_PD_EXIT | |
REF_SREF_EXIT | |
REF_PRE | |
REF_START | |
REF_RUN |
Definition at line 263 of file dram_ctrl.hh.
DRAMCtrl::DRAMCtrl | ( | const DRAMCtrlParams * | p | ) |
Definition at line 62 of file dram_ctrl.cc.
References activationLimit, activeRank, addrMapping, backendLatency, bankGroupArch, bankGroupsPerRank, banksPerRank, burstLength, burstSize, ceilLog2(), columnsPerRowBuffer, columnsPerStripe, deviceBusWidth, deviceRowBufferSize, deviceSize, devicesPerRank, DPRINTF, enableDRAMPowerdown, fatal, fatal_if, frontendLatency, AddrRange::granularity(), ArmISA::i, AddrRange::interleaved(), isPowerOf2(), lastStatsResetTick, maxAccessesPerRow, memSchedPolicy, minWritesPerSwitch, SimObject::name(), nextBurstAt, nextReqTime, MipsISA::p, pageMgmt, prevArrival, processNextReqEvent(), processRespondEvent(), AbstractMemory::range, ranks, ranksPerChannel, rankToRankDly, rdToWrDly, readBufferSize, readQueue, readsThisTime, respondEvent, rowBufferSize, rowsPerBank, AbstractMemory::size(), stats, tBURST, tCCD_L, tCCD_L_WR, tCK, tCL, tCS, timeStampOffset, tRAS, tRCD, tREFI, tRFC, tRP, tRRD, tRRD_L, tRTP, tRTW, tWR, tXAW, tXP, tXS, ULL, warn, writeBufferSize, writeHighThreshold, writeLowThreshold, writeQueue, writesThisTime, and wrToRdDly.
Referenced by DRAMCtrl::MemoryPort::recvTimingReq(), and sortTime().
When a packet reaches its "readyTime" in the response Q, use the "access()" method in AbstractMemory to actually create the response packet, and send it back to the outside world requestor.
pkt | The packet from the outside world |
static_latency | Static latency to add before sending the packet |
Definition at line 887 of file dram_ctrl.cc.
References AbstractMemory::access(), curTick(), DPRINTF, Packet::getAddr(), Packet::headerDelay, Packet::isResponse(), Packet::needsResponse(), Packet::payloadDelay, pendingDelete, port, and QueuedSlavePort::schedTimingResp().
Referenced by addToReadQueue(), addToWriteQueue(), and processRespondEvent().
|
private |
Keep track of when row activations happen, in order to enforce the maximum number of activations in the activation window.
The method updates the time that the banks become available based on the current limits.
rank_ref | Reference to the rank |
bank_ref | Reference to the bank |
act_tick | Time when the activation takes place |
row | Index of the row |
Definition at line 924 of file dram_ctrl.cc.
References DRAMCtrl::Rank::activateEvent, activationLimit, DRAMCtrl::Rank::actTicks, DRAMCtrl::Bank::bank, DRAMCtrl::Bank::bankgr, bankGroupArch, DRAMCtrl::Rank::banks, banksPerRank, DRAMCtrl::Bank::bytesAccessed, DRAMCtrl::Rank::cmdList, divCeil(), DPRINTF, ArmISA::i, ArmISA::j, DRAMCtrl::Bank::NO_ROW, DRAMCtrl::Rank::numBanksActive, DRAMCtrl::Bank::openRow, panic, DRAMCtrl::Bank::preAllowedAt, DRAMCtrl::Rank::rank, ranks, DRAMCtrl::Bank::rdAllowedAt, EventManager::reschedule(), DRAMCtrl::Bank::rowAccesses, QoS::MemCtrl::schedule(), Event::scheduled(), tCK, timeStampOffset, tRAS, tRCD, tRRD, tRRD_L, tXAW, Event::when(), and DRAMCtrl::Bank::wrAllowedAt.
Referenced by doDRAMAccess(), and getCtrlAddr().
|
private |
When a new read comes in, first check if the write q has a pending request to the same address. If not, decode the address to populate rank/bank/row, create one or mutliple "dram_pkt", and push them to the back of the read queue.
\ If this is the only read request in the system, schedule an event to start servicing it.
pkt | The request packet from the outside world |
pktCount | The number of DRAM bursts the pkt translate to. If pkt size is larger then one full burst, then pktCount is greater than one. |
Definition at line 380 of file dram_ctrl.cc.
References accessAndRespond(), addr, DRAMCtrl::DRAMPacket::addr, DRAMCtrl::DRAMStats::avgRdQLen, burstAlign(), DRAMCtrl::DRAMPacket::burstHelper, burstSize, DRAMCtrl::BurstHelper::burstsServiced, DRAMCtrl::DRAMStats::bytesReadWrQ, ceilLog2(), curTick(), decodeAddr(), DPRINTF, frontendLatency, Packet::getAddr(), getCtrlAddr(), Packet::getSize(), isInWriteQueue, Packet::isWrite(), QoS::MemCtrl::logRequest(), Packet::masterId(), DRAMCtrl::DRAMStats::masterReadAccesses, nextReqEvent, MipsISA::p, DRAMCtrl::DRAMPacket::qosValue(), Packet::qosValue(), DRAMCtrl::DRAMPacket::rankRef, DRAMCtrl::DRAMStats::rdQLenPdf, DRAMCtrl::DRAMStats::readBursts, DRAMCtrl::Rank::readEntries, DRAMCtrl::DRAMStats::readPktSize, readQueue, readQueueFull(), respQueue, QoS::MemCtrl::schedule(), Event::scheduled(), DRAMCtrl::DRAMStats::servicedByWrQ, AbstractMemory::size(), stats, QoS::MemCtrl::totalReadQueueSize, and writeQueue.
Referenced by recvTimingReq().
|
private |
Decode the incoming pkt, create a dram_pkt and push to the back of the write queue.
the write q length is more than the threshold specified by the user, ie the queue is beginning to get full, stop reads, and start draining writes.
pkt | The request packet from the outside world |
pktCount | The number of DRAM bursts the pkt translate to. If pkt size is larger then one full burst, then pktCount is greater than one. |
Definition at line 487 of file dram_ctrl.cc.
References accessAndRespond(), addr, DRAMCtrl::DRAMPacket::addr, DRAMCtrl::DRAMStats::avgWrQLen, burstAlign(), burstSize, ceilLog2(), curTick(), decodeAddr(), DPRINTF, frontendLatency, Packet::getAddr(), getCtrlAddr(), Packet::getSize(), isInWriteQueue, Packet::isWrite(), QoS::MemCtrl::logRequest(), Packet::masterId(), DRAMCtrl::DRAMStats::masterWriteAccesses, DRAMCtrl::DRAMStats::mergedWrBursts, nextReqEvent, DRAMCtrl::DRAMPacket::qosValue(), Packet::qosValue(), DRAMCtrl::DRAMPacket::rankRef, QoS::MemCtrl::schedule(), Event::scheduled(), AbstractMemory::size(), stats, QoS::MemCtrl::totalWriteQueueSize, writeBufferSize, DRAMCtrl::DRAMStats::writeBursts, DRAMCtrl::Rank::writeEntries, DRAMCtrl::DRAMStats::writePktSize, writeQueue, and DRAMCtrl::DRAMStats::wrQLenPdf.
Referenced by recvTimingReq().
bool DRAMCtrl::allRanksDrained | ( | ) | const |
Return true once refresh is complete for all ranks and there are no additional commands enqueued.
(only evaluated when draining) This will ensure that all banks are closed, power state is IDLE, and power stats have been updated
Definition at line 2753 of file dram_ctrl.cc.
References MipsISA::r, and ranks.
Referenced by drain(), processNextReqEvent(), processRespondEvent(), and sortTime().
Burst-align an address.
addr | The potentially unaligned address |
Definition at line 912 of file dram_ctrl.hh.
References burstSize.
Referenced by addToReadQueue(), addToWriteQueue(), and processNextReqEvent().
|
private |
The memory schduler/arbiter - picks which request needs to go next, based on the specified policy such as FCFS or FR-FCFS and moves it to the head of the queue.
Prioritizes accesses to the same rank as previous burst unless controller is switching command type.
queue | Queued requests to consider |
extra_col_delay | Any extra delay due to a read/write switch |
Definition at line 742 of file dram_ctrl.cc.
References chooseNextFRFCFS(), DPRINTF, ArmISA::i, memSchedPolicy, panic, DRAMCtrl::DRAMPacket::rank, and ranks.
Referenced by getCtrlAddr(), and processNextReqEvent().
|
private |
For FR-FCFS policy reorder the read/write queue depending on row buffer hits and earliest bursts available in DRAM.
queue | Queued requests to consider |
extra_col_delay | Any extra delay due to a read/write switch |
Definition at line 777 of file dram_ctrl.cc.
References DRAMCtrl::Bank::bank, DRAMCtrl::DRAMPacket::bank, DRAMCtrl::DRAMPacket::bankRef, bits(), curTick(), DPRINTF, ArmISA::i, DRAMCtrl::Rank::inRefIdleState(), DRAMCtrl::DRAMPacket::isRead(), minBankPrep(), nextBurstAt, DRAMCtrl::Bank::openRow, DRAMCtrl::Rank::rank, DRAMCtrl::DRAMPacket::rank, DRAMCtrl::DRAMPacket::rankRef, ranksPerChannel, DRAMCtrl::Bank::rdAllowedAt, DRAMCtrl::DRAMPacket::row, and DRAMCtrl::Bank::wrAllowedAt.
Referenced by chooseNext(), and getCtrlAddr().
|
private |
Address decoder to figure out physical mapping onto ranks, banks, and rows.
This function is called multiple times on the same system packet if the pakcet is larger than burst of the memory. The dramPktAddr is used for the offset within the packet.
pkt | The packet from the outside world |
dramPktAddr | The starting address of the DRAM packet |
size | The size of the DRAM packet in bytes |
isRead | Is the request for a read or a write to DRAM |
Definition at line 304 of file dram_ctrl.cc.
References addr, addrMapping, banksPerRank, burstSize, columnsPerRowBuffer, columnsPerStripe, DPRINTF, DRAMCtrl::Bank::NO_ROW, panic, ranks, ranksPerChannel, and rowsPerBank.
Referenced by addToReadQueue(), and addToWriteQueue().
|
private |
Actually do the DRAM access - figure out the latency it will take to service the req based on bank state, channel state etc and then update those states to account for this request. Based on this, update the packet's "readyTime" and move it to the response q from where it will eventually go back to the outside world.
pkt | The DRAM packet created from the outside world pkt |
Definition at line 1073 of file dram_ctrl.cc.
References DRAMCtrl::Bank::actAllowedAt, activateBank(), activeRank, DRAMCtrl::DRAMPacket::addr, DRAMCtrl::DRAMPacket::bank, DRAMCtrl::Bank::bankgr, bankGroupArch, DRAMCtrl::DRAMPacket::bankId, DRAMCtrl::DRAMPacket::bankRef, banksPerRank, burstSize, DRAMCtrl::Bank::bytesAccessed, DRAMCtrl::DRAMStats::bytesReadDRAM, DRAMCtrl::DRAMStats::bytesWritten, DRAMCtrl::Rank::cmdList, curTick(), divCeil(), DPRINTF, DRAMCtrl::DRAMPacket::entryTime, ArmISA::i, DRAMCtrl::Rank::inLowPowerState, DRAMCtrl::DRAMPacket::isRead(), ArmISA::j, DRAMCtrl::DRAMPacket::masterId(), DRAMCtrl::DRAMStats::masterReadBytes, DRAMCtrl::DRAMStats::masterReadTotalLat, DRAMCtrl::DRAMStats::masterWriteBytes, DRAMCtrl::DRAMStats::masterWriteTotalLat, maxAccessesPerRow, nextBurstAt, nextReqTime, DRAMCtrl::Bank::NO_ROW, QoS::MemCtrl::numPriorities(), DRAMCtrl::Bank::openRow, MipsISA::p, pageMgmt, DRAMCtrl::DRAMStats::perBankRdBursts, DRAMCtrl::DRAMStats::perBankWrBursts, DRAMCtrl::Bank::preAllowedAt, prechargeBank(), PWR_SREF, DRAMCtrl::Rank::pwrState, DRAMCtrl::DRAMPacket::rank, DRAMCtrl::DRAMPacket::rankRef, ranks, ranksPerChannel, rankToRankDly, RD, DRAMCtrl::Bank::rdAllowedAt, rdToWrDly, readQueue, DRAMCtrl::DRAMStats::readRowHits, readsThisTime, DRAMCtrl::DRAMPacket::readyTime, DRAMCtrl::DRAMPacket::row, DRAMCtrl::Bank::rowAccesses, DRAMCtrl::Rank::scheduleWakeUpEvent(), DRAMCtrl::DRAMPacket::size, stats, tBURST, tCCD_L, tCCD_L_WR, tCK, tCL, timeStampOffset, DRAMCtrl::DRAMStats::totBusLat, DRAMCtrl::DRAMStats::totMemAccLat, DRAMCtrl::DRAMStats::totQLat, tRCD, tRP, tRTP, tWR, tXP, DRAMCtrl::Bank::wrAllowedAt, writeQueue, DRAMCtrl::DRAMStats::writeRowHits, writesThisTime, and wrToRdDly.
Referenced by processNextReqEvent().
|
overridevirtual |
Notify an object that it needs to drain its state.
If the object does not need further simulation to drain internal buffers, it returns DrainState::Drained and automatically switches to the Drained state. If the object needs more simulation, it returns DrainState::Draining and automatically enters the Draining state. Other return values are invalid.
Implements Drainable.
Definition at line 2719 of file dram_ctrl.cc.
References allRanksDrained(), curTick(), DPRINTF, Drained, Draining, nextReqEvent, PWR_SREF, MipsISA::r, ranks, respQueue, QoS::MemCtrl::schedule(), Event::scheduled(), QoS::MemCtrl::totalReadQueueSize, QoS::MemCtrl::totalWriteQueueSize, and tXS.
Referenced by sortTime().
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from Drainable.
Definition at line 2768 of file dram_ctrl.cc.
References isTimingMode, System::isTimingMode(), MipsISA::r, ranks, startup(), and AbstractMemory::system().
Referenced by sortTime().
Get an address in a dense range which starts from 0.
The input address is the physical address of the request in an address space that contains other SimObjects apart from this controller.
addr | The intput address which should be in the addrRange |
Definition at line 830 of file dram_ctrl.hh.
References activateBank(), chooseNext(), chooseNextFRFCFS(), AddrRange::getOffset(), minBankPrep(), prechargeBank(), printQs(), DRAMCtrl::MemoryPort::queue, and AbstractMemory::range.
Referenced by addToReadQueue(), and addToWriteQueue().
|
overridevirtual |
Get a port with a given name and index.
This is used at binding time and returns a reference to a protocol-agnostic port.
if_name | Port name |
idx | Index in the case of a VectorPort |
Reimplemented from SimObject.
Definition at line 2709 of file dram_ctrl.cc.
References SimObject::getPort(), and port.
Referenced by sortTime().
|
overridevirtual |
Initialise this memory.
Reimplemented from AbstractMemory.
Definition at line 191 of file dram_ctrl.cc.
References addrMapping, columnsPerRowBuffer, columnsPerStripe, fatal, AddrRange::granularity(), Stats::init, AddrRange::interleaved(), Port::isConnected(), SimObject::name(), port, AbstractMemory::range, rowBufferSize, SlavePort::sendRangeChange(), and AbstractMemory::system().
Referenced by sortTime().
|
private |
Find which are the earliest banks ready to issue an activate for the enqueued requests.
Assumes maximum of 32 banks per rank Also checks if the bank is already prepped.
queue | Queued requests to consider |
min_col_at | time of seamless burst command |
Definition at line 1608 of file dram_ctrl.cc.
References banksPerRank, QoS::MemCtrl::busState, curTick(), MipsISA::fill, ArmISA::i, ArmISA::j, MaxTick, DRAMCtrl::Bank::NO_ROW, MipsISA::p, ranks, ranksPerChannel, QoS::MemCtrl::READ, replaceBits(), tRCD, and tRP.
Referenced by chooseNextFRFCFS(), and getCtrlAddr().
|
private |
Precharge a given bank and also update when the precharge is done.
This will also deal with any stats related to the accesses to the open page.
rank_ref | The rank to precharge |
bank_ref | The bank to precharge |
pre_at | Time when the precharge takes place |
trace | Is this an auto precharge then do not add to trace |
Definition at line 1025 of file dram_ctrl.cc.
References DRAMCtrl::Bank::actAllowedAt, DRAMCtrl::Bank::bank, DRAMCtrl::Bank::bytesAccessed, DRAMCtrl::DRAMStats::bytesPerActivate, DRAMCtrl::Rank::cmdList, divCeil(), DPRINTF, DRAMCtrl::Bank::NO_ROW, DRAMCtrl::Rank::numBanksActive, DRAMCtrl::Bank::openRow, DRAMCtrl::Rank::outstandingEvents, DRAMCtrl::Bank::preAllowedAt, DRAMCtrl::Rank::prechargeEvent, DRAMCtrl::Rank::rank, EventManager::reschedule(), Stats::DistBase< Derived, Stor >::sample(), QoS::MemCtrl::schedule(), Event::scheduled(), stats, tCK, timeStampOffset, tRP, and Event::when().
Referenced by doDRAMAccess(), and getCtrlAddr().
|
private |
Used for debugging to observe the contents of the queues.
Definition at line 561 of file dram_ctrl.cc.
References DPRINTF, readQueue, respQueue, and writeQueue.
Referenced by getCtrlAddr().
|
private |
Bunch of things requires to setup "events" in gem5 When event "respondEvent" occurs for example, the method processRespondEvent is called; no parameters are allowed in these methods.
Definition at line 1302 of file dram_ctrl.cc.
References allRanksDrained(), burstAlign(), burstSize, QoS::MemCtrl::busState, QoS::MemCtrl::busStateNext, chooseNext(), curTick(), doDRAMAccess(), DPRINTF, Draining, Drainable::drainState(), isInWriteQueue, QoS::MemCtrl::logResponse(), minWritesPerSwitch, nextReqEvent, nextReqTime, QoS::MemCtrl::numPriorities(), port, PWR_SREF, MipsISA::r, ranks, ranksPerChannel, DRAMCtrl::DRAMStats::rdPerTurnAround, QoS::MemCtrl::READ, readQueue, readsThisTime, QoS::MemCtrl::recordTurnaroundStats(), EventManager::reschedule(), respondEvent, respQueue, retryWrReq, Stats::DistBase< Derived, Stor >::sample(), QoS::MemCtrl::schedule(), Event::scheduled(), QoS::MemCtrl::selectNextBusState(), SlavePort::sendRetryReq(), Drainable::signalDrainDone(), stats, tCS, QoS::MemCtrl::totalReadQueueSize, QoS::MemCtrl::totalWriteQueueSize, tRTW, QoS::MemCtrl::turnPolicy, tXS, QoS::MemCtrl::WRITE, writeBufferSize, writeHighThreshold, writeLowThreshold, writeQueue, writesThisTime, and DRAMCtrl::DRAMStats::wrPerTurnAround.
Referenced by DRAMCtrl().
|
private |
Definition at line 650 of file dram_ctrl.cc.
References accessAndRespond(), DRAMCtrl::Rank::activateEvent, allRanksDrained(), backendLatency, DRAMCtrl::BurstHelper::burstCount, DRAMCtrl::DRAMPacket::burstHelper, DRAMCtrl::BurstHelper::burstsServiced, curTick(), DPRINTF, Draining, Drainable::drainState(), enableDRAMPowerdown, frontendLatency, DRAMCtrl::Rank::isQueueEmpty(), DRAMCtrl::Rank::outstandingEvents, DRAMCtrl::DRAMPacket::pkt, port, DRAMCtrl::Rank::powerDownSleep(), DRAMCtrl::Rank::prechargeEvent, PWR_ACT_PDN, PWR_IDLE, PWR_PRE_PDN, PWR_SREF, DRAMCtrl::Rank::pwrState, DRAMCtrl::DRAMPacket::rank, DRAMCtrl::DRAMPacket::rankRef, DRAMCtrl::Rank::readEntries, respondEvent, respQueue, retryRdReq, QoS::MemCtrl::schedule(), Event::scheduled(), SlavePort::sendRetryReq(), Drainable::signalDrainDone(), QoS::MemCtrl::totalReadQueueSize, and QoS::MemCtrl::totalWriteQueueSize.
Referenced by DRAMCtrl().
|
private |
Check if the read queue has room for more entries.
pktCount | The number of entries needed in the read queue |
Definition at line 283 of file dram_ctrl.cc.
References DPRINTF, readBufferSize, respQueue, and QoS::MemCtrl::totalReadQueueSize.
Referenced by addToReadQueue(), and recvTimingReq().
Definition at line 263 of file dram_ctrl.cc.
References AbstractMemory::access(), Packet::cacheResponding(), Packet::cmdString(), DPRINTF, Packet::getAddr(), Packet::hasData(), panic_if, tCL, tRCD, and tRP.
|
protected |
Definition at line 2702 of file dram_ctrl.cc.
References AbstractMemory::functionalAccess().
|
protected |
Definition at line 586 of file dram_ctrl.cc.
References addToReadQueue(), addToWriteQueue(), burstSize, DRAMCtrl::DRAMStats::bytesReadSys, DRAMCtrl::DRAMStats::bytesWrittenSys, Packet::cacheResponding(), Packet::cmdString(), curTick(), divCeil(), DPRINTF, Packet::getAddr(), Packet::getSize(), Packet::isRead(), Packet::isWrite(), DRAMCtrl::DRAMStats::numRdRetry, DRAMCtrl::DRAMStats::numWrRetry, ArmISA::offset, panic_if, prevArrival, QoS::MemCtrl::qosSchedule(), readQueue, readQueueFull(), DRAMCtrl::DRAMStats::readReqs, retryRdReq, retryWrReq, AbstractMemory::size(), stats, DRAMCtrl::DRAMStats::totGap, writeQueue, writeQueueFull(), and DRAMCtrl::DRAMStats::writeReqs.
|
inlinestaticprivate |
Function for sorting Command structures based on timeStamp.
Definition at line 1175 of file dram_ctrl.hh.
References allRanksDrained(), drain(), drainResume(), DRAMCtrl(), getPort(), init(), InvalidPortID, MipsISA::p, DRAMCtrl::MemoryPort::recvAtomic(), DRAMCtrl::MemoryPort::recvFunctional(), DRAMCtrl::MemoryPort::recvTimingReq(), startup(), and DRAMCtrl::Command::timeStamp.
Referenced by DRAMCtrl::Rank::flushCmdList().
|
overridevirtual |
startup() is the final initialization call before simulation.
All state is initialized (including unserialized state, if any, such as the curTick() value), so this is the appropriate place to schedule initial event(s) for objects that need them.
Reimplemented from SimObject.
Definition at line 239 of file dram_ctrl.cc.
References curTick(), divCeil(), isTimingMode, System::isTimingMode(), nextBurstAt, MipsISA::r, ranks, AbstractMemory::system(), tCK, timeStampOffset, tRCD, tREFI, and tRP.
Referenced by drainResume(), DRAMCtrl::Rank::name(), and sortTime().
|
private |
This function increments the energy when called.
If stats are dumped periodically, note accumulated energy values will appear in the stats (even if the stats are reset). This is a result of the energy values coming from DRAMPower, and there is currently no support for resetting the state.
rank | Current rank |
|
private |
Check if the write queue has room for more entries.
pktCount | The number of entries needed in the write queue |
Definition at line 294 of file dram_ctrl.cc.
References DPRINTF, QoS::MemCtrl::totalWriteQueueSize, and writeBufferSize.
Referenced by recvTimingReq().
|
private |
Definition at line 995 of file dram_ctrl.hh.
Referenced by activateBank(), and DRAMCtrl().
|
private |
Definition at line 1140 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 1005 of file dram_ctrl.hh.
Referenced by decodeAddr(), DRAMCtrl(), and init().
|
private |
Pipeline latency of the backend and PHY.
Along with the frontend contribution, this latency is added to reads serviced by the DRAM.
Definition at line 1026 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and processRespondEvent().
|
private |
Definition at line 961 of file dram_ctrl.hh.
Referenced by activateBank(), doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 960 of file dram_ctrl.hh.
Referenced by DRAMCtrl().
|
private |
Definition at line 962 of file dram_ctrl.hh.
Referenced by activateBank(), decodeAddr(), doDRAMAccess(), DRAMCtrl(), minBankPrep(), and DRAMCtrl::DRAMStats::regStats().
|
private |
Definition at line 952 of file dram_ctrl.hh.
Referenced by DRAMCtrl().
|
private |
Definition at line 955 of file dram_ctrl.hh.
Referenced by addToReadQueue(), addToWriteQueue(), burstAlign(), decodeAddr(), doDRAMAccess(), DRAMCtrl(), processNextReqEvent(), recvTimingReq(), and DRAMCtrl::DRAMStats::regStats().
|
private |
Definition at line 957 of file dram_ctrl.hh.
Referenced by decodeAddr(), DRAMCtrl(), and init().
|
private |
Definition at line 958 of file dram_ctrl.hh.
Referenced by decodeAddr(), DRAMCtrl(), and init().
|
private |
Definition at line 951 of file dram_ctrl.hh.
Referenced by DRAMCtrl().
|
private |
Definition at line 953 of file dram_ctrl.hh.
Referenced by DRAMCtrl().
|
private |
The following are basic design parameters of the memory controller, and are initialized based on parameter values.
The rowsPerBank is determined based on the capacity, number of ranks and banks, the burst size, and the row buffer size.
Definition at line 950 of file dram_ctrl.hh.
Referenced by DRAMCtrl().
|
private |
Definition at line 954 of file dram_ctrl.hh.
Referenced by DRAMCtrl().
|
private |
Enable or disable DRAM powerdown states.
Definition at line 1149 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and processRespondEvent().
|
private |
Pipeline latency of the controller frontend.
The frontend contribution is added to writes (that complete when they are in the write buffer) and reads that are serviced the write buffer.
Definition at line 1019 of file dram_ctrl.hh.
Referenced by addToReadQueue(), addToWriteQueue(), DRAMCtrl(), and processRespondEvent().
|
private |
To avoid iterating over the write queue to check for overlapping transactions, maintain a set of burst addresses that are currently queued.
Since we merge writes to the same location we never have more than one address to the same burst address.
Definition at line 927 of file dram_ctrl.hh.
Referenced by addToReadQueue(), addToWriteQueue(), and processNextReqEvent().
|
private |
Remember if the memory system is in timing mode.
Definition at line 136 of file dram_ctrl.hh.
Referenced by drainResume(), and startup().
|
private |
The time when stats were last reset used to calculate average power.
Definition at line 1146 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and DRAMCtrl::DRAMStats::resetStats().
|
private |
Max column accesses (read and write) per row, before forcefully closing it.
Definition at line 1012 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), DRAMCtrl(), and DRAMCtrl::DRAMStats::regStats().
|
private |
Memory controller configuration initialized based on parameter values.
Definition at line 1004 of file dram_ctrl.hh.
Referenced by chooseNext(), and DRAMCtrl().
|
private |
Definition at line 968 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and processNextReqEvent().
|
private |
Till when must we wait before issuing next RD/WR burst?
Definition at line 1031 of file dram_ctrl.hh.
Referenced by chooseNextFRFCFS(), doDRAMAccess(), DRAMCtrl(), and startup().
|
private |
Definition at line 733 of file dram_ctrl.hh.
Referenced by addToReadQueue(), addToWriteQueue(), drain(), and processNextReqEvent().
|
private |
The soonest you have to start thinking about the next request is the longest access time that can occur before nextBurstAt.
Assuming you need to precharge, open a new row, and access, it is tRP + tRCD + tCL.
Definition at line 1041 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 1006 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent call.
Definition at line 1155 of file dram_ctrl.hh.
Referenced by accessAndRespond().
|
private |
Our incoming port, for a multi-ported controller add a crossbar in front of it.
Definition at line 131 of file dram_ctrl.hh.
Referenced by accessAndRespond(), getPort(), init(), processNextReqEvent(), and processRespondEvent().
|
private |
Definition at line 1033 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and recvTimingReq().
|
private |
Vector of ranks.
Definition at line 942 of file dram_ctrl.hh.
Referenced by activateBank(), allRanksDrained(), chooseNext(), decodeAddr(), doDRAMAccess(), drain(), drainResume(), DRAMCtrl(), minBankPrep(), processNextReqEvent(), and startup().
|
private |
Definition at line 959 of file dram_ctrl.hh.
Referenced by chooseNextFRFCFS(), decodeAddr(), doDRAMAccess(), DRAMCtrl(), minBankPrep(), processNextReqEvent(), and DRAMCtrl::DRAMStats::regStats().
|
private |
Definition at line 996 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 998 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 964 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), readQueueFull(), and DRAMCtrl::DRAMStats::regStats().
|
private |
The controller's main read and write queues, with support for QoS reordering.
Definition at line 917 of file dram_ctrl.hh.
Referenced by addToReadQueue(), doDRAMAccess(), DRAMCtrl(), printQs(), processNextReqEvent(), and recvTimingReq().
|
private |
Definition at line 970 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 736 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), processNextReqEvent(), and processRespondEvent().
|
private |
Response queue where read packets wait after we're done working with them, but it's not time to send the response yet.
The responses are stored separately mostly to keep the code clean and help with events scheduling. For all logical purposes such as sizing the read queue, this and the main read queue need to be added together.
Definition at line 937 of file dram_ctrl.hh.
Referenced by addToReadQueue(), drain(), printQs(), processNextReqEvent(), processRespondEvent(), and readQueueFull().
|
private |
Remember if we have to retry a request when available.
Definition at line 141 of file dram_ctrl.hh.
Referenced by processRespondEvent(), and recvTimingReq().
|
private |
Definition at line 142 of file dram_ctrl.hh.
Referenced by processNextReqEvent(), and recvTimingReq().
|
private |
Definition at line 956 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), init(), and DRAMCtrl::DRAMStats::regStats().
|
private |
Definition at line 963 of file dram_ctrl.hh.
Referenced by decodeAddr(), and DRAMCtrl().
|
private |
Definition at line 1137 of file dram_ctrl.hh.
Referenced by addToReadQueue(), addToWriteQueue(), doDRAMAccess(), DRAMCtrl(), prechargeBank(), processNextReqEvent(), and recvTimingReq().
|
private |
Definition at line 979 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), DRAMCtrl(), and DRAMCtrl::DRAMStats::regStats().
|
private |
Definition at line 981 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 980 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Basic memory timing parameters initialized based on parameter values.
Definition at line 976 of file dram_ctrl.hh.
Referenced by activateBank(), doDRAMAccess(), DRAMCtrl(), prechargeBank(), and startup().
|
private |
Definition at line 983 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), DRAMCtrl(), and recvAtomic().
|
private |
Definition at line 978 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 1143 of file dram_ctrl.hh.
Referenced by activateBank(), doDRAMAccess(), DRAMCtrl(), prechargeBank(), and startup().
|
private |
Definition at line 985 of file dram_ctrl.hh.
Referenced by activateBank(), and DRAMCtrl().
|
private |
Definition at line 982 of file dram_ctrl.hh.
Referenced by activateBank(), doDRAMAccess(), DRAMCtrl(), minBankPrep(), recvAtomic(), and startup().
|
private |
Definition at line 989 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and startup().
|
private |
Definition at line 988 of file dram_ctrl.hh.
Referenced by DRAMCtrl().
|
private |
Definition at line 984 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), DRAMCtrl(), minBankPrep(), prechargeBank(), recvAtomic(), and startup().
|
private |
Definition at line 990 of file dram_ctrl.hh.
Referenced by activateBank(), and DRAMCtrl().
|
private |
Definition at line 991 of file dram_ctrl.hh.
Referenced by activateBank(), and DRAMCtrl().
|
private |
Definition at line 987 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 977 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 986 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 992 of file dram_ctrl.hh.
Referenced by activateBank(), and DRAMCtrl().
|
private |
Definition at line 993 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().
|
private |
Definition at line 994 of file dram_ctrl.hh.
Referenced by drain(), DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 965 of file dram_ctrl.hh.
Referenced by addToWriteQueue(), DRAMCtrl(), processNextReqEvent(), DRAMCtrl::DRAMStats::regStats(), and writeQueueFull().
|
private |
Definition at line 966 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 967 of file dram_ctrl.hh.
Referenced by DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 918 of file dram_ctrl.hh.
Referenced by addToReadQueue(), addToWriteQueue(), doDRAMAccess(), DRAMCtrl(), printQs(), processNextReqEvent(), and recvTimingReq().
|
private |
Definition at line 969 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), DRAMCtrl(), and processNextReqEvent().
|
private |
Definition at line 997 of file dram_ctrl.hh.
Referenced by doDRAMAccess(), and DRAMCtrl().