gem5  v22.1.0.0
mem_ctrl.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 __MEM_CTRL_HH__
47 #define __MEM_CTRL_HH__
48 
49 #include <deque>
50 #include <string>
51 #include <unordered_set>
52 #include <utility>
53 #include <vector>
54 
55 #include "base/callback.hh"
56 #include "base/statistics.hh"
57 #include "enums/MemSched.hh"
58 #include "mem/qos/mem_ctrl.hh"
59 #include "mem/qport.hh"
60 #include "params/MemCtrl.hh"
61 #include "sim/eventq.hh"
62 
63 namespace gem5
64 {
65 
66 namespace memory
67 {
68 
69 class MemInterface;
70 class DRAMInterface;
71 class NVMInterface;
72 
80 {
81  public:
82 
84  const unsigned int burstCount;
85 
87  unsigned int burstsServiced;
88 
89  BurstHelper(unsigned int _burstCount)
90  : burstCount(_burstCount), burstsServiced(0)
91  { }
92 };
93 
98 class MemPacket
99 {
100  public:
101 
104 
107 
109  const PacketPtr pkt;
110 
113 
114  const bool read;
115 
117  const bool dram;
118 
120  const uint8_t pseudoChannel;
121 
123  const uint8_t rank;
124  const uint8_t bank;
125  const uint32_t row;
126 
132  const uint16_t bankId;
133 
141 
146  unsigned int size;
147 
153 
157  uint8_t _qosValue;
158 
163  inline void qosValue(const uint8_t qv) { _qosValue = qv; }
164 
169  inline uint8_t qosValue() const { return _qosValue; }
170 
175  inline RequestorID requestorId() const { return _requestorId; }
176 
181  inline unsigned int getSize() const { return size; }
182 
187  inline Addr getAddr() const { return addr; }
188 
193  inline bool isRead() const { return read; }
194 
199  inline bool isWrite() const { return !read; }
200 
204  inline bool isDram() const { return dram; }
205 
206  MemPacket(PacketPtr _pkt, bool is_read, bool is_dram, uint8_t _channel,
207  uint8_t _rank, uint8_t _bank, uint32_t _row, uint16_t bank_id,
208  Addr _addr, unsigned int _size)
209  : entryTime(curTick()), readyTime(curTick()), pkt(_pkt),
211  read(is_read), dram(is_dram), pseudoChannel(_channel), rank(_rank),
212  bank(_bank), row(_row), bankId(bank_id), addr(_addr), size(_size),
213  burstHelper(NULL), _qosValue(_pkt->qosValue())
214  { }
215 
216 };
217 
218 // The memory packets are store in a multiple dequeue structure,
219 // based on their QoS priority
221 
222 
246 class MemCtrl : public qos::MemCtrl
247 {
248  protected:
249 
250  // For now, make use of a queued response port to avoid dealing with
251  // flow control for the responses being sent back
253  {
254 
257 
258  public:
259 
260  MemoryPort(const std::string& name, MemCtrl& _ctrl);
261  void disableSanityCheck();
262 
263  protected:
264 
265  Tick recvAtomic(PacketPtr pkt) override;
267  PacketPtr pkt, MemBackdoorPtr &backdoor) override;
268 
269  void recvFunctional(PacketPtr pkt) override;
270 
271  bool recvTimingReq(PacketPtr) override;
272 
273  AddrRangeList getAddrRanges() const override;
274 
275  };
276 
282 
287 
293 
300  virtual void processNextReqEvent(MemInterface* mem_intr,
301  MemPacketQueue& resp_queue,
302  EventFunctionWrapper& resp_event,
303  EventFunctionWrapper& next_req_event,
304  bool& retry_wr_req);
306 
307  virtual void processRespondEvent(MemInterface* mem_intr,
308  MemPacketQueue& queue,
309  EventFunctionWrapper& resp_event,
310  bool& retry_rd_req);
312 
319  bool readQueueFull(unsigned int pkt_count) const;
320 
327  bool writeQueueFull(unsigned int pkt_count) const;
328 
344  bool addToReadQueue(PacketPtr pkt, unsigned int pkt_count,
345  MemInterface* mem_intr);
346 
358  void addToWriteQueue(PacketPtr pkt, unsigned int pkt_count,
359  MemInterface* mem_intr);
360 
370  virtual Tick doBurstAccess(MemPacket* mem_pkt, MemInterface* mem_intr);
371 
382  virtual void accessAndRespond(PacketPtr pkt, Tick static_latency,
383  MemInterface* mem_intr);
384 
390  virtual bool packetReady(MemPacket* pkt, MemInterface* mem_intr);
391 
397  virtual Tick minReadToWriteDataGap();
398 
404  virtual Tick minWriteToReadDataGap();
405 
418  virtual MemPacketQueue::iterator chooseNext(MemPacketQueue& queue,
419  Tick extra_col_delay, MemInterface* mem_intr);
420 
430  chooseNextFRFCFS(MemPacketQueue& queue, Tick extra_col_delay,
431  MemInterface* mem_intr);
432 
439  Tick getBurstWindow(Tick cmd_tick);
440 
444  void printQs() const;
445 
454  virtual Addr burstAlign(Addr addr, MemInterface* mem_intr) const;
455 
463  virtual bool pktSizeCheck(MemPacket* mem_pkt,
464  MemInterface* mem_intr) const;
465 
472 
480  std::unordered_set<Addr> isInWriteQueue;
481 
491 
497  std::unordered_multiset<Tick> burstTicks;
498 
503 
504  virtual AddrRangeList getAddrRanges();
505 
512  uint32_t readBufferSize;
513  uint32_t writeBufferSize;
516  const uint32_t minWritesPerSwitch;
517  const uint32_t minReadsPerSwitch;
518  uint32_t writesThisTime;
519  uint32_t readsThisTime;
520 
525  enums::MemSched memSchedPolicy;
526 
533 
540 
546 
551 
553 
561 
562  struct CtrlStats : public statistics::Group
563  {
565 
566  void regStats() override;
567 
569 
570  // All statistics that the model needs to capture
578  // Average queue lengths
581 
590 
594  // Average bandwidth
597 
600 
601  // per-requestor bytes read and written to memory
604 
605  // per-requestor bytes read and written to memory rate
608 
609  // per-requestor read and write serviced memory accesses
612 
613  // per-requestor read and write total memory access latency
616 
617  // per-requestor raed and write average memory access latency
620  };
621 
623 
628  std::unique_ptr<Packet> pendingDelete;
629 
637  {
638  return (is_read ? readQueue : writeQueue);
639  };
640 
641  virtual bool respQEmpty()
642  {
643  return respQueue.empty();
644  }
645 
652  virtual bool memBusy(MemInterface* mem_intr);
653 
659  virtual void nonDetermReads(MemInterface* mem_intr);
660 
669  virtual bool nvmWriteBlock(MemInterface* mem_intr);
670 
674  virtual void pruneBurstTick();
675 
676  public:
677 
678  MemCtrl(const MemCtrlParams &p);
679 
685  virtual bool allIntfDrained() const;
686 
687  DrainState drain() override;
688 
702  virtual Tick verifySingleCmd(Tick cmd_tick, Tick max_cmds_per_burst,
703  bool row_cmd);
704 
719  virtual Tick verifyMultiCmd(Tick cmd_tick, Tick max_cmds_per_burst,
720  Tick max_multi_cmd_split = 0);
721 
727  virtual bool respondEventScheduled(uint8_t pseudo_channel = 0) const
728  {
729  assert(pseudo_channel == 0);
730  return respondEvent.scheduled();
731  }
732 
738  virtual bool requestEventScheduled(uint8_t pseudo_channel = 0) const
739  {
740  assert(pseudo_channel == 0);
741  return nextReqEvent.scheduled();
742  }
743 
753  virtual void restartScheduler(Tick tick, uint8_t pseudo_channel = 0)
754  {
755  assert(pseudo_channel == 0);
757  }
758 
765  bool inReadBusState(bool next_state) const;
766 
773  bool inWriteBusState(bool next_state) const;
774 
775  Port &getPort(const std::string &if_name,
776  PortID idx=InvalidPortID) override;
777 
778  virtual void init() override;
779  virtual void startup() override;
780  virtual void drainResume() override;
781 
782  protected:
783 
784  virtual Tick recvAtomic(PacketPtr pkt);
785  virtual Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor);
786  virtual void recvFunctional(PacketPtr pkt);
787  virtual bool recvTimingReq(PacketPtr pkt);
788 
789  bool recvFunctionalLogic(PacketPtr pkt, MemInterface* mem_intr);
790  Tick recvAtomicLogic(PacketPtr pkt, MemInterface* mem_intr);
791 
792 };
793 
794 } // namespace memory
795 } // namespace gem5
796 
797 #endif //__MEM_CTRL_HH__
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
Ports are used to interface objects to each other.
Definition: port.hh:62
const std::string name() const
Return port name (for DPRINTF).
Definition: port.hh:111
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
Definition: qport.hh:62
A burst helper helps organize and manage a packet that is larger than the memory burst size.
Definition: mem_ctrl.hh:80
unsigned int burstsServiced
Number of bursts serviced so far for a system packet.
Definition: mem_ctrl.hh:87
BurstHelper(unsigned int _burstCount)
Definition: mem_ctrl.hh:89
const unsigned int burstCount
Number of bursts requred for a system packet.
Definition: mem_ctrl.hh:84
void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
Definition: mem_ctrl.cc:1463
MemoryPort(const std::string &name, MemCtrl &_ctrl)
Definition: mem_ctrl.cc:1451
bool recvTimingReq(PacketPtr) override
Receive a timing request from the peer.
Definition: mem_ctrl.cc:1491
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
Definition: mem_ctrl.cc:1457
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
Definition: mem_ctrl.cc:1478
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
Receive an atomic request packet from the peer, and optionally provide a backdoor to the data being a...
Definition: mem_ctrl.cc:1484
The memory controller is a single-channel memory controller capturing the most important timing const...
Definition: mem_ctrl.hh:247
virtual void recvFunctional(PacketPtr pkt)
Definition: mem_ctrl.cc:1359
virtual void pruneBurstTick()
Remove commands that have already issued from burstTicks.
Definition: mem_ctrl.cc:656
uint32_t writeLowThreshold
Definition: mem_ctrl.hh:515
enums::MemSched memSchedPolicy
Memory controller configuration initialized based on parameter values.
Definition: mem_ctrl.hh:525
bool recvFunctionalLogic(PacketPtr pkt, MemInterface *mem_intr)
Definition: mem_ctrl.cc:1368
bool retryRdReq
Remember if we have to retry a request when available.
Definition: mem_ctrl.hh:291
void printQs() const
Used for debugging to observe the contents of the queues.
Definition: mem_ctrl.cc:379
const uint32_t minReadsPerSwitch
Definition: mem_ctrl.hh:517
virtual void startup() override
startup() is the final initialization call before simulation.
Definition: mem_ctrl.cc:111
uint32_t readsThisTime
Definition: mem_ctrl.hh:519
uint32_t writesThisTime
Definition: mem_ctrl.hh:518
void addToWriteQueue(PacketPtr pkt, unsigned int pkt_count, MemInterface *mem_intr)
Decode the incoming pkt, create a mem_pkt and push to the back of the write queue.
Definition: mem_ctrl.cc:303
Tick recvAtomicLogic(PacketPtr pkt, MemInterface *mem_intr)
Definition: mem_ctrl.cc:137
std::deque< MemPacket * > respQueue
Response queue where read packets wait after we're done working with them, but it's not time to send ...
Definition: mem_ctrl.hh:490
MemoryPort port
Our incoming port, for a multi-ported controller add a crossbar in front of it.
Definition: mem_ctrl.hh:281
uint32_t writeHighThreshold
Definition: mem_ctrl.hh:514
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
Definition: mem_ctrl.hh:628
std::vector< MemPacketQueue > writeQueue
Definition: mem_ctrl.hh:471
virtual Tick verifyMultiCmd(Tick cmd_tick, Tick max_cmds_per_burst, Tick max_multi_cmd_split=0)
Check for command bus contention for multi-cycle (2 currently) command.
Definition: mem_ctrl.cc:700
EventFunctionWrapper respondEvent
Definition: mem_ctrl.hh:311
virtual MemPacketQueue::iterator chooseNext(MemPacketQueue &queue, Tick extra_col_delay, MemInterface *mem_intr)
The memory schduler/arbiter - picks which request needs to go next, based on the specified policy suc...
Definition: mem_ctrl.cc:554
virtual std::pair< MemPacketQueue::iterator, Tick > chooseNextFRFCFS(MemPacketQueue &queue, Tick extra_col_delay, MemInterface *mem_intr)
For FR-FCFS policy reorder the read/write queue depending on row buffer hits and earliest bursts avai...
Definition: mem_ctrl.cc:595
bool readQueueFull(unsigned int pkt_count) const
Check if the read queue has room for more entries.
Definition: mem_ctrl.cc:167
virtual Tick doBurstAccess(MemPacket *mem_pkt, MemInterface *mem_intr)
Actually do the burst based on media specific access function.
Definition: mem_ctrl.cc:790
MemInterface * dram
Definition: mem_ctrl.hh:502
virtual void processNextReqEvent(MemInterface *mem_intr, MemPacketQueue &resp_queue, EventFunctionWrapper &resp_event, EventFunctionWrapper &next_req_event, bool &retry_wr_req)
Bunch of things requires to setup "events" in gem5 When event "respondEvent" occurs for example,...
Definition: mem_ctrl.cc:875
bool addToReadQueue(PacketPtr pkt, unsigned int pkt_count, MemInterface *mem_intr)
When a new read comes in, first check if the write q has a pending request to the same address....
Definition: mem_ctrl.cc:190
std::unordered_multiset< Tick > burstTicks
Holds count of commands issued in burst window starting at defined Tick.
Definition: mem_ctrl.hh:497
virtual bool requestEventScheduled(uint8_t pseudo_channel=0) const
Is there a read/write burst Event scheduled?
Definition: mem_ctrl.hh:738
virtual Addr burstAlign(Addr addr, MemInterface *mem_intr) const
Burst-align an address.
Definition: mem_ctrl.cc:1154
const uint32_t minWritesPerSwitch
Definition: mem_ctrl.hh:516
bool writeQueueFull(unsigned int pkt_count) const
Check if the write queue has room for more entries.
Definition: mem_ctrl.cc:179
virtual void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: mem_ctrl.cc:101
const Tick backendLatency
Pipeline latency of the backend and PHY.
Definition: mem_ctrl.hh:539
uint32_t readBufferSize
The following are basic design parameters of the memory controller, and are initialized based on para...
Definition: mem_ctrl.hh:512
virtual void restartScheduler(Tick tick, uint8_t pseudo_channel=0)
restart the controller This can be used by interfaces to restart the scheduler after maintainence com...
Definition: mem_ctrl.hh:753
const Tick frontendLatency
Pipeline latency of the controller frontend.
Definition: mem_ctrl.hh:532
virtual bool respondEventScheduled(uint8_t pseudo_channel=0) const
Is there a respondEvent scheduled?
Definition: mem_ctrl.hh:727
virtual bool respQEmpty()
Definition: mem_ctrl.hh:641
Tick nextReqTime
The soonest you have to start thinking about the next request is the longest access time that can occ...
Definition: mem_ctrl.hh:560
virtual bool allIntfDrained() const
Ensure that all interfaced have drained commands.
Definition: mem_ctrl.cc:1390
EventFunctionWrapper nextReqEvent
Definition: mem_ctrl.hh:305
virtual bool packetReady(MemPacket *pkt, MemInterface *mem_intr)
Determine if there is a packet that can issue.
Definition: mem_ctrl.cc:1136
virtual Tick verifySingleCmd(Tick cmd_tick, Tick max_cmds_per_burst, bool row_cmd)
Check for command bus contention for single cycle command.
Definition: mem_ctrl.cc:677
virtual bool nvmWriteBlock(MemInterface *mem_intr)
Will check if all writes are for nvm interface and nvm's write resp queue is full.
Definition: mem_ctrl.cc:853
virtual void processRespondEvent(MemInterface *mem_intr, MemPacketQueue &queue, EventFunctionWrapper &resp_event, bool &retry_rd_req)
Definition: mem_ctrl.cc:485
virtual void accessAndRespond(PacketPtr pkt, Tick static_latency, MemInterface *mem_intr)
When a packet reaches its "readyTime" in the response Q, use the "access()" method in AbstractMemory ...
Definition: mem_ctrl.cc:616
virtual Tick minWriteToReadDataGap()
Calculate the minimum delay used when scheduling a write-to-read transision.
Definition: mem_ctrl.cc:1148
virtual bool recvTimingReq(PacketPtr pkt)
Definition: mem_ctrl.cc:404
bool inReadBusState(bool next_state) const
Check the current direction of the memory channel.
Definition: mem_ctrl.cc:764
virtual Tick minReadToWriteDataGap()
Calculate the minimum delay used when scheduling a read-to-write transision.
Definition: mem_ctrl.cc:1142
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: mem_ctrl.cc:1399
std::vector< MemPacketQueue > readQueue
The controller's main read and write queues, with support for QoS reordering.
Definition: mem_ctrl.hh:470
bool isTimingMode
Remember if the memory system is in timing mode.
Definition: mem_ctrl.hh:286
virtual Tick recvAtomic(PacketPtr pkt)
Definition: mem_ctrl.cc:126
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: mem_ctrl.cc:1380
virtual bool memBusy(MemInterface *mem_intr)
Checks if the memory interface is already busy.
Definition: mem_ctrl.cc:832
uint32_t writeBufferSize
Definition: mem_ctrl.hh:513
virtual AddrRangeList getAddrRanges()
Definition: mem_ctrl.cc:1443
Tick nextBurstAt
Till when must we wait before issuing next RD/WR burst?
Definition: mem_ctrl.hh:550
MemCtrl(const MemCtrlParams &p)
Definition: mem_ctrl.cc:60
virtual Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor)
Definition: mem_ctrl.cc:159
Tick getBurstWindow(Tick cmd_tick)
Calculate burst window aligned tick.
Definition: mem_ctrl.cc:669
std::vector< MemPacketQueue > & selQueue(bool is_read)
Select either the read or write queue.
Definition: mem_ctrl.hh:636
std::unordered_set< Addr > isInWriteQueue
To avoid iterating over the write queue to check for overlapping transactions, maintain a set of burs...
Definition: mem_ctrl.hh:480
virtual bool pktSizeCheck(MemPacket *mem_pkt, MemInterface *mem_intr) const
Check if mem pkt's size is sane.
Definition: mem_ctrl.cc:1160
virtual void drainResume() override
Resume execution after a successful drain.
Definition: mem_ctrl.cc:1425
bool inWriteBusState(bool next_state) const
Check the current direction of the memory channel.
Definition: mem_ctrl.cc:777
const Tick commandWindow
Length of a command window, used to check command bandwidth.
Definition: mem_ctrl.hh:545
virtual void nonDetermReads(MemInterface *mem_intr)
Will access memory interface and select non-deterministic reads to issue.
Definition: mem_ctrl.cc:860
General interface to memory device Includes functions and parameters shared across media types.
A memory packet stores packets along with the timestamp of when the packet entered the queue,...
Definition: mem_ctrl.hh:99
Tick readyTime
When will request leave the controller.
Definition: mem_ctrl.hh:106
const bool dram
Does this packet access DRAM?
Definition: mem_ctrl.hh:117
Addr getAddr() const
Get the packet address (interface compatibility with Packet)
Definition: mem_ctrl.hh:187
void qosValue(const uint8_t qv)
Set the packet QoS value (interface compatibility with Packet)
Definition: mem_ctrl.hh:163
const uint8_t pseudoChannel
pseudo channel num
Definition: mem_ctrl.hh:120
const uint16_t bankId
Bank id is calculated considering banks in all the ranks eg: 2 ranks each with 8 banks,...
Definition: mem_ctrl.hh:132
uint8_t _qosValue
QoS value of the encapsulated packet read at queuing time.
Definition: mem_ctrl.hh:157
const uint32_t row
Definition: mem_ctrl.hh:125
BurstHelper * burstHelper
A pointer to the BurstHelper if this MemPacket is a split packet If not a split packet (common case),...
Definition: mem_ctrl.hh:152
const uint8_t bank
Definition: mem_ctrl.hh:124
unsigned int size
The size of this dram packet in bytes It is always equal or smaller than the burst size.
Definition: mem_ctrl.hh:146
MemPacket(PacketPtr _pkt, bool is_read, bool is_dram, uint8_t _channel, uint8_t _rank, uint8_t _bank, uint32_t _row, uint16_t bank_id, Addr _addr, unsigned int _size)
Definition: mem_ctrl.hh:206
Addr addr
The starting address of the packet.
Definition: mem_ctrl.hh:140
bool isDram() const
Return true if its a DRAM access.
Definition: mem_ctrl.hh:204
const RequestorID _requestorId
RequestorID associated with the packet.
Definition: mem_ctrl.hh:112
bool isRead() const
Return true if its a read packet (interface compatibility with Packet)
Definition: mem_ctrl.hh:193
const Tick entryTime
When did request enter the controller.
Definition: mem_ctrl.hh:103
const PacketPtr pkt
This comes from the outside world.
Definition: mem_ctrl.hh:109
RequestorID requestorId() const
Get the packet RequestorID (interface compatibility with Packet)
Definition: mem_ctrl.hh:175
unsigned int getSize() const
Get the packet size (interface compatibility with Packet)
Definition: mem_ctrl.hh:181
bool isWrite() const
Return true if its a write packet (interface compatibility with Packet)
Definition: mem_ctrl.hh:199
uint8_t qosValue() const
Get the packet QoS value (interface compatibility with Packet)
Definition: mem_ctrl.hh:169
const uint8_t rank
Will be populated by address decoder.
Definition: mem_ctrl.hh:123
The qos::MemCtrl is a base class for Memory objects which support QoS - it provides access to a set o...
Definition: mem_ctrl.hh:81
uint8_t schedule(RequestorID id, uint64_t data)
Definition: mem_ctrl.cc:218
A stat that calculates the per tick average of a value.
Definition: statistics.hh:1959
A formula for statistics that is calculated when printed.
Definition: statistics.hh:2540
Statistics container.
Definition: group.hh:94
A simple histogram stat.
Definition: statistics.hh:2127
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:1931
A vector of scalar stats.
Definition: statistics.hh:2007
STL deque class.
Definition: stl.hh:44
STL pair class.
Definition: stl.hh:58
STL vector class.
Definition: stl.hh:37
DrainState
Object drain/handover states.
Definition: drain.hh:75
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:465
Bitfield< 54 > p
Definition: pagetable.hh:70
Bitfield< 3 > addr
Definition: types.hh:84
std::deque< MemPacket * > MemPacketQueue
Definition: mem_ctrl.hh:220
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const PortID InvalidPortID
Definition: types.hh:246
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:245
uint64_t Tick
Tick count type.
Definition: types.hh:58
uint16_t RequestorID
Definition: request.hh:95
Declaration of the queued port.
Declaration of Statistics objects.
statistics::Scalar writeReqs
Definition: mem_ctrl.hh:572
statistics::Scalar mergedWrBursts
Definition: mem_ctrl.hh:576
statistics::Scalar readReqs
Definition: mem_ctrl.hh:571
statistics::Scalar servicedByWrQ
Definition: mem_ctrl.hh:575
statistics::Histogram rdPerTurnAround
Definition: mem_ctrl.hh:588
statistics::Vector readPktSize
Definition: mem_ctrl.hh:584
statistics::Scalar numWrRetry
Definition: mem_ctrl.hh:583
statistics::Scalar totGap
Definition: mem_ctrl.hh:598
statistics::Scalar numRdRetry
Definition: mem_ctrl.hh:582
statistics::Formula requestorReadAvgLat
Definition: mem_ctrl.hh:618
statistics::Scalar readBursts
Definition: mem_ctrl.hh:573
void regStats() override
Callback to set stat parameters.
Definition: mem_ctrl.cc:1263
statistics::Formula requestorWriteAvgLat
Definition: mem_ctrl.hh:619
statistics::Vector requestorReadTotalLat
Definition: mem_ctrl.hh:614
statistics::Vector requestorWriteTotalLat
Definition: mem_ctrl.hh:615
statistics::Vector requestorWriteBytes
Definition: mem_ctrl.hh:603
statistics::Formula avgGap
Definition: mem_ctrl.hh:599
statistics::Scalar writeBursts
Definition: mem_ctrl.hh:574
statistics::Vector writePktSize
Definition: mem_ctrl.hh:585
statistics::Histogram wrPerTurnAround
Definition: mem_ctrl.hh:589
statistics::Vector requestorWriteAccesses
Definition: mem_ctrl.hh:611
statistics::Formula avgRdBWSys
Definition: mem_ctrl.hh:595
statistics::Scalar bytesReadSys
Definition: mem_ctrl.hh:592
statistics::Average avgRdQLen
Definition: mem_ctrl.hh:579
statistics::Scalar neitherReadNorWriteReqs
Definition: mem_ctrl.hh:577
statistics::Formula requestorReadRate
Definition: mem_ctrl.hh:606
statistics::Vector requestorReadAccesses
Definition: mem_ctrl.hh:610
statistics::Scalar bytesWrittenSys
Definition: mem_ctrl.hh:593
statistics::Average avgWrQLen
Definition: mem_ctrl.hh:580
statistics::Vector wrQLenPdf
Definition: mem_ctrl.hh:587
statistics::Formula requestorWriteRate
Definition: mem_ctrl.hh:607
statistics::Formula avgWrBWSys
Definition: mem_ctrl.hh:596
statistics::Scalar bytesReadWrQ
Definition: mem_ctrl.hh:591
statistics::Vector requestorReadBytes
Definition: mem_ctrl.hh:602
statistics::Vector rdQLenPdf
Definition: mem_ctrl.hh:586
Definition: mem.h:38

Generated on Wed Dec 21 2022 10:22:37 for gem5 by doxygen 1.9.1