lsq.hh (10239:592f0bb6bd6f) | lsq.hh (10333:6be8945d226b) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2011-2012 ARM Limited | 2 * Copyright (c) 2011-2012, 2014 ARM Limited |
3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating 9 * to a hardware implementation of the functionality of the software 10 * licensed hereunder. You may use the software subject to the license --- 135 unchanged lines hidden (view full) --- 146 bool violation(); 147 /** 148 * Returns whether or not there was a memory ordering violation for a 149 * specific thread. 150 */ 151 bool violation(ThreadID tid) 152 { return thread[tid].violation(); } 153 | 3 * Copyright (c) 2013 Advanced Micro Devices, Inc. 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating 9 * to a hardware implementation of the functionality of the software 10 * licensed hereunder. You may use the software subject to the license --- 135 unchanged lines hidden (view full) --- 146 bool violation(); 147 /** 148 * Returns whether or not there was a memory ordering violation for a 149 * specific thread. 150 */ 151 bool violation(ThreadID tid) 152 { return thread[tid].violation(); } 153 |
154 /** Returns if a load is blocked due to the memory system for a specific 155 * thread. 156 */ 157 bool loadBlocked(ThreadID tid) 158 { return thread[tid].loadBlocked(); } 159 160 bool isLoadBlockedHandled(ThreadID tid) 161 { return thread[tid].isLoadBlockedHandled(); } 162 163 void setLoadBlockedHandled(ThreadID tid) 164 { thread[tid].setLoadBlockedHandled(); } 165 | |
166 /** Gets the instruction that caused the memory ordering violation. */ 167 DynInstPtr getMemDepViolator(ThreadID tid) 168 { return thread[tid].getMemDepViolator(); } 169 170 /** Returns the head index of the load queue for a specific thread. */ 171 int getLoadHead(ThreadID tid) 172 { return thread[tid].getLoadHead(); } 173 --- 98 unchanged lines hidden (view full) --- 272 /** Returns if the LSQ will write back to memory this cycle. */ 273 bool willWB(); 274 /** Returns if the LSQ of a specific thread will write back to memory this 275 * cycle. 276 */ 277 bool willWB(ThreadID tid) 278 { return thread[tid].willWB(); } 279 | 154 /** Gets the instruction that caused the memory ordering violation. */ 155 DynInstPtr getMemDepViolator(ThreadID tid) 156 { return thread[tid].getMemDepViolator(); } 157 158 /** Returns the head index of the load queue for a specific thread. */ 159 int getLoadHead(ThreadID tid) 160 { return thread[tid].getLoadHead(); } 161 --- 98 unchanged lines hidden (view full) --- 260 /** Returns if the LSQ will write back to memory this cycle. */ 261 bool willWB(); 262 /** Returns if the LSQ of a specific thread will write back to memory this 263 * cycle. 264 */ 265 bool willWB(ThreadID tid) 266 { return thread[tid].willWB(); } 267 |
280 /** Returns if the cache is currently blocked. */ 281 bool cacheBlocked() const 282 { return retryTid != InvalidThreadID; } 283 284 /** Sets the retry thread id, indicating that one of the LSQUnits 285 * tried to access the cache but the cache was blocked. */ 286 void setRetryTid(ThreadID tid) 287 { retryTid = tid; } 288 | |
289 /** Debugging function to print out all instructions. */ 290 void dumpInsts() const; 291 /** Debugging function to print out instructions from a specific thread. */ 292 void dumpInsts(ThreadID tid) const 293 { thread[tid].dumpInsts(); } 294 295 /** Executes a read operation, using the load specified at the load 296 * index. --- 46 unchanged lines hidden (view full) --- 343 /** Max LQ Size - Used to Enforce Sharing Policies. */ 344 unsigned maxLQEntries; 345 346 /** Max SQ Size - Used to Enforce Sharing Policies. */ 347 unsigned maxSQEntries; 348 349 /** Number of Threads. */ 350 ThreadID numThreads; | 268 /** Debugging function to print out all instructions. */ 269 void dumpInsts() const; 270 /** Debugging function to print out instructions from a specific thread. */ 271 void dumpInsts(ThreadID tid) const 272 { thread[tid].dumpInsts(); } 273 274 /** Executes a read operation, using the load specified at the load 275 * index. --- 46 unchanged lines hidden (view full) --- 322 /** Max LQ Size - Used to Enforce Sharing Policies. */ 323 unsigned maxLQEntries; 324 325 /** Max SQ Size - Used to Enforce Sharing Policies. */ 326 unsigned maxSQEntries; 327 328 /** Number of Threads. */ 329 ThreadID numThreads; |
351 352 /** The thread id of the LSQ Unit that is currently waiting for a 353 * retry. */ 354 ThreadID retryTid; | |
355}; 356 357template <class Impl> 358Fault 359LSQ<Impl>::read(RequestPtr req, RequestPtr sreqLow, RequestPtr sreqHigh, 360 uint8_t *data, int load_idx) 361{ 362 ThreadID tid = req->threadId(); --- 15 unchanged lines hidden --- | 330}; 331 332template <class Impl> 333Fault 334LSQ<Impl>::read(RequestPtr req, RequestPtr sreqLow, RequestPtr sreqHigh, 335 uint8_t *data, int load_idx) 336{ 337 ThreadID tid = req->threadId(); --- 15 unchanged lines hidden --- |