Hi,
There is an infinite loop in lsq_impl.hh lines 621, 608 related to the
dynamic thread policy.
Substituting a simple function that counted usage fixed it.
I have added a rudimentary diff here in case someone wants a quick fix.
Best,
Jyothish
diff -r 8c67ac296e75 src/cpu/o3/lsq.hh
--- a/src/cpu/o3/lsq.hh Mon May 09 11:32:11 2016 +0100
+++ b/src/cpu/o3/lsq.hh Sat May 14 10:48:02 2016 +0100
@@ -225,11 +225,13 @@
/** Returns if any of the LQs are full. */
bool lqFull();
+ bool lqDynFull();
/** Returns if the LQ of a given thread is full. */
bool lqFull(ThreadID tid);
/** Returns if any of the SQs are full. */
bool sqFull();
+ bool sqDynFull();
/** Returns if the SQ of a given thread is full. */
bool sqFull(ThreadID tid);
diff -r 8c67ac296e75 src/cpu/o3/lsq_impl.hh
--- a/src/cpu/o3/lsq_impl.hh Mon May 09 11:32:11 2016 +0100
+++ b/src/cpu/o3/lsq_impl.hh Sat May 14 10:48:02 2016 +0100
@@ -590,7 +590,7 @@
//@todo: Change to Calculate All Entries for
//Dynamic Policy
if (lsqPolicy == Dynamic)
- return lqFull();
+ return lqDynFull();
else
return thread[tid].lqFull();
}
@@ -611,17 +611,52 @@
return true;
}
+template<class Impl>
+bool
+LSQ<Impl>::lqDynFull()
+{
+ int nLoads=0;
+ list<ThreadID>::iterator threads = activeThreads->begin();
+ list<ThreadID>::iterator end = activeThreads->end();
+ while (threads != end) {
+ ThreadID tid = *threads++;
+ nLoads+=thread[tid].numLoads();
+ if(nLoads>=SQEntries){
+ return true;
+ }
+ }
+ return false;
+}
+template<class Impl>
+bool
+LSQ<Impl>::sqDynFull()
+{
+ int nStores=0;
+ list<ThreadID>::iterator threads = activeThreads->begin();
+ list<ThreadID>::iterator end = activeThreads->end();
+
+ while (threads != end) {
+ ThreadID tid = *threads++;
+ nStores+=thread[tid].numStores();
+ if(nStores>=SQEntries){
+ return true;
+ }
+ }
+ return false;
+}
template<class Impl>
bool
LSQ<Impl>::sqFull(ThreadID tid)
{
//@todo: Change to Calculate All Entries for
//Dynamic Policy
- if (lsqPolicy == Dynamic)
- return sqFull();
- else
+ if (lsqPolicy == Dynamic){
+ return sqDynFull();
+ }
+ else{
return thread[tid].sqFull();
+ }
}
template<class Impl>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev