From cf232de4615f0fe9435d6e92a1d6319c972a8c88 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Mon, 14 Jan 2013 10:04:21 -0600 Subject: Ruby: use ClockedObject in Consumer class Many Ruby structures inherit from the Consumer, which is used for scheduling events. The Consumer used to relay on an Event Manager for scheduling events and on g_system_ptr for time. With this patch, the Consumer will now use a ClockedObject to schedule events and to query for current time. This resulted in several structures being converted from SimObjects to ClockedObjects. Also, the MessageBuffer class now requires a pointer to a ClockedObject so as to query for time. --- src/mem/ruby/slicc_interface/Message.hh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mem/ruby/slicc_interface/Message.hh') diff --git a/src/mem/ruby/slicc_interface/Message.hh b/src/mem/ruby/slicc_interface/Message.hh index 7b94a01e2..201ec4b60 100644 --- a/src/mem/ruby/slicc_interface/Message.hh +++ b/src/mem/ruby/slicc_interface/Message.hh @@ -73,12 +73,11 @@ class Message : public RefCounted virtual bool functionalWrite(Packet *pkt) = 0; //{ fatal("Write functional access not implemented!"); } - void setDelayedCycles(const int& cycles) { m_DelayedCycles = cycles; } - const int& getDelayedCycles() const {return m_DelayedCycles;} - int& getDelayedCycles() {return m_DelayedCycles;} + void setDelayedCycles(const Time cycles) { m_DelayedCycles = cycles; } + const Time getDelayedCycles() const {return m_DelayedCycles;} + void setLastEnqueueTime(const Time& time) { m_LastEnqueueTime = time; } - const Time& getLastEnqueueTime() const {return m_LastEnqueueTime;} - Time& getLastEnqueueTime() {return m_LastEnqueueTime;} + const Time getLastEnqueueTime() const {return m_LastEnqueueTime;} const Time& getTime() const { return m_time; } void setTime(const Time& new_time) { m_time = new_time; } -- cgit v1.2.3