Assert that an mshr has a target in getTarget().
--HG-- extra : convert_revision : 08091670fc319876012ed139fcd2584c364a980c
This commit is contained in:
14
src/mem/cache/miss/mshr.hh
vendored
14
src/mem/cache/miss/mshr.hh
vendored
@@ -181,11 +181,17 @@ public:
|
||||
*/
|
||||
TargetList* getTargetList() { return &targets; }
|
||||
|
||||
/**
|
||||
* Returns true if there are targets left.
|
||||
* @return true if there are targets
|
||||
*/
|
||||
bool hasTargets() { return !targets.empty(); }
|
||||
|
||||
/**
|
||||
* Returns a reference to the first target.
|
||||
* @return A pointer to the first target.
|
||||
*/
|
||||
Target *getTarget() { return &targets.front(); }
|
||||
Target *getTarget() { assert(hasTargets()); return &targets.front(); }
|
||||
|
||||
/**
|
||||
* Pop first target.
|
||||
@@ -196,12 +202,6 @@ public:
|
||||
targets.pop_front();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if there are targets left.
|
||||
* @return true if there are targets
|
||||
*/
|
||||
bool hasTargets() { return !targets.empty(); }
|
||||
|
||||
bool isSimpleForward()
|
||||
{
|
||||
if (getNumTargets() != 1)
|
||||
|
||||
Reference in New Issue
Block a user