Go to the documentation of this file.
44 #include "debug/DRAM.hh"
45 #include "debug/Drain.hh"
46 #include "debug/MemCtrl.hh"
47 #include "debug/NVM.hh"
48 #include "debug/QOS.hh"
54 port(
name() +
".port", *this), isTimingMode(false),
55 retryRdReq(false), retryWrReq(false),
57 respondEvent([
this]{ processRespondEvent(); },
name()),
58 dram(
p.dram), nvm(
p.nvm),
59 readBufferSize((dram ? dram->readBufferSize : 0) +
60 (nvm ? nvm->readBufferSize : 0)),
61 writeBufferSize((dram ? dram->writeBufferSize : 0) +
62 (nvm ? nvm->writeBufferSize : 0)),
63 writeHighThreshold(writeBufferSize *
p.write_high_thresh_perc / 100.0),
64 writeLowThreshold(writeBufferSize *
p.write_low_thresh_perc / 100.0),
65 minWritesPerSwitch(
p.min_writes_per_switch),
66 writesThisTime(0), readsThisTime(0),
67 memSchedPolicy(
p.mem_sched_policy),
68 frontendLatency(
p.static_frontend_latency),
69 backendLatency(
p.static_backend_latency),
70 commandWindow(
p.command_window),
71 nextBurstAt(0), prevArrival(0),
76 readQueue.resize(
p.qos_priorities);
77 writeQueue.resize(
p.qos_priorities);
81 dram->setCtrl(
this, commandWindow);
83 nvm->setCtrl(
this, commandWindow);
85 fatal_if(!dram && !nvm,
"Memory controller must have an interface");
88 if (
p.write_low_thresh_perc >=
p.write_high_thresh_perc)
89 fatal(
"Write buffer low threshold %d must be smaller than the "
90 "high threshold %d\n",
p.write_low_thresh_perc,
91 p.write_high_thresh_perc);
98 fatal(
"MemCtrl %s is unconnected!\n",
name());
148 panic(
"Can't handle address range for packet %s\n",
171 "Read queue limit %d, current size %d, entries needed %d\n",
183 "Write queue limit %d, current size %d, entries needed %d\n",
197 assert(pkt_count != 0);
207 unsigned pktsServicedByWrQ = 0;
212 for (
int cnt = 0; cnt < pkt_count; ++cnt) {
213 unsigned size = std::min((
addr | (burst_size - 1)) + 1,
221 bool foundInWrQ =
false;
227 for (
const auto&
p : vec) {
230 if (
p->addr <=
addr &&
231 ((
addr + size) <= (
p->addr +
p->size))) {
237 "Read to addr %lld with size %d serviced by "
252 if (pkt_count > 1 && burst_helper == NULL) {
254 "memory requests\n", pkt->
getAddr(), pkt_count);
288 addr = (
addr | (burst_size - 1)) + 1;
292 if (pktsServicedByWrQ == pkt_count) {
298 if (burst_helper != NULL)
322 for (
int cnt = 0; cnt < pkt_count; ++cnt) {
323 unsigned size = std::min((
addr | (burst_size - 1)) + 1,
364 "Merging write burst with existing queue entry\n");
372 addr = (
addr | (burst_size - 1)) + 1;
396 for (
const auto& packet : queue) {
408 for (
const auto& packet : queue) {
426 "Should only see read and writes at memory controller\n");
441 panic(
"Can't handle address range for packet %s\n",
450 unsigned size = pkt->
getSize();
496 "processRespondEvent(): Some req has reached its readyTime\n");
536 DPRINTF(Drain,
"Controller done draining\n");
538 }
else if (mem_pkt->
isDram()) {
554 MemPacketQueue::iterator
559 MemPacketQueue::iterator ret = queue.end();
561 if (!queue.empty()) {
562 if (queue.size() == 1) {
573 for (
auto i = queue.begin();
i != queue.end(); ++
i) {
583 panic(
"No scheduling policy chosen\n");
589 MemPacketQueue::iterator
592 auto selected_pkt_it = queue.end();
601 auto nvm_pkt_it = queue.end();
606 std::tie(selected_pkt_it, col_allowed_at) =
608 std::tie(nvm_pkt_it, nvm_col_at) =
613 if (col_allowed_at > nvm_col_at) {
614 selected_pkt_it = nvm_pkt_it;
617 std::tie(selected_pkt_it, col_allowed_at) =
620 std::tie(selected_pkt_it, col_allowed_at) =
624 if (selected_pkt_it == queue.end()) {
628 return selected_pkt_it;
644 panic(
"Can't handle address range for packet %s\n",
680 auto current_it = it++;
693 return (cmd_tick - burst_offset);
700 Tick cmd_at = cmd_tick;
707 while (
burstTicks.count(burst_tick) >= max_cmds_per_burst) {
721 Tick max_multi_cmd_split)
724 Tick cmd_at = cmd_tick;
734 Tick burst_offset = 0;
736 while (max_multi_cmd_split > (first_cmd_offset + burst_offset)) {
741 Tick first_cmd_tick = burst_tick - std::min(burst_offset, burst_tick);
744 bool first_can_issue =
false;
745 bool second_can_issue =
false;
747 while (!first_can_issue || !second_can_issue) {
748 bool same_burst = (burst_tick == first_cmd_tick);
749 auto first_cmd_count =
burstTicks.count(first_cmd_tick);
750 auto second_cmd_count = same_burst ? first_cmd_count + 1 :
753 first_can_issue = first_cmd_count < max_cmds_per_burst;
754 second_can_issue = second_cmd_count < max_cmds_per_burst;
756 if (!second_can_issue) {
757 DPRINTF(
MemCtrl,
"Contention (cmd2) found on command bus at %d\n",
766 bool gap_violated = !same_burst &&
767 ((burst_tick - first_cmd_tick) > max_multi_cmd_split);
769 if (!first_can_issue || (!second_can_issue && gap_violated)) {
770 DPRINTF(
MemCtrl,
"Contention (cmd1) found on command bus at %d\n",
840 DPRINTF(
MemCtrl,
"Access to %lld, ready at %lld next burst at %lld.\n",
882 switched_cmd_type?
"[turnaround triggered]":
"");
884 if (switched_cmd_type) {
887 "Switching to writes after %d reads with %d reads "
893 "Switching to reads after %d writes with %d writes "
920 bool nvm_busy =
true;
921 bool all_writes_nvm =
false;
925 nvm_busy =
nvm->
isBusy(read_queue_empty, all_writes_nvm);
929 if (dram_busy && nvm_busy) {
940 bool switch_to_writes =
false;
951 "Switching to writes due to read queue empty\n");
952 switch_to_writes =
true;
961 DPRINTF(Drain,
"MemCtrl controller done draining\n");
971 bool read_found =
false;
972 MemPacketQueue::iterator to_read;
981 "Checking READ queue [%d] priority [%d elements]\n",
982 prio, queue->size());
987 to_read =
chooseNext((*queue), switched_cmd_type ?
990 if (to_read != queue->end()) {
1007 auto mem_pkt = *to_read;
1012 assert(mem_pkt->size <= (mem_pkt->isDram() ?
1015 assert(mem_pkt->readyTime >=
curTick());
1019 mem_pkt->qosValue(), mem_pkt->getAddr(), 1,
1020 mem_pkt->readyTime - mem_pkt->entryTime);
1029 assert(
respQueue.back()->readyTime <= mem_pkt->readyTime);
1040 switch_to_writes =
true;
1045 readQueue[mem_pkt->qosValue()].erase(to_read);
1051 if (switch_to_writes) {
1057 bool write_found =
false;
1058 MemPacketQueue::iterator to_write;
1067 "Checking WRITE queue [%d] priority [%d elements]\n",
1068 prio, queue->size());
1075 if (to_write != queue->end()) {
1091 auto mem_pkt = *to_write;
1094 assert(mem_pkt->size <= (mem_pkt->isDram() ?
1104 mem_pkt->qosValue(), mem_pkt->getAddr(), 1,
1105 mem_pkt->readyTime - mem_pkt->entryTime);
1109 writeQueue[mem_pkt->qosValue()].erase(to_write);
1119 bool below_threshold =
1164 return std::min(dram_min, nvm_min);
1172 return std::min(dram_min, nvm_min);
1185 :
Stats::Group(&_ctrl),
1192 "Number of controller read bursts, including those serviced by "
1195 "Number of controller write bursts, including those merged in "
1198 "Number of controller read bursts serviced by the write queue"),
1200 "Number of controller write bursts merged with an existing one"),
1203 "Number of requests that are neither read nor write"),
1207 "Average read queue length when enqueuing"),
1210 "Average write queue length when enqueuing"),
1213 "Number of times read queue was full causing retry"),
1215 "Number of times write queue was full causing retry"),
1221 "What read queue length does an incoming req see"),
1223 "What write queue length does an incoming req see"),
1226 "Reads before turning the bus around for writes"),
1228 "Writes before turning the bus around for reads"),
1231 "Total number of bytes read from write queue"),
1233 "Total read bytes from the system interface side"),
1235 "Total written bytes from the system interface side"),
1238 "Average system read bandwidth in Byte/s"),
1240 "Average system write bandwidth in Byte/s"),
1244 "Average gap between requests"),
1247 "Per-requestor bytes read from memory"),
1249 "Per-requestor bytes write to memory"),
1252 "Per-requestor bytes read from memory rate"),
1255 "Per-requestor bytes write to memory rate"),
1257 "Per-requestor read serviced memory accesses"),
1259 "Per-requestor write serviced memory accesses"),
1261 "Per-requestor read total memory access latency"),
1263 "Per-requestor write total memory access latency"),
1266 "Per-requestor read average memory access latency"),
1269 "Per-requestor write average memory access latency")
1277 using namespace Stats;
1279 assert(ctrl.system());
1280 const auto max_requestors = ctrl.system()->maxRequestors();
1282 avgRdQLen.precision(2);
1283 avgWrQLen.precision(2);
1285 readPktSize.init(
ceilLog2(ctrl.system()->cacheLineSize()) + 1);
1286 writePktSize.init(
ceilLog2(ctrl.system()->cacheLineSize()) + 1);
1288 rdQLenPdf.init(ctrl.readBufferSize);
1289 wrQLenPdf.init(ctrl.writeBufferSize);
1292 .init(ctrl.readBufferSize)
1295 .init(ctrl.writeBufferSize)
1298 avgRdBWSys.precision(8);
1299 avgWrBWSys.precision(8);
1300 avgGap.precision(2);
1304 .init(max_requestors)
1308 .init(max_requestors)
1316 requestorReadAccesses
1317 .init(max_requestors)
1320 requestorWriteAccesses
1321 .init(max_requestors)
1324 requestorReadTotalLat
1325 .init(max_requestors)
1336 requestorWriteTotalLat
1337 .init(max_requestors)
1340 requestorWriteAvgLat
1344 for (
int i = 0;
i < max_requestors;
i++) {
1345 const std::string requestor = ctrl.system()->getRequestorName(
i);
1346 requestorReadBytes.subname(
i, requestor);
1347 requestorReadRate.subname(
i, requestor);
1348 requestorWriteBytes.subname(
i, requestor);
1349 requestorWriteRate.subname(
i, requestor);
1350 requestorReadAccesses.subname(
i, requestor);
1351 requestorWriteAccesses.subname(
i, requestor);
1352 requestorReadTotalLat.subname(
i, requestor);
1353 requestorReadAvgLat.subname(
i, requestor);
1354 requestorWriteTotalLat.subname(
i, requestor);
1355 requestorWriteAvgLat.subname(
i, requestor);
1362 avgGap = totGap / (readReqs + writeReqs);
1364 requestorReadRate = requestorReadBytes /
simSeconds;
1365 requestorWriteRate = requestorWriteBytes /
simSeconds;
1366 requestorReadAvgLat = requestorReadTotalLat / requestorReadAccesses;
1367 requestorWriteAvgLat = requestorWriteTotalLat / requestorWriteAccesses;
1380 panic(
"Can't handle address range for packet %s\n",
1388 if (if_name !=
"port") {
1403 return (dram_drained && nvm_drained);
1414 DPRINTF(Drain,
"Memory controller not drained, write: %d, read: %d,"
1462 DPRINTF(DRAM,
"Pushing DRAM ranges to port\n");
1463 ranges.push_back(ctrl.dram->getAddrRange());
1466 DPRINTF(NVM,
"Pushing NVM ranges to port\n");
1467 ranges.push_back(ctrl.nvm->getAddrRange());
1477 if (!queue.trySatisfyFunctional(pkt)) {
1481 ctrl.recvFunctional(pkt);
1490 return ctrl.recvAtomic(pkt);
1497 return ctrl.recvAtomicBackdoor(pkt, backdoor);
1504 return ctrl.recvTimingReq(pkt);
const unsigned int burstCount
Number of bursts requred for a system packet.
const uint8_t rank
Will be populated by address decoder.
#define fatal(...)
This implements a cprintf based fatal() function.
unsigned int burstsServiced
Number of bursts serviced so far for a system packet.
RequestorID requestorId() const
Get the packet RequestorID (interface compatibility with Packet)
void processNextReqEvent()
Bunch of things requires to setup "events" in gem5 When event "respondEvent" occurs for example,...
bool scheduled() const
Determine if the current event is scheduled.
EventFunctionWrapper nextReqEvent
void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
BurstHelper * burstHelper
A pointer to the BurstHelper if this MemPacket is a split packet If not a split packet (common case),...
AddrRange getAddrRange() const
Get the address range.
Stats::Vector writePktSize
Tick minWriteToReadDataGap() const
bool cacheResponding() const
virtual void startup() override
startup() is the final initialization call before simulation.
bool writeQueueFull(unsigned int pkt_count) const
Check if the write queue has room for more entries.
bool isTimingMode() const
Is the system in timing mode?
const uint32_t writeLowThreshold
bool isDram() const
Return true if its a DRAM access.
Stats::Vector requestorWriteBytes
uint8_t schedule(RequestorID id, uint64_t data)
Tick readyTime
When will request leave the controller.
void recordTurnaroundStats()
Record statistics on turnarounds based on busStateNext and busState values.
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
Stats::Scalar bytesReadSys
Stats::Vector requestorReadAccesses
void doBurstAccess(MemPacket *mem_pkt)
Actually do the burst based on media specific access function.
Stats::Scalar writeBursts
std::vector< MemPacketQueue > writeQueue
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
uint8_t numPriorities() const
Gets the total number of priority levels in the QoS memory controller.
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
void respondEvent(uint8_t rank)
Complete response process for DRAM when read burst is complete This will update the counters and chec...
uint64_t Tick
Tick count type.
bool isBusy()
This function checks if ranks are actively refreshing and therefore busy.
void setupRank(const uint8_t rank, const bool is_read) override
Setup the rank based on packet received.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
void pushLabel(const std::string &lbl)
Push label for PrintReq (safe to call unconditionally).
bool contains(const Addr &a) const
Determine if the range contains an address.
RequestorID requestorId() const
std::unordered_set< Addr > isInWriteQueue
To avoid iterating over the write queue to check for overlapping transactions, maintain a set of burs...
virtual void drainResume() override
Resume execution after a successful drain.
Addr burstAlign(Addr addr, bool is_dram) const
Burst-align an address.
Stats::Scalar servicedByWrQ
void schedTimingResp(PacketPtr pkt, Tick when)
Schedule the sending of a timing response.
Stats::Vector readPktSize
void regStats() override
Callback to set stat parameters.
const uint32_t readBufferSize
The following are basic design parameters of the memory controller, and are initialized based on para...
Tick accessLatency() const override
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
void print(std::ostream &o, int verbosity=0, const std::string &prefix="") const
void functionalAccess(PacketPtr pkt)
Perform an untimed memory read or write without changing anything but the memory itself.
std::vector< MemPacketQueue > & selQueue(bool is_read)
Select either the read or write queue.
const Tick entryTime
When did request enter the controller.
@ Drained
Buffers drained, ready for serialization/handover.
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.
bool allIntfDrained() const
Ensure that all interfaced have drained commands.
void setupRank(const uint8_t rank, const bool is_read) override
Setup the rank based on packet received.
Stats::Vector requestorWriteAccesses
DrainState
Object drain/handover states.
bool allRanksDrained() const override
Check drain state of NVM interface.
void logResponse(BusState dir, RequestorID id, uint8_t qos, Addr addr, uint64_t entries, double delay)
Called upon receiving a response, updates statistics and updates queues status.
bool writeRespQueueFull() const
Check if the write response queue has reached defined threshold.
uint64_t totalWriteQueueSize
Total write request packets queue length in #packets.
Stats::Scalar bytesWrittenSys
Stats::Scalar mergedWrBursts
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
uint8_t qosValue() const
QoS Value getter Returns 0 if QoS value was never set (constructor default).
T divCeil(const T &a, const U &b)
void access(PacketPtr pkt)
Perform an untimed memory access and update all the state (e.g.
Tick minReadToWriteDataGap()
Calculate the minimum delay used when scheduling a read-to-write transision.
bool burstReady(MemPacket *pkt) const override
Check if a burst operation can be issued to the DRAM.
Stats::Vector requestorReadTotalLat
Tick minWriteToReadDataGap()
Calculate the minimum delay used when scheduling a write-to-read transision.
void checkRefreshState(uint8_t rank)
Check the refresh state to determine if refresh needs to be kicked back into action after a read resp...
void logRequest(BusState dir, RequestorID id, uint8_t qos, Addr addr, uint64_t entries)
Called upon receiving a request or updates statistics and updates queues status.
BusState busStateNext
bus state for next request event triggered
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.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
const Tick frontendLatency
Pipeline latency of the controller frontend.
bool inWriteBusState(bool next_state) const
Check the current direction of the memory channel.
EventFunctionWrapper respondEvent
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
Enums::MemSched memSchedPolicy
Memory controller configuration initialized based on parameter values.
Tick nextBurstAt
Till when must we wait before issuing next RD/WR burst?
Ports are used to interface objects to each other.
std::pair< Tick, Tick > doBurstAccess(MemPacket *mem_pkt, Tick next_burst_at, const std::vector< MemPacketQueue > &queue)
Actually do the burst - figure out the latency it will take to service the req based on bank state,...
bool needsResponse() const
uint64_t totalReadQueueSize
Total read request packets queue length in #packets.
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
Tick commandOffset() const override
void pruneBurstTick()
Remove commands that have already issued from burstTicks.
unsigned int size
The size of this dram packet in bytes It is always equal or smaller than the burst size.
Stats::Histogram rdPerTurnAround
Tick commandOffset() const override
void signalDrainDone() const
Signal that an object is drained.
void printQs() const
Used for debugging to observe the contents of the queues.
DRAMInterface *const dram
Create pointer to interface of the actual dram media when connected.
void processRespondEvent()
A memory packet stores packets along with the timestamp of when the packet entered the queue,...
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
bool isBusy(bool read_queue_empty, bool all_writes_nvm)
This function checks if ranks are busy.
const uint32_t writeHighThreshold
void startup() override
Iterate through dram ranks and instantiate per rank startup routine.
std::pair< Tick, Tick > doBurstAccess(MemPacket *pkt, Tick next_burst_at)
Actually do the burst and update stats.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
NVMInterface *const nvm
Create pointer to interface of the actual nvm media when connected.
Stats::Formula & simSeconds
bool allRanksDrained() const override
Return true once refresh is complete for all ranks and there are no additional commands enqueued.
const std::string & name()
bool packetReady(MemPacket *pkt)
Determine if there is a packet that can issue.
const FlagsType nozero
Don't print if this is zero.
virtual void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
DrainState drainState() const
Return the current drain state of an object.
bool retryRdReq
Remember if we have to retry a request when available.
const Tick commandWindow
Length of a command window, used to check command bandwidth.
bool isTimingMode
Remember if the memory system is in timing mode.
virtual const std::string name() const
std::deque< MemPacket * > respQueue
Response queue where read packets wait after we're done working with them, but it's not time to send ...
Tick verifySingleCmd(Tick cmd_tick, Tick max_cmds_per_burst)
Check for command bus contention for single cycle command.
const std::unique_ptr< TurnaroundPolicy > turnPolicy
QoS Bus Turnaround Policy: selects the bus direction (READ/WRITE)
#define UNIT_RATE(T1, T2)
const uint32_t writeBufferSize
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
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...
Stats::Scalar bytesReadWrQ
void getBackdoor(MemBackdoorPtr &bd_ptr)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void addToWriteQueue(PacketPtr pkt, unsigned int pkt_count, bool is_dram)
Decode the incoming pkt, create a mem_pkt and push to the back of the write queue.
void accessAndRespond(PacketPtr pkt, Tick static_latency)
When a packet reaches its "readyTime" in the response Q, use the "access()" method in AbstractMemory ...
const PacketPtr pkt
This comes from the outside world.
The memory controller is a single-channel memory controller capturing the most important timing const...
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.
uint32_t bytesPerBurst() const
const uint32_t minWritesPerSwitch
void qosValue(const uint8_t qv)
Set the packet QoS value (interface compatibility with Packet)
bool recvTimingReq(PacketPtr pkt)
void addRankToRankDelay(Tick cmd_at) override
Add rank to rank delay to bus timing to all NVM banks in alli ranks when access to an alternate inter...
MemoryPort port
Our incoming port, for a multi-ported controller add a crossbar in front of it.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Tick minReadToWriteDataGap() const
bool inReadBusState(bool next_state) const
Check the current direction of the memory channel.
void addToReadQueue(PacketPtr pkt, unsigned int pkt_count, bool is_dram)
When a new read comes in, first check if the write q has a pending request to the same address....
std::vector< MemPacketQueue > readQueue
The controller's main read and write queues, with support for QoS reordering.
bool isConnected() const
Is this port currently connected to a peer?
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
std::pair< MemPacketQueue::iterator, Tick > chooseNextFRFCFS(MemPacketQueue &queue, Tick min_col_at) const override
For FR-FCFS policy, find first NVM command that can issue default to first command to prepped region.
Addr addr
The starting address of the packet.
Stats::Vector requestorReadBytes
Stats::Histogram wrPerTurnAround
std::unordered_multiset< Tick > burstTicks
Holds count of commands issued in burst window starting at defined Tick.
System * system() const
read the system pointer
Tick getBurstWindow(Tick cmd_tick)
Calculate burst window aligned tick.
Tick curTick()
The universal simulation clock.
void recvFunctional(PacketPtr pkt)
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
void drainRanks()
Iterate through dram ranks to exit self-refresh in order to drain.
MemPacketQueue::iterator chooseNextFRFCFS(MemPacketQueue &queue, Tick extra_col_delay)
For FR-FCFS policy reorder the read/write queue depending on row buffer hits and earliest bursts avai...
MemoryPort(const std::string &name, MemCtrl &_ctrl)
const Tick backendLatency
Pipeline latency of the backend and PHY.
Stats::Vector requestorWriteTotalLat
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor)
void chooseRead(MemPacketQueue &queue)
Select read command to issue asynchronously.
MemPacketQueue::iterator chooseNext(MemPacketQueue &queue, Tick extra_col_delay)
The memory schduler/arbiter - picks which request needs to go next, based on the specified policy suc...
Tick accessLatency() const override
void sendRangeChange() const
Called by the owner to send a range change.
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...
Tick recvAtomic(PacketPtr pkt)
BusState busState
Bus state used to control the read/write switching and drive the scheduling of the next request.
BusState selectNextBusState()
Returns next bus direction (READ or WRITE) based on configured policy.
MemPacket * decodePacket(const PacketPtr pkt, Addr pkt_addr, unsigned int size, bool is_read, bool is_dram)
Address decoder to figure out physical mapping onto ranks, banks, and rows.
void suspend()
Iterate through DRAM ranks and suspend them.
bool readsWaitingToIssue() const
bool isRead() const
Return true if its a read packet (interface compatibility with Packet)
const FlagsType nonan
Don't print if this is NAN.
bool recvTimingReq(PacketPtr) override
Receive a timing request from the peer.
void popLabel()
Pop label for PrintReq (safe to call unconditionally).
@ Draining
Draining buffers pending serialization/handover.
bool readQueueFull(unsigned int pkt_count) const
Check if the read queue has room for more entries.
Tick nextReqTime
The soonest you have to start thinking about the next request is the longest access time that can occ...
#define panic(...)
This implements a cprintf based panic() function.
bool burstReady(MemPacket *pkt) const override
Check if a burst operation can be issued to the NVM.
MemCtrl(const MemCtrlParams &p)
A burst helper helps organize and manage a packet that is larger than the memory burst size.
Generated on Tue Mar 23 2021 19:41:27 for gem5 by doxygen 1.8.17