flit.hh (11666:10d59d546ea2) flit.hh (11797:f61fbb7ceb88)
1/*
2 * Copyright (c) 2008 Princeton University
3 * Copyright (c) 2016 Georgia Institute of Technology
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 37 unchanged lines hidden (view full) ---

46 public:
47 flit() {}
48 flit(int id, int vc, int vnet, RouteInfo route, int size,
49 MsgPtr msg_ptr, Cycles curTime);
50
51 int get_outport() {return m_outport; }
52 int get_size() { return m_size; }
53 Cycles get_enqueue_time() { return m_enqueue_time; }
1/*
2 * Copyright (c) 2008 Princeton University
3 * Copyright (c) 2016 Georgia Institute of Technology
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 37 unchanged lines hidden (view full) ---

46 public:
47 flit() {}
48 flit(int id, int vc, int vnet, RouteInfo route, int size,
49 MsgPtr msg_ptr, Cycles curTime);
50
51 int get_outport() {return m_outport; }
52 int get_size() { return m_size; }
53 Cycles get_enqueue_time() { return m_enqueue_time; }
54 Cycles get_dequeue_time() { return m_dequeue_time; }
54 int get_id() { return m_id; }
55 Cycles get_time() { return m_time; }
56 int get_vnet() { return m_vnet; }
57 int get_vc() { return m_vc; }
58 RouteInfo get_route() { return m_route; }
59 MsgPtr& get_msg_ptr() { return m_msg_ptr; }
60 flit_type get_type() { return m_type; }
61 std::pair<flit_stage, Cycles> get_stage() { return m_stage; }
62 Cycles get_src_delay() { return src_delay; }
63
64 void set_outport(int port) { m_outport = port; }
65 void set_time(Cycles time) { m_time = time; }
66 void set_vc(int vc) { m_vc = vc; }
67 void set_route(RouteInfo route) { m_route = route; }
68 void set_src_delay(Cycles delay) { src_delay = delay; }
55 int get_id() { return m_id; }
56 Cycles get_time() { return m_time; }
57 int get_vnet() { return m_vnet; }
58 int get_vc() { return m_vc; }
59 RouteInfo get_route() { return m_route; }
60 MsgPtr& get_msg_ptr() { return m_msg_ptr; }
61 flit_type get_type() { return m_type; }
62 std::pair<flit_stage, Cycles> get_stage() { return m_stage; }
63 Cycles get_src_delay() { return src_delay; }
64
65 void set_outport(int port) { m_outport = port; }
66 void set_time(Cycles time) { m_time = time; }
67 void set_vc(int vc) { m_vc = vc; }
68 void set_route(RouteInfo route) { m_route = route; }
69 void set_src_delay(Cycles delay) { src_delay = delay; }
70 void set_dequeue_time(Cycles time) { m_dequeue_time = time; }
69
70 void increment_hops() { m_route.hops_traversed++; }
71 void print(std::ostream& out) const;
72
73 bool
74 is_stage(flit_stage stage, Cycles time)
75 {
76 return (stage == m_stage.first &&

--- 21 unchanged lines hidden (view full) ---

98 bool functionalWrite(Packet *pkt);
99
100 protected:
101 int m_id;
102 int m_vnet;
103 int m_vc;
104 RouteInfo m_route;
105 int m_size;
71
72 void increment_hops() { m_route.hops_traversed++; }
73 void print(std::ostream& out) const;
74
75 bool
76 is_stage(flit_stage stage, Cycles time)
77 {
78 return (stage == m_stage.first &&

--- 21 unchanged lines hidden (view full) ---

100 bool functionalWrite(Packet *pkt);
101
102 protected:
103 int m_id;
104 int m_vnet;
105 int m_vc;
106 RouteInfo m_route;
107 int m_size;
106 Cycles m_enqueue_time, m_time;
108 Cycles m_enqueue_time, m_dequeue_time, m_time;
107 flit_type m_type;
108 MsgPtr m_msg_ptr;
109 int m_outport;
110 Cycles src_delay;
111 std::pair<flit_stage, Cycles> m_stage;
112};
113
114inline std::ostream&
115operator<<(std::ostream& out, const flit& obj)
116{
117 obj.print(out);
118 out << std::flush;
119 return out;
120}
121
122#endif // __MEM_RUBY_NETWORK_GARNET_FLIT_HH__
109 flit_type m_type;
110 MsgPtr m_msg_ptr;
111 int m_outport;
112 Cycles src_delay;
113 std::pair<flit_stage, Cycles> m_stage;
114};
115
116inline std::ostream&
117operator<<(std::ostream& out, const flit& obj)
118{
119 obj.print(out);
120 out << std::flush;
121 return out;
122}
123
124#endif // __MEM_RUBY_NETWORK_GARNET_FLIT_HH__