mem-ruby: add function to check for stalled msgs of addr
This patch allows a cache controller to check if there is any stalled message of a specific address in the stall_map of an input message buffer. Change-Id: Id2f9bb98a9201a562f2a8cc371e9bb896ac836af Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28133 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Anthony Gutierrez
parent
524c22041d
commit
e071f60011
@@ -394,6 +394,12 @@ MessageBuffer::stallMessage(Addr addr, Tick current_time)
|
||||
m_stall_count++;
|
||||
}
|
||||
|
||||
bool
|
||||
MessageBuffer::hasStalledMsg(Addr addr) const
|
||||
{
|
||||
return (m_stall_msg_map.count(addr) != 0);
|
||||
}
|
||||
|
||||
void
|
||||
MessageBuffer::deferEnqueueingMessage(Addr addr, MsgPtr message)
|
||||
{
|
||||
|
||||
@@ -74,6 +74,8 @@ class MessageBuffer : public SimObject
|
||||
void reanalyzeMessages(Addr addr, Tick current_time);
|
||||
void reanalyzeAllMessages(Tick current_time);
|
||||
void stallMessage(Addr addr, Tick current_time);
|
||||
// return true if the stall map has a message of this address
|
||||
bool hasStalledMsg(Addr addr) const;
|
||||
|
||||
// TRUE if head of queue timestamp <= SystemTime
|
||||
bool isReady(Tick current_time) const;
|
||||
@@ -124,7 +126,6 @@ class MessageBuffer : public SimObject
|
||||
// enqueue all previously deferred messages that are associated with the
|
||||
// input address
|
||||
void enqueueDeferredMessages(Addr addr, Tick curTime, Tick delay);
|
||||
|
||||
bool isDeferredMsgMapEmpty(Addr addr) const;
|
||||
|
||||
//! Updates the delay cycles of the message at the head of the queue,
|
||||
|
||||
@@ -63,6 +63,7 @@ structure(InPort, external = "yes", primitive="yes") {
|
||||
bool isEmpty();
|
||||
bool isStallMapEmpty();
|
||||
int getStallMapSize();
|
||||
bool hasStalledMsg(Addr addr);
|
||||
}
|
||||
|
||||
external_type(NodeID, default="0", primitive="yes");
|
||||
|
||||
Reference in New Issue
Block a user