write_queue_entry.hh (12823:ba630bc7a36d) | write_queue_entry.hh (13859:4156ac0c7257) |
---|---|
1/* 2 * Copyright (c) 2012-2013, 2015-2016 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 --- 62 unchanged lines hidden (view full) --- 71 /** 72 * Consider the queues friends to avoid making everything public. 73 */ 74 template<typename Entry> 75 friend class Queue; 76 friend class WriteQueue; 77 78 public: | 1/* 2 * Copyright (c) 2012-2013, 2015-2016 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 --- 62 unchanged lines hidden (view full) --- 71 /** 72 * Consider the queues friends to avoid making everything public. 73 */ 74 template<typename Entry> 75 friend class Queue; 76 friend class WriteQueue; 77 78 public: |
79 80 class Target { 81 public: 82 83 const Tick recvTime; //!< Time when request was received (for stats) 84 const Tick readyTime; //!< Time when request is ready to be serviced 85 const Counter order; //!< Global order (for memory consistency mgmt) 86 const PacketPtr pkt; //!< Pending request packet. 87 88 Target(PacketPtr _pkt, Tick _readyTime, Counter _order) 89 : recvTime(curTick()), readyTime(_readyTime), order(_order), 90 pkt(_pkt) 91 {} 92 }; 93 | |
94 class TargetList : public std::list<Target> { 95 96 public: 97 98 TargetList() {} 99 void add(PacketPtr pkt, Tick readyTime, Counter order); 100 bool trySatisfyFunctional(PacketPtr pkt); 101 void print(std::ostream &os, int verbosity, --- 58 unchanged lines hidden (view full) --- 160 * @return true if there are targets 161 */ 162 bool hasTargets() const { return !targets.empty(); } 163 164 /** 165 * Returns a reference to the first target. 166 * @return A pointer to the first target. 167 */ | 79 class TargetList : public std::list<Target> { 80 81 public: 82 83 TargetList() {} 84 void add(PacketPtr pkt, Tick readyTime, Counter order); 85 bool trySatisfyFunctional(PacketPtr pkt); 86 void print(std::ostream &os, int verbosity, --- 58 unchanged lines hidden (view full) --- 145 * @return true if there are targets 146 */ 147 bool hasTargets() const { return !targets.empty(); } 148 149 /** 150 * Returns a reference to the first target. 151 * @return A pointer to the first target. 152 */ |
168 Target *getTarget() | 153 Target *getTarget() override |
169 { 170 assert(hasTargets()); 171 return &targets.front(); 172 } 173 174 /** 175 * Pop first target. 176 */ --- 23 unchanged lines hidden --- | 154 { 155 assert(hasTargets()); 156 return &targets.front(); 157 } 158 159 /** 160 * Pop first target. 161 */ --- 23 unchanged lines hidden --- |