summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface/Message.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-02-20 17:26:41 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2014-02-20 17:26:41 -0600
commitb312a41f21b6f76607fe7480a915a4c5093386a3 (patch)
tree94092e1c3a3123af56a22aa2fd745ab8a66ba00b /src/mem/ruby/slicc_interface/Message.hh
parent0d6009e8dc3ab8419ca7daf9c79c9c987464e3ae (diff)
downloadgem5-b312a41f21b6f76607fe7480a915a4c5093386a3.tar.xz
ruby: message buffer: removes some unecessary functions.
Diffstat (limited to 'src/mem/ruby/slicc_interface/Message.hh')
-rw-r--r--src/mem/ruby/slicc_interface/Message.hh8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mem/ruby/slicc_interface/Message.hh b/src/mem/ruby/slicc_interface/Message.hh
index e78ad9a76..1c842ae69 100644
--- a/src/mem/ruby/slicc_interface/Message.hh
+++ b/src/mem/ruby/slicc_interface/Message.hh
@@ -71,7 +71,13 @@ class Message : public RefCounted
virtual bool functionalWrite(Packet *pkt) = 0;
//{ fatal("Write functional access not implemented!"); }
- void setDelayedTicks(const Tick ticks) { m_DelayedTicks = ticks; }
+ //! Update the delay this message has experienced so far.
+ void updateDelayedTicks(Tick curTime)
+ {
+ assert(m_LastEnqueueTime <= curTime);
+ Tick delta = curTime - m_LastEnqueueTime;
+ m_DelayedTicks += delta;
+ }
const Tick getDelayedTicks() const {return m_DelayedTicks;}
void setLastEnqueueTime(const Tick& time) { m_LastEnqueueTime = time; }