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 | d3aebe1f91aa166329c8ee102fdcb2c9734fdceb (patch) | |
tree | f6f7807c24eccde98ee1e4bfe4c9c24b3c9392b2 /src/mem/ruby/buffers/MessageBuffer.hh | |
parent | affd77ea77860fa9231aba8e43ad95dea06a114a (diff) | |
download | gem5-d3aebe1f91aa166329c8ee102fdcb2c9734fdceb.tar.xz |
ruby: replaces Time with Cycles in many places
The patch started of with replacing Time with Cycles in the Consumer class.
But to get ruby to compile, the rest of the changes had to be carried out.
Subsequent patches will further this process, till we completely replace
Time with Cycles.
Diffstat (limited to 'src/mem/ruby/buffers/MessageBuffer.hh')
-rw-r--r-- | src/mem/ruby/buffers/MessageBuffer.hh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mem/ruby/buffers/MessageBuffer.hh b/src/mem/ruby/buffers/MessageBuffer.hh index 581f03453..5bad45f2d 100644 --- a/src/mem/ruby/buffers/MessageBuffer.hh +++ b/src/mem/ruby/buffers/MessageBuffer.hh @@ -54,11 +54,8 @@ class MessageBuffer std::string name() const { return m_name; } - void - setRecycleLatency(int recycle_latency) - { - m_recycle_latency = recycle_latency; - } + void setRecycleLatency(Cycles recycle_latency) + { m_recycle_latency = recycle_latency; } void reanalyzeMessages(const Address& addr); void reanalyzeAllMessages(); @@ -74,7 +71,7 @@ class MessageBuffer std::pop_heap(m_prio_heap.begin(), m_prio_heap.end(), std::greater<MessageBufferNode>()); m_prio_heap.pop_back(); - enqueue(node.m_msgptr, 1); + enqueue(node.m_msgptr, Cycles(1)); } bool areNSlotsAvailable(int n); @@ -114,8 +111,8 @@ class MessageBuffer return m_prio_heap.front().m_msgptr; } - void enqueue(MsgPtr message) { enqueue(message, 1); } - void enqueue(MsgPtr message, Time delta); + void enqueue(MsgPtr message) { enqueue(message, Cycles(1)); } + void enqueue(MsgPtr message, Cycles delta); //! returns delay ticks of the message. Time dequeue_getDelayCycles(MsgPtr& message); @@ -160,7 +157,7 @@ class MessageBuffer private: //added by SS - int m_recycle_latency; + Cycles m_recycle_latency; // Private Methods Time setAndReturnDelayCycles(MsgPtr message); @@ -204,7 +201,8 @@ class MessageBuffer bool m_strict_fifo; bool m_ordering_set; bool m_randomization; - Time m_last_arrival_time; + + Cycles m_last_arrival_time; int m_input_link_id; int m_vnet_id; |