lsq_impl.hh (9944:4ff1c5c6dcbc) lsq_impl.hh (10239:592f0bb6bd6f)
1/*
2 * Copyright (c) 2011-2012 ARM Limited
1/*
2 * Copyright (c) 2011-2012 ARM Limited
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
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

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

428 total += thread[tid].numStores();
429 }
430
431 return total;
432}
433
434template<class Impl>
435unsigned
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
11 * terms below provided that you ensure that this notice is replicated

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

429 total += thread[tid].numStores();
430 }
431
432 return total;
433}
434
435template<class Impl>
436unsigned
436LSQ::numFreeEntries()
437LSQ<Impl>::numFreeLoadEntries()
437{
438 unsigned total = 0;
439
440 list<ThreadID>::iterator threads = activeThreads->begin();
441 list<ThreadID>::iterator end = activeThreads->end();
442
443 while (threads != end) {
444 ThreadID tid = *threads++;
445
438{
439 unsigned total = 0;
440
441 list<ThreadID>::iterator threads = activeThreads->begin();
442 list<ThreadID>::iterator end = activeThreads->end();
443
444 while (threads != end) {
445 ThreadID tid = *threads++;
446
446 total += thread[tid].numFreeEntries();
447 total += thread[tid].numFreeLoadEntries();
447 }
448
449 return total;
450}
451
452template<class Impl>
453unsigned
448 }
449
450 return total;
451}
452
453template<class Impl>
454unsigned
454LSQ<Impl>::numFreeEntries(ThreadID tid)
455LSQ<Impl>::numFreeStoreEntries()
455{
456{
456 //if (lsqPolicy == Dynamic)
457 //return numFreeEntries();
458 //else
459 return thread[tid].numFreeEntries();
457 unsigned total = 0;
458
459 list<ThreadID>::iterator threads = activeThreads->begin();
460 list<ThreadID>::iterator end = activeThreads->end();
461
462 while (threads != end) {
463 ThreadID tid = *threads++;
464
465 total += thread[tid].numFreeStoreEntries();
466 }
467
468 return total;
460}
461
462template<class Impl>
469}
470
471template<class Impl>
472unsigned
473LSQ<Impl>::numFreeLoadEntries(ThreadID tid)
474{
475 return thread[tid].numFreeLoadEntries();
476}
477
478template<class Impl>
479unsigned
480LSQ<Impl>::numFreeStoreEntries(ThreadID tid)
481{
482 return thread[tid].numFreeStoreEntries();
483}
484
485template<class Impl>
463bool
464LSQ<Impl>::isFull()
465{
466 list<ThreadID>::iterator threads = activeThreads->begin();
467 list<ThreadID>::iterator end = activeThreads->end();
468
469 while (threads != end) {
470 ThreadID tid = *threads++;

--- 195 unchanged lines hidden ---
486bool
487LSQ<Impl>::isFull()
488{
489 list<ThreadID>::iterator threads = activeThreads->begin();
490 list<ThreadID>::iterator end = activeThreads->end();
491
492 while (threads != end) {
493 ThreadID tid = *threads++;

--- 195 unchanged lines hidden ---