Minor fix for SMT Hello Worlds to finish correctly.
Still, there is a problem with the LSQ and indexing out of range in the buffer. I havent nailed down the fix yet, but it's coming ... src/cpu/o3/commit_impl.hh: add space to DPRINT src/cpu/o3/cpu.cc: add newline to DPRINT src/cpu/o3/rob.hh: src/cpu/o3/rob_impl.hh: Each thread needs it's own squashedSeqNum for the case where they are both squashing at the same time and they dont write over each other's squash number. --HG-- extra : convert_revision : 2155421a8b5b20e4544eea3d3c53d3e715465fa6
This commit is contained in:
parent
161e8bf874
commit
74d4d67138
4 changed files with 11 additions and 9 deletions
|
@ -585,7 +585,7 @@ DefaultCommit<Impl>::tick()
|
||||||
commitStatus[tid] = Running;
|
commitStatus[tid] = Running;
|
||||||
} else {
|
} else {
|
||||||
DPRINTF(Commit,"[tid:%u]: Still Squashing, cannot commit any"
|
DPRINTF(Commit,"[tid:%u]: Still Squashing, cannot commit any"
|
||||||
"insts this cycle.\n", tid);
|
" insts this cycle.\n", tid);
|
||||||
rob->doSquash(tid);
|
rob->doSquash(tid);
|
||||||
toIEW->commitInfo[tid].robSquashing = true;
|
toIEW->commitInfo[tid].robSquashing = true;
|
||||||
wroteToTimeBuffer = true;
|
wroteToTimeBuffer = true;
|
||||||
|
|
|
@ -653,7 +653,7 @@ template <class Impl>
|
||||||
void
|
void
|
||||||
FullO3CPU<Impl>::removeThread(unsigned tid)
|
FullO3CPU<Impl>::removeThread(unsigned tid)
|
||||||
{
|
{
|
||||||
DPRINTF(O3CPU,"[tid:%i] Removing thread context from CPU.");
|
DPRINTF(O3CPU,"[tid:%i] Removing thread context from CPU.\n", tid);
|
||||||
|
|
||||||
// Copy Thread Data From RegFile
|
// Copy Thread Data From RegFile
|
||||||
// If thread is suspended, it might be re-allocated
|
// If thread is suspended, it might be re-allocated
|
||||||
|
|
|
@ -308,7 +308,7 @@ class ROB
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** The sequence number of the squashed instruction. */
|
/** The sequence number of the squashed instruction. */
|
||||||
InstSeqNum squashedSeqNum;
|
InstSeqNum squashedSeqNum[Impl::MaxThreads];
|
||||||
|
|
||||||
/** Is the ROB done squashing. */
|
/** Is the ROB done squashing. */
|
||||||
bool doneSquashing[Impl::MaxThreads];
|
bool doneSquashing[Impl::MaxThreads];
|
||||||
|
|
|
@ -41,10 +41,10 @@ ROB<Impl>::ROB(unsigned _numEntries, unsigned _squashWidth,
|
||||||
: numEntries(_numEntries),
|
: numEntries(_numEntries),
|
||||||
squashWidth(_squashWidth),
|
squashWidth(_squashWidth),
|
||||||
numInstsInROB(0),
|
numInstsInROB(0),
|
||||||
squashedSeqNum(0),
|
|
||||||
numThreads(_numThreads)
|
numThreads(_numThreads)
|
||||||
{
|
{
|
||||||
for (int tid=0; tid < numThreads; tid++) {
|
for (int tid=0; tid < numThreads; tid++) {
|
||||||
|
squashedSeqNum[tid] = 0;
|
||||||
doneSquashing[tid] = true;
|
doneSquashing[tid] = true;
|
||||||
threadEntries[tid] = 0;
|
threadEntries[tid] = 0;
|
||||||
}
|
}
|
||||||
|
@ -352,11 +352,11 @@ void
|
||||||
ROB<Impl>::doSquash(unsigned tid)
|
ROB<Impl>::doSquash(unsigned tid)
|
||||||
{
|
{
|
||||||
DPRINTF(ROB, "[tid:%u]: Squashing instructions until [sn:%i].\n",
|
DPRINTF(ROB, "[tid:%u]: Squashing instructions until [sn:%i].\n",
|
||||||
tid, squashedSeqNum);
|
tid, squashedSeqNum[tid]);
|
||||||
|
|
||||||
assert(squashIt[tid] != instList[tid].end());
|
assert(squashIt[tid] != instList[tid].end());
|
||||||
|
|
||||||
if ((*squashIt[tid])->seqNum < squashedSeqNum) {
|
if ((*squashIt[tid])->seqNum < squashedSeqNum[tid]) {
|
||||||
DPRINTF(ROB, "[tid:%u]: Done squashing instructions.\n",
|
DPRINTF(ROB, "[tid:%u]: Done squashing instructions.\n",
|
||||||
tid);
|
tid);
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ ROB<Impl>::doSquash(unsigned tid)
|
||||||
for (int numSquashed = 0;
|
for (int numSquashed = 0;
|
||||||
numSquashed < squashWidth &&
|
numSquashed < squashWidth &&
|
||||||
squashIt[tid] != instList[tid].end() &&
|
squashIt[tid] != instList[tid].end() &&
|
||||||
(*squashIt[tid])->seqNum > squashedSeqNum;
|
(*squashIt[tid])->seqNum > squashedSeqNum[tid];
|
||||||
++numSquashed)
|
++numSquashed)
|
||||||
{
|
{
|
||||||
DPRINTF(ROB, "[tid:%u]: Squashing instruction PC %#x, seq num %i.\n",
|
DPRINTF(ROB, "[tid:%u]: Squashing instruction PC %#x, seq num %i.\n",
|
||||||
|
@ -408,7 +408,7 @@ ROB<Impl>::doSquash(unsigned tid)
|
||||||
|
|
||||||
|
|
||||||
// Check if ROB is done squashing.
|
// Check if ROB is done squashing.
|
||||||
if ((*squashIt[tid])->seqNum <= squashedSeqNum) {
|
if ((*squashIt[tid])->seqNum <= squashedSeqNum[tid]) {
|
||||||
DPRINTF(ROB, "[tid:%u]: Done squashing instructions.\n",
|
DPRINTF(ROB, "[tid:%u]: Done squashing instructions.\n",
|
||||||
tid);
|
tid);
|
||||||
|
|
||||||
|
@ -520,7 +520,7 @@ ROB<Impl>::squash(InstSeqNum squash_num,unsigned tid)
|
||||||
|
|
||||||
doneSquashing[tid] = false;
|
doneSquashing[tid] = false;
|
||||||
|
|
||||||
squashedSeqNum = squash_num;
|
squashedSeqNum[tid] = squash_num;
|
||||||
|
|
||||||
if (!instList[tid].empty()) {
|
if (!instList[tid].empty()) {
|
||||||
InstIt tail_thread = instList[tid].end();
|
InstIt tail_thread = instList[tid].end();
|
||||||
|
@ -544,6 +544,7 @@ ROB<Impl>::readHeadInst()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
typename Impl::DynInstPtr
|
typename Impl::DynInstPtr
|
||||||
ROB<Impl>::readHeadInst(unsigned tid)
|
ROB<Impl>::readHeadInst(unsigned tid)
|
||||||
|
@ -558,6 +559,7 @@ ROB<Impl>::readHeadInst(unsigned tid)
|
||||||
return dummyInst;
|
return dummyInst;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
uint64_t
|
uint64_t
|
||||||
|
|
Loading…
Reference in a new issue