gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dram_interface.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2020 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2013 Amin Farmahini-Farahani
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
46 #ifndef __DRAM_INTERFACE_HH__
47 #define __DRAM_INTERFACE_HH__
48 
49 #include "mem/drampower.hh"
50 #include "mem/mem_interface.hh"
51 #include "params/DRAMInterface.hh"
52 
53 namespace gem5
54 {
55 
56 namespace memory
57 {
58 
66 {
67  private:
72  struct Command
73  {
74  Data::MemCommand::cmds type;
75  uint8_t bank;
77 
78  constexpr Command(Data::MemCommand::cmds _type, uint8_t _bank,
79  Tick time_stamp)
80  : type(_type), bank(_bank), timeStamp(time_stamp)
81  { }
82  };
83 
112  {
113  PWR_IDLE = 0,
119  };
120 
152  {
153  REF_IDLE = 0,
160  };
161 
162  class Rank;
163  struct RankStats : public statistics::Group
164  {
165  RankStats(DRAMInterface &dram, Rank &rank);
166 
167  void regStats() override;
168  void resetStats() override;
169  void preDumpStats() override;
170 
172 
173  /*
174  * Command energies
175  */
181 
182  /*
183  * Active Background Energy
184  */
186 
187  /*
188  * Precharge Background Energy
189  */
191 
192  /*
193  * Active Power-Down Energy
194  */
196 
197  /*
198  * Precharge Power-Down Energy
199  */
201 
202  /*
203  * self Refresh Energy
204  */
206 
209 
215 
220  };
221 
229  class Rank : public EventManager
230  {
231  private:
232 
237 
243 
248 
253 
258 
262  void updatePowerStats();
263 
271  void schedulePowerEvent(PowerState pwr_state, Tick tick);
272 
273  public:
274 
279 
284 
289 
293  uint8_t rank;
294 
298  uint32_t readEntries;
299 
303  uint32_t writeEntries;
304 
311 
316 
321 
329 
335 
340  unsigned int numBanksActive;
341 
344 
349 
350  Rank(const DRAMInterfaceParams &_p, int _rank,
351  DRAMInterface& _dram);
352 
353  const std::string name() const { return csprintf("%d", rank); }
354 
361  void startup(Tick ref_tick);
362 
366  void suspend();
367 
374  bool inRefIdleState() const { return refreshState == REF_IDLE; }
375 
383  bool
385  {
386  // If powerdown is not enabled, then the ranks never go to idle
387  // states. In that case return true here to prevent checkpointing
388  // from getting stuck waiting for DRAM to be idle.
389  if (!dram.enableDRAMPowerdown) {
390  return true;
391  }
392 
393  return pwrState == PWR_IDLE;
394  }
395 
406  bool forceSelfRefreshExit() const;
407 
414  bool isQueueEmpty() const;
415 
420  void checkDrainDone();
421 
428  void flushCmdList();
429 
433  void computeStats();
434 
438  void resetStats();
439 
446  void powerDownSleep(PowerState pwr_state, Tick tick);
447 
455  void scheduleWakeUpEvent(Tick exit_delay);
456 
457  void processWriteDoneEvent();
459 
460  void processActivateEvent();
462 
463  void processPrechargeEvent();
465 
466  void processRefreshEvent();
468 
469  void processPowerEvent();
471 
472  void processWakeUpEvent();
474 
475  protected:
477  };
478 
486  static bool
487  sortTime(const Command& cmd, const Command& cmd_next)
488  {
489  return cmd.timeStamp < cmd_next.timeStamp;
490  }
491 
495  const uint32_t bankGroupsPerRank;
496  const bool bankGroupArch;
497 
501  const Tick tRL;
502  const Tick tWL;
506  const Tick tCCD_L;
507  const Tick tRCD_RD;
508  const Tick tRCD_WR;
509  const Tick tRP;
510  const Tick tRAS;
511  const Tick tWR;
512  const Tick tRTP;
513  const Tick tRFC;
514  const Tick tREFI;
515  const Tick tRRD;
516  const Tick tRRD_L;
517  const Tick tPPD;
518  const Tick tAAD;
519  const Tick tXAW;
520  const Tick tXP;
521  const Tick tXS;
523  const bool dataClockSync;
524  const bool burstInterleave;
525  const uint8_t twoCycleActivate;
526  const uint32_t activationLimit;
529 
530 
531  enums::PageManage pageMgmt;
536  const uint32_t maxAccessesPerRow;
537 
538  // timestamp offset
539  uint64_t timeStampOffset;
540 
541  // Holds the value of the DRAM rank of burst issued
542  uint8_t activeRank;
543 
546 
549 
561  void activateBank(Rank& rank_ref, Bank& bank_ref, Tick act_tick,
562  uint32_t row);
563 
575  void prechargeBank(Rank& rank_ref, Bank& bank_ref,
576  Tick pre_tick, bool auto_or_preall = false,
577  bool trace = true);
578 
579  struct DRAMStats : public statistics::Group
580  {
582 
583  void regStats() override;
584  void resetStats() override;
585 
587 
591 
595 
596  // Latencies summed over all requests
600 
601  // Average latencies per request
605 
606  // Row hit count and rate
612  // Number of bytes transferred to/from DRAM
615 
616  // Average bandwidth
620  // bus utilization
625  };
626 
628 
633 
634  /*
635  * @return delay between write and read commands
636  */
637  Tick writeToReadDelay() const override { return tBURST + tWTR + tWL; }
638 
650  minBankPrep(const MemPacketQueue& queue, Tick min_col_at) const;
651 
652  /*
653  * @return time to send a burst of data without gaps
654  */
655  Tick
656  burstDelay() const
657  {
658  return (burstInterleave ? tBURST_MAX / 2 : tBURST);
659  }
660 
661  public:
665  void init() override;
666 
670  void startup() override;
671 
678  void setupRank(const uint8_t rank, const bool is_read) override;
679 
680  MemPacket* decodePacket(const PacketPtr pkt, Addr pkt_addr,
681  unsigned int size, bool is_read,
682  uint8_t pseudo_channel = 0) override;
683 
687  void drainRanks() override;
688 
698  bool allRanksDrained() const override;
699 
703  void suspend() override;
704 
705  /*
706  * @return time to offset next command
707  */
708  Tick commandOffset() const override
709  {
710  return (tRP + std::max(tRCD_RD, tRCD_WR));
711  }
712 
713  /*
714  * Function to calulate unloaded, closed bank access latency
715  */
716  Tick accessLatency() const override { return (tRP + tRCD_RD + tRL); }
717 
727  chooseNextFRFCFS(MemPacketQueue& queue, Tick min_col_at) const override;
728 
744  doBurstAccess(MemPacket* mem_pkt, Tick next_burst_at,
745  const std::vector<MemPacketQueue>& queue) override;
746 
754  bool
755  burstReady(MemPacket* pkt) const override
756  {
757  return ranks[pkt->rank]->inRefIdleState();
758  }
759 
768  bool isBusy(bool read_queue_empty, bool all_writes_nvm) override;
769 
777  void addRankToRankDelay(Tick cmd_at) override;
778 
786  void respondEvent(uint8_t rank) override;
787 
794  void checkRefreshState(uint8_t rank) override;
795 
799  bool readsWaitingToIssue() const override { return false;}
800  void chooseRead(MemPacketQueue& queue) override { }
801  bool writeRespQueueFull() const override { return false;}
802 
803  DRAMInterface(const DRAMInterfaceParams &_p);
804 };
805 
806 } // namespace memory
807 } // namespace gem5
808 
809 #endif //__DRAM_INTERFACE_HH__
gem5::memory::DRAMInterface::Rank::suspend
void suspend()
Stop the refresh events.
Definition: dram_interface.cc:1169
gem5::statistics::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:1929
gem5::memory::DRAMInterface::tRRD_L
const Tick tRRD_L
Definition: dram_interface.hh:516
gem5::memory::DRAMInterface::DRAMStats::avgWrBW
statistics::Formula avgWrBW
Definition: dram_interface.hh:618
gem5::memory::DRAMInterface::enableDRAMPowerdown
bool enableDRAMPowerdown
Enable or disable DRAM powerdown states.
Definition: dram_interface.hh:545
gem5::memory::DRAMInterface::DRAMStats::perBankRdBursts
statistics::Vector perBankRdBursts
DRAM per bank stats.
Definition: dram_interface.hh:593
gem5::memory::DRAMInterface::burstReady
bool burstReady(MemPacket *pkt) const override
Check if a burst operation can be issued to the DRAM.
Definition: dram_interface.hh:755
gem5::memory::DRAMInterface::tWR
const Tick tWR
Definition: dram_interface.hh:511
gem5::memory::DRAMInterface::burstDelay
Tick burstDelay() const
Definition: dram_interface.hh:656
gem5::memory::DRAMInterface::Rank::computeStats
void computeStats()
Computes stats just prior to dump event.
Definition: dram_interface.cc:1810
gem5::memory::DRAMInterface::Rank::processPrechargeEvent
void processPrechargeEvent()
Definition: dram_interface.cc:1245
gem5::memory::DRAMInterface::Rank::writeEntries
uint32_t writeEntries
Track number of packets in write queue going to this rank.
Definition: dram_interface.hh:303
gem5::memory::DRAMInterface::PowerState
PowerState
The power state captures the different operational states of the DRAM and interacts with the bus read...
Definition: dram_interface.hh:111
gem5::memory::DRAMInterface::Rank::processPowerEvent
void processPowerEvent()
Definition: dram_interface.cc:1634
gem5::memory::DRAMInterface::RefreshState
RefreshState
The refresh state is used to control the progress of the refresh scheduling.
Definition: dram_interface.hh:151
gem5::memory::DRAMInterface::DRAMStats::writeRowHits
statistics::Scalar writeRowHits
Definition: dram_interface.hh:608
gem5::memory::DRAMInterface::DRAMStats::writeBursts
statistics::Scalar writeBursts
Definition: dram_interface.hh:590
gem5::memory::DRAMInterface::activeRank
uint8_t activeRank
Definition: dram_interface.hh:542
gem5::memory::DRAMInterface::DRAMStats::avgQLat
statistics::Formula avgQLat
Definition: dram_interface.hh:602
gem5::memory::MemInterface::tBURST
const Tick tBURST
Definition: mem_interface.hh:149
gem5::memory::DRAMInterface::Rank::pwrStateTrans
PowerState pwrStateTrans
Since we are taking decisions out of order, we need to keep track of what power transition is happeni...
Definition: dram_interface.hh:242
gem5::memory::DRAMInterface::PWR_PRE_PDN
@ PWR_PRE_PDN
Definition: dram_interface.hh:116
gem5::memory::DRAMInterface::DRAMStats::totQLat
statistics::Scalar totQLat
Definition: dram_interface.hh:597
memory
Definition: mem.h:38
gem5::memory::DRAMInterface::Rank::writeDoneEvent
EventFunctionWrapper writeDoneEvent
Definition: dram_interface.hh:458
drampower.hh
gem5::memory::DRAMInterface::RankStats::readEnergy
statistics::Scalar readEnergy
Definition: dram_interface.hh:178
gem5::memory::DRAMInterface::RankStats::preBackEnergy
statistics::Scalar preBackEnergy
Definition: dram_interface.hh:190
gem5::memory::DRAMInterface::DRAMStats::readBursts
statistics::Scalar readBursts
total number of DRAM bursts serviced
Definition: dram_interface.hh:589
gem5::memory::DRAMInterface::tREFI
const Tick tREFI
Definition: dram_interface.hh:514
gem5::memory::DRAMInterface::tBURST_MAX
const Tick tBURST_MAX
Definition: dram_interface.hh:504
gem5::memory::DRAMInterface::addRankToRankDelay
void addRankToRankDelay(Tick cmd_at) override
Add rank to rank delay to bus timing to all DRAM banks in alli ranks when access to an alternate inte...
Definition: dram_interface.cc:620
gem5::memory::DRAMInterface::Rank::processWakeUpEvent
void processWakeUpEvent()
Definition: dram_interface.cc:1616
gem5::memory::DRAMInterface::DRAMStats::totBusLat
statistics::Scalar totBusLat
Definition: dram_interface.hh:598
gem5::memory::DRAMInterface::RankStats::refreshEnergy
statistics::Scalar refreshEnergy
Definition: dram_interface.hh:180
gem5::memory::DRAMInterface::tWL
const Tick tWL
Definition: dram_interface.hh:502
gem5::memory::DRAMInterface::DRAMStats
Definition: dram_interface.hh:579
gem5::memory::DRAMInterface::Rank::prechargeEvent
EventFunctionWrapper prechargeEvent
Definition: dram_interface.hh:464
gem5::memory::DRAMInterface::Rank::inLowPowerState
bool inLowPowerState
rank is in or transitioning to power-down or self-refresh
Definition: dram_interface.hh:288
gem5::memory::DRAMInterface::Rank::scheduleWakeUpEvent
void scheduleWakeUpEvent(Tick exit_delay)
schedule and event to wake-up from power-down or self-refresh and update bank timing parameters
Definition: dram_interface.cc:1564
gem5::memory::DRAMInterface::checkRefreshState
void checkRefreshState(uint8_t rank) override
Check the refresh state to determine if refresh needs to be kicked back into action after a read resp...
Definition: dram_interface.cc:978
gem5::memory::DRAMInterface::Command
Simple structure to hold the values needed to keep track of commands for DRAMPower.
Definition: dram_interface.hh:72
gem5::memory::DRAMInterface::PWR_REF
@ PWR_REF
Definition: dram_interface.hh:114
gem5::memory::DRAMInterface::chooseNextFRFCFS
std::pair< MemPacketQueue::iterator, Tick > chooseNextFRFCFS(MemPacketQueue &queue, Tick min_col_at) const override
For FR-FCFS policy, find first DRAM command that can issue.
Definition: dram_interface.cc:60
gem5::memory::DRAMInterface::ranks
std::vector< Rank * > ranks
Vector of dram ranks.
Definition: dram_interface.hh:632
gem5::memory::MemInterface::Bank
A basic class to track the bank state, i.e.
Definition: mem_interface.hh:86
gem5::memory::DRAMInterface::tXP
const Tick tXP
Definition: dram_interface.hh:520
gem5::memory::DRAMInterface::RankStats::pwrStateTime
statistics::Vector pwrStateTime
Track time spent in each power state.
Definition: dram_interface.hh:219
gem5::memory::DRAMInterface::activateBank
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 t...
Definition: dram_interface.cc:175
gem5::memory::DRAMInterface::REF_DRAIN
@ REF_DRAIN
Definition: dram_interface.hh:154
gem5::memory::DRAMInterface::allRanksDrained
bool allRanksDrained() const override
Return true once refresh is complete for all ranks and there are no additional commands enqueued.
Definition: dram_interface.cc:1005
gem5::memory::DRAMInterface::Rank::processWriteDoneEvent
void processWriteDoneEvent()
Definition: dram_interface.cc:1276
gem5::memory::DRAMInterface::bankGroupArch
const bool bankGroupArch
Definition: dram_interface.hh:496
gem5::DRAMPower
DRAMPower is a standalone tool which calculates the power consumed by a DRAM in the system.
Definition: drampower.hh:56
gem5::memory::DRAMInterface::Rank::resetStats
void resetStats()
Reset stats on a stats event.
Definition: dram_interface.cc:1823
gem5::memory::DRAMInterface::maxAccessesPerRow
const uint32_t maxAccessesPerRow
Max column accesses (read and write) per row, before forefully closing it.
Definition: dram_interface.hh:536
gem5::memory::DRAMInterface::DRAMStats::avgBusLat
statistics::Formula avgBusLat
Definition: dram_interface.hh:603
gem5::statistics::Vector
A vector of scalar stats.
Definition: statistics.hh:2005
gem5::memory::DRAMInterface::PWR_ACT
@ PWR_ACT
Definition: dram_interface.hh:117
gem5::memory::DRAMInterface::drainRanks
void drainRanks() override
Iterate through dram ranks to exit self-refresh in order to drain.
Definition: dram_interface.cc:991
gem5::memory::DRAMInterface::Rank::refreshEvent
EventFunctionWrapper refreshEvent
Definition: dram_interface.hh:467
gem5::statistics::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:2538
gem5::memory::DRAMInterface::DRAMStats::bytesPerActivate
statistics::Histogram bytesPerActivate
Definition: dram_interface.hh:611
gem5::memory::DRAMInterface::Rank::outstandingEvents
uint8_t outstandingEvents
Number of ACT, RD, and WR events currently scheduled Incremented when a refresh event is started as w...
Definition: dram_interface.hh:310
std::vector
STL vector class.
Definition: stl.hh:37
gem5::memory::DRAMInterface::Rank::activateEvent
EventFunctionWrapper activateEvent
Definition: dram_interface.hh:461
gem5::memory::DRAMInterface::PWR_IDLE
@ PWR_IDLE
Definition: dram_interface.hh:113
gem5::csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:161
gem5::memory::DRAMInterface::Rank::Rank
Rank(const DRAMInterfaceParams &_p, int _rank, DRAMInterface &_dram)
Definition: dram_interface.cc:1118
gem5::memory::DRAMInterface::RankStats::prePowerDownEnergy
statistics::Scalar prePowerDownEnergy
Definition: dram_interface.hh:200
gem5::memory::DRAMInterface::tRTP
const Tick tRTP
Definition: dram_interface.hh:512
gem5::memory::DRAMInterface::Rank::checkDrainDone
void checkDrainDone()
Let the rank check if it was waiting for requests to drain to allow it to transition states.
Definition: dram_interface.cc:1192
gem5::memory::DRAMInterface::rdToWrDlySameBG
const Tick rdToWrDlySameBG
Definition: dram_interface.hh:528
gem5::memory::DRAMInterface::Rank::powerDownSleep
void powerDownSleep(PowerState pwr_state, Tick tick)
Schedule a transition to power-down (sleep)
Definition: dram_interface.cc:1513
gem5::memory::DRAMInterface::Rank::pwrStateTick
Tick pwrStateTick
Track when we transitioned to the current power state.
Definition: dram_interface.hh:252
gem5::memory::DRAMInterface::Command::Command
constexpr Command(Data::MemCommand::cmds _type, uint8_t _bank, Tick time_stamp)
Definition: dram_interface.hh:78
gem5::memory::DRAMInterface::RankStats::totalEnergy
statistics::Scalar totalEnergy
Definition: dram_interface.hh:207
gem5::memory::DRAMInterface::accessLatency
Tick accessLatency() const override
Definition: dram_interface.hh:716
gem5::memory::DRAMInterface::Rank::readEntries
uint32_t readEntries
Track number of packets in read queue going to this rank.
Definition: dram_interface.hh:298
gem5::memory::DRAMInterface::RankStats::regStats
void regStats() override
Callback to set stat parameters.
Definition: dram_interface.cc:2002
gem5::memory::DRAMInterface::RankStats::rank
Rank & rank
Definition: dram_interface.hh:171
gem5::memory::DRAMInterface::Rank::processRefreshEvent
void processRefreshEvent()
Definition: dram_interface.cc:1287
gem5::memory::DRAMInterface::bankGroupsPerRank
const uint32_t bankGroupsPerRank
DRAM specific device characteristics.
Definition: dram_interface.hh:495
gem5::memory::DRAMInterface::RankStats::actEnergy
statistics::Scalar actEnergy
Definition: dram_interface.hh:176
gem5::memory::DRAMInterface::setupRank
void setupRank(const uint8_t rank, const bool is_read) override
Setup the rank based on packet received.
Definition: dram_interface.cc:920
gem5::memory::DRAMInterface::PWR_SREF
@ PWR_SREF
Definition: dram_interface.hh:115
gem5::memory::DRAMInterface::Rank::processActivateEvent
void processActivateEvent()
Definition: dram_interface.cc:1235
gem5::memory::DRAMInterface
Interface to DRAM devices with media specific parameters, statistics, and functions.
Definition: dram_interface.hh:65
gem5::memory::DRAMInterface::Command::type
Data::MemCommand::cmds type
Definition: dram_interface.hh:74
gem5::memory::DRAMInterface::lastStatsResetTick
Tick lastStatsResetTick
The time when stats were last reset used to calculate average power.
Definition: dram_interface.hh:548
gem5::memory::DRAMInterface::REF_PRE
@ REF_PRE
Definition: dram_interface.hh:157
gem5::memory::DRAMInterface::RankStats::averagePower
statistics::Scalar averagePower
Definition: dram_interface.hh:208
gem5::memory::DRAMInterface::Rank::rank
uint8_t rank
Current Rank index.
Definition: dram_interface.hh:293
gem5::statistics::Histogram
A simple histogram stat.
Definition: statistics.hh:2125
gem5::EventManager
Definition: eventq.hh:980
gem5::memory::DRAMInterface::REF_RUN
@ REF_RUN
Definition: dram_interface.hh:159
gem5::memory::DRAMInterface::stats
DRAMStats stats
Definition: dram_interface.hh:627
gem5::memory::DRAMInterface::DRAMStats::peakBW
statistics::Formula peakBW
Definition: dram_interface.hh:619
gem5::memory::DRAMInterface::Rank::name
const std::string name() const
Definition: dram_interface.hh:353
mem_interface.hh
gem5::memory::DRAMInterface::tRCD_RD
const Tick tRCD_RD
Definition: dram_interface.hh:507
gem5::memory::DRAMInterface::tPPD
const Tick tPPD
Definition: dram_interface.hh:517
gem5::memory::DRAMInterface::DRAMInterface
DRAMInterface(const DRAMInterfaceParams &_p)
Definition: dram_interface.cc:636
gem5::memory::DRAMInterface::DRAMStats::avgMemAccLat
statistics::Formula avgMemAccLat
Definition: dram_interface.hh:604
gem5::memory::DRAMInterface::DRAMStats::regStats
void regStats() override
Callback to set stat parameters.
Definition: dram_interface.cc:1917
gem5::memory::DRAMInterface::DRAMStats::DRAMStats
DRAMStats(DRAMInterface &dram)
Definition: dram_interface.cc:1845
gem5::memory::MemInterface
General interface to memory device Includes functions and parameters shared across media types.
Definition: mem_interface.hh:74
gem5::memory::DRAMInterface::tRL
const Tick tRL
DRAM specific timing requirements.
Definition: dram_interface.hh:501
gem5::memory::DRAMInterface::DRAMStats::busUtil
statistics::Formula busUtil
Definition: dram_interface.hh:621
gem5::memory::DRAMInterface::Rank::dram
DRAMInterface & dram
A reference to the parent DRAMInterface instance.
Definition: dram_interface.hh:236
gem5::memory::DRAMInterface::DRAMStats::busUtilWrite
statistics::Formula busUtilWrite
Definition: dram_interface.hh:623
gem5::memory::DRAMInterface::DRAMStats::avgRdBW
statistics::Formula avgRdBW
Definition: dram_interface.hh:617
gem5::memory::DRAMInterface::Rank::banks
std::vector< Bank > banks
Vector of Banks.
Definition: dram_interface.hh:334
gem5::memory::DRAMInterface::DRAMStats::dram
DRAMInterface & dram
Definition: dram_interface.hh:586
gem5::memory::DRAMInterface::tRP
const Tick tRP
Definition: dram_interface.hh:509
gem5::memory::DRAMInterface::Rank::inPwrIdleState
bool inPwrIdleState() const
Check if the current rank has all banks closed and is not in a low power state.
Definition: dram_interface.hh:384
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
gem5::memory::DRAMInterface::PWR_ACT_PDN
@ PWR_ACT_PDN
Definition: dram_interface.hh:118
gem5::memory::DRAMInterface::Rank::refreshState
RefreshState refreshState
current refresh state
Definition: dram_interface.hh:283
gem5::memory::DRAMInterface::tXAW
const Tick tXAW
Definition: dram_interface.hh:519
gem5::memory::DRAMInterface::minBankPrep
std::pair< std::vector< uint32_t >, bool > minBankPrep(const MemPacketQueue &queue, Tick min_col_at) const
Find which are the earliest banks ready to issue an activate for the enqueued requests.
Definition: dram_interface.cc:1028
gem5::memory::DRAMInterface::DRAMStats::pageHitRate
statistics::Formula pageHitRate
Definition: dram_interface.hh:624
gem5::memory::DRAMInterface::activationLimit
const uint32_t activationLimit
Definition: dram_interface.hh:526
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::memory::DRAMInterface::commandOffset
Tick commandOffset() const override
Definition: dram_interface.hh:708
gem5::memory::DRAMInterface::RankStats::actBackEnergy
statistics::Scalar actBackEnergy
Definition: dram_interface.hh:185
gem5::memory::DRAMInterface::isBusy
bool isBusy(bool read_queue_empty, bool all_writes_nvm) override
This function checks if ranks are actively refreshing and therefore busy.
Definition: dram_interface.cc:797
gem5::memory::DRAMInterface::Rank::flushCmdList
void flushCmdList()
Push command out of cmdList queue that are scheduled at or before curTick() to DRAMPower library All ...
Definition: dram_interface.cc:1207
gem5::memory::MemPacket
A memory packet stores packets along with the timestamp of when the packet entered the queue,...
Definition: mem_ctrl.hh:98
gem5::memory::DRAMInterface::Rank::power
DRAMPower power
One DRAMPower instance per rank.
Definition: dram_interface.hh:320
gem5::memory::DRAMInterface::Rank::actTicks
std::deque< Tick > actTicks
List to keep track of activate ticks.
Definition: dram_interface.hh:343
gem5::memory::DRAMInterface::tRRD
const Tick tRRD
Definition: dram_interface.hh:515
gem5::memory::DRAMInterface::Rank::isQueueEmpty
bool isQueueEmpty() const
Check if the command queue of current rank is idle.
Definition: dram_interface.cc:1181
gem5::memory::DRAMInterface::DRAMStats::readRowHits
statistics::Scalar readRowHits
Definition: dram_interface.hh:607
gem5::memory::DRAMInterface::tXS
const Tick tXS
Definition: dram_interface.hh:521
gem5::memory::DRAMInterface::RankStats::writeEnergy
statistics::Scalar writeEnergy
Definition: dram_interface.hh:179
gem5::memory::DRAMInterface::writeToReadDelay
Tick writeToReadDelay() const override
Definition: dram_interface.hh:637
gem5::memory::DRAMInterface::REF_IDLE
@ REF_IDLE
Definition: dram_interface.hh:153
gem5::memory::DRAMInterface::tAAD
const Tick tAAD
Definition: dram_interface.hh:518
std::pair
STL pair class.
Definition: stl.hh:58
gem5::memory::DRAMInterface::Rank::wakeUpEvent
EventFunctionWrapper wakeUpEvent
Definition: dram_interface.hh:473
gem5::memory::MemInterface::tWTR
const Tick tWTR
Definition: mem_interface.hh:151
gem5::memory::DRAMInterface::RankStats::selfRefreshEnergy
statistics::Scalar selfRefreshEnergy
Definition: dram_interface.hh:205
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::memory::DRAMInterface::Rank::updatePowerStats
void updatePowerStats()
Function to update Power Stats.
Definition: dram_interface.cc:1767
gem5::memory::DRAMInterface::tCCD_L
const Tick tCCD_L
Definition: dram_interface.hh:506
gem5::memory::DRAMInterface::wrToRdDlySameBG
const Tick wrToRdDlySameBG
Definition: dram_interface.hh:527
gem5::memory::DRAMInterface::readsWaitingToIssue
bool readsWaitingToIssue() const override
The next three functions are NVM-specific and will be ignored by DRAM.
Definition: dram_interface.hh:799
gem5::memory::DRAMInterface::DRAMStats::totMemAccLat
statistics::Scalar totMemAccLat
Definition: dram_interface.hh:599
gem5::memory::DRAMInterface::Rank::lastBurstTick
Tick lastBurstTick
Track when we issued the last read/write burst.
Definition: dram_interface.hh:348
gem5::EventFunctionWrapper
Definition: eventq.hh:1136
gem5::memory::AbstractMemory::size
uint64_t size() const
Get the memory size.
Definition: abstract_mem.hh:308
gem5::memory::DRAMInterface::twoCycleActivate
const uint8_t twoCycleActivate
Definition: dram_interface.hh:525
gem5::memory::DRAMInterface::REF_START
@ REF_START
Definition: dram_interface.hh:158
gem5::memory::DRAMInterface::Rank::stats
RankStats stats
Definition: dram_interface.hh:476
gem5::memory::DRAMInterface::tRCD_WR
const Tick tRCD_WR
Definition: dram_interface.hh:508
gem5::memory::DRAMInterface::RankStats
Definition: dram_interface.hh:163
gem5::memory::DRAMInterface::Rank::inRefIdleState
bool inRefIdleState() const
Check if there is no refresh and no preparation of refresh ongoing i.e.
Definition: dram_interface.hh:374
gem5::memory::DRAMInterface::respondEvent
void respondEvent(uint8_t rank) override
Complete response process for DRAM when read burst is complete This will update the counters and chec...
Definition: dram_interface.cc:931
gem5::memory::DRAMInterface::REF_PD_EXIT
@ REF_PD_EXIT
Definition: dram_interface.hh:155
gem5::memory::DRAMInterface::Rank::numBanksActive
unsigned int numBanksActive
To track number of banks which are currently active for this rank.
Definition: dram_interface.hh:340
gem5::memory::DRAMInterface::init
void init() override
Initialize the DRAM interface and verify parameters.
Definition: dram_interface.cc:742
gem5::memory::DRAMInterface::suspend
void suspend() override
Iterate through DRAM ranks and suspend them.
Definition: dram_interface.cc:1020
gem5::memory::MemPacket::rank
const uint8_t rank
Will be populated by address decoder.
Definition: mem_ctrl.hh:123
gem5::memory::DRAMInterface::tBURST_MIN
const Tick tBURST_MIN
Definition: dram_interface.hh:503
gem5::memory::DRAMInterface::decodePacket
MemPacket * decodePacket(const PacketPtr pkt, Addr pkt_addr, unsigned int size, bool is_read, uint8_t pseudo_channel=0) override
Address decoder to figure out physical mapping onto ranks, banks, and rows.
Definition: dram_interface.cc:835
gem5::memory::DRAMInterface::tCCD_L_WR
const Tick tCCD_L_WR
Definition: dram_interface.hh:505
gem5::memory::DRAMInterface::REF_SREF_EXIT
@ REF_SREF_EXIT
Definition: dram_interface.hh:156
std::deque< Tick >
gem5::memory::DRAMInterface::dataClockSync
const bool dataClockSync
Definition: dram_interface.hh:523
gem5::memory::DRAMInterface::DRAMStats::perBankWrBursts
statistics::Vector perBankWrBursts
Definition: dram_interface.hh:594
gem5::memory::DRAMInterface::Rank::refreshDueAt
Tick refreshDueAt
Keep track of when a refresh is due.
Definition: dram_interface.hh:257
gem5::memory::DRAMInterface::burstInterleave
const bool burstInterleave
Definition: dram_interface.hh:524
gem5::Clocked::tick
Tick tick
Definition: clocked_object.hh:68
gem5::memory::DRAMInterface::writeRespQueueFull
bool writeRespQueueFull() const override
This function is NVM specific.
Definition: dram_interface.hh:801
gem5::memory::DRAMInterface::DRAMStats::bytesRead
statistics::Scalar bytesRead
Definition: dram_interface.hh:613
gem5::memory::DRAMInterface::clkResyncDelay
const Tick clkResyncDelay
Definition: dram_interface.hh:522
gem5::statistics::Group
Statistics container.
Definition: group.hh:92
gem5::memory::DRAMInterface::Command::timeStamp
Tick timeStamp
Definition: dram_interface.hh:76
gem5::memory::DRAMInterface::prechargeBank
void prechargeBank(Rank &rank_ref, Bank &bank_ref, Tick pre_tick, bool auto_or_preall=false, bool trace=true)
Precharge a given bank and also update when the precharge is done.
Definition: dram_interface.cc:284
gem5::memory::DRAMInterface::RankStats::actPowerDownEnergy
statistics::Scalar actPowerDownEnergy
Definition: dram_interface.hh:195
gem5::memory::DRAMInterface::DRAMStats::bytesWritten
statistics::Scalar bytesWritten
Definition: dram_interface.hh:614
gem5::memory::DRAMInterface::RankStats::preEnergy
statistics::Scalar preEnergy
Definition: dram_interface.hh:177
gem5::memory::DRAMInterface::DRAMStats::writeRowHitRate
statistics::Formula writeRowHitRate
Definition: dram_interface.hh:610
gem5::memory::DRAMInterface::Rank::powerEvent
EventFunctionWrapper powerEvent
Definition: dram_interface.hh:470
gem5::memory::DRAMInterface::Rank::cmdList
std::vector< Command > cmdList
List of commands issued, to be sent to DRAMPpower at refresh and stats dump.
Definition: dram_interface.hh:328
gem5::memory::DRAMInterface::tRFC
const Tick tRFC
Definition: dram_interface.hh:513
gem5::memory::DRAMInterface::chooseRead
void chooseRead(MemPacketQueue &queue) override
This function is NVM specific.
Definition: dram_interface.hh:800
gem5::memory::DRAMInterface::Rank::wakeUpAllowedAt
Tick wakeUpAllowedAt
delay low-power exit until this requirement is met
Definition: dram_interface.hh:315
gem5::memory::DRAMInterface::Rank
Rank class includes a vector of banks.
Definition: dram_interface.hh:229
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::memory::DRAMInterface::DRAMStats::readRowHitRate
statistics::Formula readRowHitRate
Definition: dram_interface.hh:609
gem5::memory::DRAMInterface::RankStats::totalIdleTime
statistics::Scalar totalIdleTime
Stat to track total DRAM idle time.
Definition: dram_interface.hh:214
gem5::memory::DRAMInterface::pageMgmt
enums::PageManage pageMgmt
Definition: dram_interface.hh:531
gem5::memory::DRAMInterface::Rank::schedulePowerEvent
void schedulePowerEvent(PowerState pwr_state, Tick tick)
Schedule a power state transition in the future, and potentially override an already scheduled transi...
Definition: dram_interface.cc:1492
gem5::memory::DRAMInterface::DRAMStats::resetStats
void resetStats() override
Callback to reset stats.
Definition: dram_interface.cc:1840
gem5::memory::DRAMInterface::Rank::startup
void startup(Tick ref_tick)
Kick off accounting for power and refresh states and schedule initial refresh.
Definition: dram_interface.cc:1157
gem5::memory::DRAMInterface::timeStampOffset
uint64_t timeStampOffset
Definition: dram_interface.hh:539
gem5::memory::DRAMInterface::RankStats::preDumpStats
void preDumpStats() override
Callback before stats are dumped.
Definition: dram_interface.cc:2025
gem5::memory::DRAMInterface::Command::bank
uint8_t bank
Definition: dram_interface.hh:75
gem5::memory::DRAMInterface::Rank::pwrStatePostRefresh
PowerState pwrStatePostRefresh
Previous low-power state, which will be re-entered after refresh.
Definition: dram_interface.hh:247
gem5::memory::DRAMInterface::sortTime
static bool sortTime(const Command &cmd, const Command &cmd_next)
Function for sorting Command structures based on timeStamp.
Definition: dram_interface.hh:487
gem5::memory::DRAMInterface::tRAS
const Tick tRAS
Definition: dram_interface.hh:510
gem5::memory::DRAMInterface::doBurstAccess
std::pair< Tick, Tick > doBurstAccess(MemPacket *mem_pkt, Tick next_burst_at, const std::vector< MemPacketQueue > &queue) override
Actually do the burst - figure out the latency it will take to service the req based on bank state,...
Definition: dram_interface.cc:347
gem5::memory::DRAMInterface::Rank::pwrState
PowerState pwrState
Current power state.
Definition: dram_interface.hh:278
gem5::memory::DRAMInterface::startup
void startup() override
Iterate through dram ranks and instantiate per rank startup routine.
Definition: dram_interface.cc:784
gem5::memory::DRAMInterface::DRAMStats::busUtilRead
statistics::Formula busUtilRead
Definition: dram_interface.hh:622
gem5::memory::DRAMInterface::RankStats::RankStats
RankStats(DRAMInterface &dram, Rank &rank)
Definition: dram_interface.cc:1964
gem5::memory::DRAMInterface::RankStats::resetStats
void resetStats() override
Callback to reset stats.
Definition: dram_interface.cc:2017
gem5::memory::DRAMInterface::Rank::forceSelfRefreshExit
bool forceSelfRefreshExit() const
Trigger a self-refresh exit if there are entries enqueued Exit if there are any read entries regardle...
Definition: dram_interface.cc:1833

Generated on Sun Jul 30 2023 01:56:58 for gem5 by doxygen 1.8.17