Deleted Added
sdiff udiff text old ( 11673:9f3ccf96bb5a ) new ( 11675:60d18201148d )
full compact
1/*
2 * Copyright (c) 2012-2015 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

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

142 READ_TO_WRITE,
143 WRITE,
144 WRITE_TO_READ
145 };
146
147 BusState busState;
148
149 /**
150 * A basic class to track the bank state, i.e. what row is
151 * currently open (if any), when is the bank free to accept a new
152 * column (read/write) command, when can it be precharged, and
153 * when can it be activated.
154 *
155 * The bank also keeps track of how many bytes have been accessed
156 * in the open row since it was opened.
157 */

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

312 uint8_t rank;
313
314 /**
315 * One DRAMPower instance per rank
316 */
317 DRAMPower power;
318
319 /**
320 * Vector of Banks. Each rank is made of several devices which in
321 * term are made from several banks.
322 */
323 std::vector<Bank> banks;
324
325 /**
326 * To track number of banks which are currently active for
327 * this rank.

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

359 bool isAvailable() const { return refreshState == REF_IDLE; }
360
361 /**
362 * Let the rank check if it was waiting for requests to drain
363 * to allow it to transition states.
364 */
365 void checkDrainDone();
366
367 /*
368 * Function to register Stats
369 */
370 void regStats();
371
372 void processActivateEvent();
373 EventWrapper<Rank, &Rank::processActivateEvent>
374 activateEvent;

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

852 * result of the energy values coming from DRAMPower, and there
853 * is currently no support for resetting the state.
854 *
855 * @param rank Currrent rank
856 */
857 void updatePowerStats(Rank& rank_ref);
858
859 /**
860 * Function for sorting commands in the command list of DRAMPower.
861 *
862 * @param a Memory Command in command list of DRAMPower library
863 * @param next Memory Command in command list of DRAMPower
864 * @return true if timestamp of Command 1 < timestamp of Command 2
865 */
866 static bool sortTime(const Data::MemCommand& m1,
867 const Data::MemCommand& m2) {
868 return m1.getTimeInt64() < m2.getTimeInt64();
869 };
870
871
872 public:
873
874 void regStats() override;
875
876 DRAMCtrl(const DRAMCtrlParams* p);
877
878 DrainState drain() override;
879

--- 16 unchanged lines hidden ---