diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:43:09 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:43:09 -0600 |
commit | f6e3ab7bd4d6c27fd400c718bfe225b09a3b486b (patch) | |
tree | 2caf127834234cf6e6bcaef279f179d08ce385da /src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh | |
parent | 9d6d6c67180533464fc839a8a6da182226cb3ee2 (diff) | |
download | gem5-f6e3ab7bd4d6c27fd400c718bfe225b09a3b486b.tar.xz |
ruby: replace Time with Cycles in garnet fixed and flexible
Diffstat (limited to 'src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh')
-rw-r--r-- | src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh index 9dd4af10e..1fda303fa 100644 --- a/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh +++ b/src/mem/ruby/network/garnet/fixed-pipeline/flit_d.hh @@ -34,24 +34,24 @@ #include <cassert> #include <iostream> -#include "mem/ruby/common/TypeDefines.hh" +#include "base/types.hh" #include "mem/ruby/network/garnet/NetworkHeader.hh" #include "mem/ruby/slicc_interface/Message.hh" class flit_d { public: - flit_d(int id, int vc, int vnet, int size, MsgPtr msg_ptr, Time curTime); - flit_d(int vc, bool is_free_signal, Time curTime); + flit_d(int id, int vc, int vnet, int size, MsgPtr msg_ptr, Cycles curTime); + flit_d(int vc, bool is_free_signal, Cycles curTime); void set_outport(int port) { m_outport = port; } int get_outport() {return m_outport; } void print(std::ostream& out) const; bool is_free_signal() { return m_is_free_signal; } int get_size() { return m_size; } - Time get_enqueue_time() { return m_enqueue_time; } + Cycles get_enqueue_time() { return m_enqueue_time; } int get_id() { return m_id; } - Time get_time() { return m_time; } - void set_time(Time time) { m_time = time; } + Cycles get_time() { return m_time; } + void set_time(Cycles time) { m_time = time; } int get_vnet() { return m_vnet; } int get_vc() { return m_vc; } void set_vc(int vc) { m_vc = vc; } @@ -59,43 +59,34 @@ class flit_d flit_type get_type() { return m_type; } bool - is_stage(flit_stage t_stage, Time curTime) + is_stage(flit_stage t_stage, Cycles curTime) { return (m_stage.first == t_stage && curTime >= m_stage.second); } bool - is_next_stage(flit_stage t_stage, Time curTime) + is_next_stage(flit_stage t_stage, Cycles curTime) { return (m_stage.first == t_stage && (curTime + 1) >= m_stage.second); } void - advance_stage(flit_stage t_stage, Time curTime) + advance_stage(flit_stage t_stage, Cycles curTime) { m_stage.first = t_stage; - m_stage.second = curTime + 1; + m_stage.second = curTime + Cycles(1); } - std::pair<flit_stage, Time> + std::pair<flit_stage, Cycles> get_stage() { return m_stage; } - void - set_delay(int delay) - { - src_delay = delay; - } - - int - get_delay() - { - return src_delay; - } + void set_delay(Cycles delay) { src_delay = delay; } + Cycles get_delay() { return src_delay; } static bool greater(flit_d* n1, flit_d* n2) @@ -114,12 +105,12 @@ class flit_d int m_vc; int m_size; bool m_is_free_signal; - Time m_enqueue_time, m_time; + Cycles m_enqueue_time, m_time; flit_type m_type; MsgPtr m_msg_ptr; int m_outport; - int src_delay; - std::pair<flit_stage, Time> m_stage; + Cycles src_delay; + std::pair<flit_stage, Cycles> m_stage; }; inline std::ostream& |