Deleted Added
sdiff udiff text old ( 10206:823f7fd1a82f ) new ( 10207:3112b31596f0 )
full compact
1/*
2 * Copyright (c) 2012-2014 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

--- 139 unchanged lines hidden (view full) ---

148 * bank also keeps track of how many bytes have been accessed in
149 * the open row since it was opened.
150 */
151 class Bank
152 {
153
154 public:
155
156 static const uint32_t INVALID_ROW = -1;
157
158 uint32_t openRow;
159
160 Tick freeAt;
161 Tick tRASDoneAt;
162 Tick actAllowedAt;
163
164 uint32_t rowAccesses;
165 uint32_t bytesAccessed;
166
167 Bank() :
168 openRow(INVALID_ROW), freeAt(0), tRASDoneAt(0), actAllowedAt(0),
169 rowAccesses(0), bytesAccessed(0)
170 { }
171 };
172
173 /**
174 * A burst helper helps organize and manage a packet that is larger than
175 * the DRAM burst size. A system packet that is larger than the burst size
176 * is split into multiple DRAM packets and all those DRAM packets point to

--- 207 unchanged lines hidden (view full) ---

384
385 /**
386 * For FR-FCFS policy reorder the read/write queue depending on row buffer
387 * hits and earliest banks available in DRAM
388 */
389 void reorderQueue(std::deque<DRAMPacket*>& queue);
390
391 /**
392 * Looking at all banks, determine the moment in time when they
393 * are all free.
394 *
395 * @return The tick when all banks are free
396 */
397 Tick maxBankFreeAt() const;
398
399 /**
400 * Find which are the earliest available banks for the enqueued
401 * requests. Assumes maximum of 64 banks per DIMM
402 *
403 * @param Queued requests to consider
404 * @return One-hot encoded mask of bank indices
405 */
406 uint64_t minBankFreeAt(const std::deque<DRAMPacket*>& queue) const;
407
408 /**
409 * Keep track of when row activations happen, in order to enforce
410 * the maximum number of activations in the activation window. The
411 * method updates the time that the banks become available based
412 * on the current limits.
413 */
414 void recordActivate(Tick act_tick, uint8_t rank, uint8_t bank);
415
416 void printParams() const;
417
418 /**
419 * Used for debugging to observe the contents of the queues.
420 */
421 void printQs() const;
422
423 /**

--- 94 unchanged lines hidden (view full) ---

518 */
519 const Tick backendLatency;
520
521 /**
522 * Till when has the main data bus been spoken for already?
523 */
524 Tick busBusyUntil;
525
526 Tick prevArrival;
527
528 /**
529 * The soonest you have to start thinking about the next request
530 * is the longest access time that can occur before
531 * busBusyUntil. Assuming you need to precharge, open a new row,
532 * and access, it is tRP + tRCD + tCL.
533 */

--- 58 unchanged lines hidden (view full) ---

592 Stats::Formula writeRowHitRate;
593 Stats::Formula avgGap;
594
595 // DRAM Power Calculation
596 Stats::Formula pageHitRate;
597 Stats::Formula prechargeAllPercent;
598 Stats::Scalar prechargeAllTime;
599
600 // To track number of cycles all the banks are precharged
601 Tick startTickPrechargeAll;
602 // To track number of banks which are currently active
603 unsigned int numBanksActive;
604
605 /** @todo this is a temporary workaround until the 4-phase code is
606 * committed. upstream caches needs this packet until true is returned, so
607 * hold onto it for deletion until a subsequent call
608 */
609 std::vector<PacketPtr> pendingDelete;

--- 24 unchanged lines hidden ---