Deleted Added
sdiff udiff text old ( 3968:0a08763926a1 ) new ( 3970:d54945bab95d )
full compact
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

722 return ret_val;
723}
724
725template<class Impl>
726typename DefaultFetch<Impl>::FetchStatus
727DefaultFetch<Impl>::updateFetchStatus()
728{
729 //Check Running
730 std::list<unsigned>::iterator threads = (*activeThreads).begin();
731
732 while (threads != (*activeThreads).end()) {
733
734 unsigned tid = *threads++;
735
736 if (fetchStatus[tid] == Running ||
737 fetchStatus[tid] == Squashing ||
738 fetchStatus[tid] == IcacheAccessComplete) {
739
740 if (_status == Inactive) {
741 DPRINTF(Activity, "[tid:%i]: Activating stage.\n",tid);

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

780 cpu->removeInstsNotInROB(tid, true, 0);
781#endif
782}
783
784template <class Impl>
785void
786DefaultFetch<Impl>::tick()
787{
788 std::list<unsigned>::iterator threads = (*activeThreads).begin();
789 bool status_change = false;
790
791 wroteToTimeBuffer = false;
792
793 while (threads != (*activeThreads).end()) {
794 unsigned tid = *threads++;
795
796 // Check the signals for each thread to determine the proper status
797 // for each thread.
798 bool updated_status = checkSignalsAndUpdate(tid);
799 status_change = status_change || updated_status;
800 }
801

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

1308
1309 case Branch:
1310 return branchCount();
1311
1312 default:
1313 return -1;
1314 }
1315 } else {
1316 int tid = *((*activeThreads).begin());
1317
1318 if (fetchStatus[tid] == Running ||
1319 fetchStatus[tid] == IcacheAccessComplete ||
1320 fetchStatus[tid] == Idle) {
1321 return tid;
1322 } else {
1323 return -1;
1324 }

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

1358}
1359
1360template<class Impl>
1361int
1362DefaultFetch<Impl>::iqCount()
1363{
1364 std::priority_queue<unsigned> PQ;
1365
1366 std::list<unsigned>::iterator threads = (*activeThreads).begin();
1367
1368 while (threads != (*activeThreads).end()) {
1369 unsigned tid = *threads++;
1370
1371 PQ.push(fromIEW->iewInfo[tid].iqCount);
1372 }
1373
1374 while (!PQ.empty()) {
1375
1376 unsigned high_pri = PQ.top();

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

1388}
1389
1390template<class Impl>
1391int
1392DefaultFetch<Impl>::lsqCount()
1393{
1394 std::priority_queue<unsigned> PQ;
1395
1396
1397 std::list<unsigned>::iterator threads = (*activeThreads).begin();
1398
1399 while (threads != (*activeThreads).end()) {
1400 unsigned tid = *threads++;
1401
1402 PQ.push(fromIEW->iewInfo[tid].ldstqCount);
1403 }
1404
1405 while (!PQ.empty()) {
1406
1407 unsigned high_pri = PQ.top();

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

1417
1418 return -1;
1419}
1420
1421template<class Impl>
1422int
1423DefaultFetch<Impl>::branchCount()
1424{
1425 std::list<unsigned>::iterator threads = (*activeThreads).begin();
1426 panic("Branch Count Fetch policy unimplemented\n");
1427 return *threads;
1428}