diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:26:24 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:26:24 -0600 |
commit | 7862478eef88d58d8da3c43663aa39bd4b604fc5 (patch) | |
tree | 09bf37b44cb164d03415e64b4d4c52cbccbd194a /src/mem/ruby/slicc_interface | |
parent | d3aebe1f91aa166329c8ee102fdcb2c9734fdceb (diff) | |
download | gem5-7862478eef88d58d8da3c43663aa39bd4b604fc5.tar.xz |
ruby: replace Time with Cycles in Message class
Concomitant changes are being committed as well, including the io operator<<
for the Cycles class.
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r-- | src/mem/ruby/slicc_interface/Message.hh | 21 | ||||
-rw-r--r-- | src/mem/ruby/slicc_interface/NetworkMessage.hh | 2 | ||||
-rw-r--r-- | src/mem/ruby/slicc_interface/RubyRequest.hh | 4 |
3 files changed, 13 insertions, 14 deletions
diff --git a/src/mem/ruby/slicc_interface/Message.hh b/src/mem/ruby/slicc_interface/Message.hh index 74b405312..c99d66f5c 100644 --- a/src/mem/ruby/slicc_interface/Message.hh +++ b/src/mem/ruby/slicc_interface/Message.hh @@ -32,7 +32,6 @@ #include <iostream> #include "base/refcnt.hh" -#include "mem/ruby/common/TypeDefines.hh" #include "mem/packet.hh" class Message; @@ -41,7 +40,7 @@ typedef RefCountingPtr<Message> MsgPtr; class Message : public RefCounted { public: - Message(Time curTime) + Message(Cycles curTime) : m_time(curTime), m_LastEnqueueTime(curTime), m_DelayedCycles(0) @@ -72,19 +71,19 @@ class Message : public RefCounted virtual bool functionalWrite(Packet *pkt) = 0; //{ fatal("Write functional access not implemented!"); } - void setDelayedCycles(const Time cycles) { m_DelayedCycles = cycles; } - const Time getDelayedCycles() const {return m_DelayedCycles;} + void setDelayedCycles(const Cycles cycles) { m_DelayedCycles = cycles; } + const Cycles getDelayedCycles() const {return m_DelayedCycles;} - void setLastEnqueueTime(const Time& time) { m_LastEnqueueTime = time; } - const Time getLastEnqueueTime() const {return m_LastEnqueueTime;} + void setLastEnqueueTime(const Cycles& time) { m_LastEnqueueTime = time; } + const Cycles getLastEnqueueTime() const {return m_LastEnqueueTime;} - const Time& getTime() const { return m_time; } - void setTime(const Time& new_time) { m_time = new_time; } + const Cycles& getTime() const { return m_time; } + void setTime(const Cycles& new_time) { m_time = new_time; } private: - Time m_time; - Time m_LastEnqueueTime; // my last enqueue time - int m_DelayedCycles; // my delayed cycles + Cycles m_time; + Cycles m_LastEnqueueTime; // my last enqueue time + Cycles m_DelayedCycles; // my delayed cycles }; inline std::ostream& diff --git a/src/mem/ruby/slicc_interface/NetworkMessage.hh b/src/mem/ruby/slicc_interface/NetworkMessage.hh index e26612e0f..4d2968f41 100644 --- a/src/mem/ruby/slicc_interface/NetworkMessage.hh +++ b/src/mem/ruby/slicc_interface/NetworkMessage.hh @@ -42,7 +42,7 @@ typedef RefCountingPtr<NetworkMessage> NetMsgPtr; class NetworkMessage : public Message { public: - NetworkMessage(Time curTime) + NetworkMessage(Cycles curTime) : Message(curTime), m_internal_dest_valid(false) { } diff --git a/src/mem/ruby/slicc_interface/RubyRequest.hh b/src/mem/ruby/slicc_interface/RubyRequest.hh index 37b89dc8f..654656132 100644 --- a/src/mem/ruby/slicc_interface/RubyRequest.hh +++ b/src/mem/ruby/slicc_interface/RubyRequest.hh @@ -51,7 +51,7 @@ class RubyRequest : public Message PacketPtr pkt; unsigned m_contextId; - RubyRequest(Time curTime, uint64_t _paddr, uint8_t* _data, int _len, + RubyRequest(Cycles curTime, uint64_t _paddr, uint8_t* _data, int _len, uint64_t _pc, RubyRequestType _type, RubyAccessMode _access_mode, PacketPtr _pkt, PrefetchBit _pb = PrefetchBit_No, unsigned _proc_id = 100) @@ -70,7 +70,7 @@ class RubyRequest : public Message m_LineAddress.makeLineAddress(); } - RubyRequest(Time curTime) : Message(curTime) + RubyRequest(Cycles curTime) : Message(curTime) { } |