cpu: Add drain check functionality to IEW
IEW did not check the instQueue and memDepUnit to ensure they were drained. This caused issues when drainSanityCheck() did check those structures after asserting IEW was drained.
This commit is contained in:
@@ -440,6 +440,17 @@ InstructionQueue<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
fromCommit = timeBuffer->getWire(-commitToIEWDelay);
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
bool
|
||||
InstructionQueue<Impl>::isDrained() const
|
||||
{
|
||||
bool drained = dependGraph.empty() && instsToExecute.empty();
|
||||
for (ThreadID tid = 0; tid < numThreads; ++tid)
|
||||
drained = drained && memDepUnit[tid].isDrained();
|
||||
|
||||
return drained;
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
InstructionQueue<Impl>::drainSanityCheck() const
|
||||
|
||||
Reference in New Issue
Block a user