2c2
< * Copyright (c) 2012-2015 ARM Limited
---
> * Copyright (c) 2012-2016 ARM Limited
149a150,164
> * Simple structure to hold the values needed to keep track of
> * commands for DRAMPower
> */
> struct Command {
> Data::MemCommand::cmds type;
> uint8_t bank;
> Tick timeStamp;
>
> constexpr Command(Data::MemCommand::cmds _type, uint8_t _bank,
> Tick time_stamp)
> : type(_type), bank(_bank), timeStamp(time_stamp)
> { }
> };
>
> /**
319a335,342
> * List of comamnds issued, to be sent to DRAMPpower at refresh
> * and stats dump. Keep commands here since commands to different
> * banks are added out of order. Will only pass commands up to
> * curTick() to DRAMPower after sorting.
> */
> std::vector<Command> cmdList;
>
> /**
366a390,397
> /**
> * Push command out of cmdList queue that are scheduled at
> * or before curTick() to DRAMPower library
> * All commands before curTick are guaranteed to be complete
> * and can safely be flushed.
> */
> void flushCmdList();
>
860c891
< * Function for sorting commands in the command list of DRAMPower.
---
> * Function for sorting Command structures based on timeStamp
862,864c893,895
< * @param a Memory Command in command list of DRAMPower library
< * @param next Memory Command in command list of DRAMPower
< * @return true if timestamp of Command 1 < timestamp of Command 2
---
> * @param a Memory Command
> * @param next Memory Command
> * @return true if timeStamp of Command 1 < timeStamp of Command 2
866,868c897,898
< static bool sortTime(const Data::MemCommand& m1,
< const Data::MemCommand& m2) {
< return m1.getTimeInt64() < m2.getTimeInt64();
---
> static bool sortTime(const Command& cmd, const Command& cmd_next) {
> return cmd.timeStamp < cmd_next.timeStamp;
871d900
<