mshr_queue.hh (9347:b02075171b57) | mshr_queue.hh (9725:0d4ee33078bb) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2012 ARM Limited | 2 * Copyright (c) 2012-2013 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 --- 47 unchanged lines hidden (view full) --- 58 * A Class for maintaining a list of pending and allocated memory requests. 59 */ 60class MSHRQueue : public Drainable 61{ 62 private: 63 /** Local label (for functional print requests) */ 64 const std::string label; 65 | 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 --- 47 unchanged lines hidden (view full) --- 58 * A Class for maintaining a list of pending and allocated memory requests. 59 */ 60class MSHRQueue : public Drainable 61{ 62 private: 63 /** Local label (for functional print requests) */ 64 const std::string label; 65 |
66 /** MSHR storage. */ 67 MSHR *registers; 68 /** Holds pointers to all allocated entries. */ 69 MSHR::List allocatedList; 70 /** Holds pointers to entries that haven't been sent to the bus. */ 71 MSHR::List readyList; 72 /** Holds non allocated entries. */ 73 MSHR::List freeList; 74 | |
75 // Parameters 76 /** 77 * The total number of entries in this queue. This number is set as the 78 * number of entries requested plus (numReserve - 1). This allows for 79 * the same number of effective entries while still maintaining the reserve. 80 */ 81 const int numEntries; 82 83 /** 84 * The number of entries to hold in reserve. This is needed because copy 85 * operations can allocate upto 4 entries at one time. 86 */ 87 const int numReserve; 88 | 66 // Parameters 67 /** 68 * The total number of entries in this queue. This number is set as the 69 * number of entries requested plus (numReserve - 1). This allows for 70 * the same number of effective entries while still maintaining the reserve. 71 */ 72 const int numEntries; 73 74 /** 75 * The number of entries to hold in reserve. This is needed because copy 76 * operations can allocate upto 4 entries at one time. 77 */ 78 const int numReserve; 79 |
80 /** MSHR storage. */ 81 std::vector<MSHR> registers; 82 /** Holds pointers to all allocated entries. */ 83 MSHR::List allocatedList; 84 /** Holds pointers to entries that haven't been sent to the bus. */ 85 MSHR::List readyList; 86 /** Holds non allocated entries. */ 87 MSHR::List freeList; 88 |
|
89 /** Drain manager to inform of a completed drain */ 90 DrainManager *drainManager; 91 92 MSHR::Iterator addToReadyList(MSHR *mshr); 93 94 95 public: 96 /** The number of allocated entries. */ --- 8 unchanged lines hidden (view full) --- 105 * Create a queue with a given number of entries. 106 * @param num_entrys The number of entries in this queue. 107 * @param reserve The minimum number of entries needed to satisfy 108 * any access. 109 */ 110 MSHRQueue(const std::string &_label, int num_entries, int reserve, 111 int index); 112 | 89 /** Drain manager to inform of a completed drain */ 90 DrainManager *drainManager; 91 92 MSHR::Iterator addToReadyList(MSHR *mshr); 93 94 95 public: 96 /** The number of allocated entries. */ --- 8 unchanged lines hidden (view full) --- 105 * Create a queue with a given number of entries. 106 * @param num_entrys The number of entries in this queue. 107 * @param reserve The minimum number of entries needed to satisfy 108 * any access. 109 */ 110 MSHRQueue(const std::string &_label, int num_entries, int reserve, 111 int index); 112 |
113 /** Destructor */ 114 ~MSHRQueue(); 115 | |
116 /** 117 * Find the first MSHR that matches the provided address. 118 * @param addr The address to find. 119 * @return Pointer to the matching MSHR, null if not found. 120 */ 121 MSHR *findMatch(Addr addr) const; 122 123 /** --- 110 unchanged lines hidden --- | 113 /** 114 * Find the first MSHR that matches the provided address. 115 * @param addr The address to find. 116 * @return Pointer to the matching MSHR, null if not found. 117 */ 118 MSHR *findMatch(Addr addr) const; 119 120 /** --- 110 unchanged lines hidden --- |