NetworkInterface.hh (11666:10d59d546ea2) NetworkInterface.hh (11762:29d401db3746)
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

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

78 const NodeID m_id;
79 const int m_virtual_networks, m_vc_per_vnet, m_num_vcs;
80 int m_router_id; // id of my router
81 std::vector<OutVcState *> m_out_vc_state;
82 std::vector<int> m_vc_allocator;
83 int m_vc_round_robin; // For round robin scheduling
84 flitBuffer *outFlitQueue; // For modeling link contention
85 flitBuffer *outCreditQueue;
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

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

78 const NodeID m_id;
79 const int m_virtual_networks, m_vc_per_vnet, m_num_vcs;
80 int m_router_id; // id of my router
81 std::vector<OutVcState *> m_out_vc_state;
82 std::vector<int> m_vc_allocator;
83 int m_vc_round_robin; // For round robin scheduling
84 flitBuffer *outFlitQueue; // For modeling link contention
85 flitBuffer *outCreditQueue;
86 int m_deadlock_threshold;
86
87 NetworkLink *inNetLink;
88 NetworkLink *outNetLink;
89 CreditLink *inCreditLink;
90 CreditLink *outCreditLink;
91
92 // Input Flit Buffers
93 // The flit buffers which will serve the Consumer
94 std::vector<flitBuffer *> m_ni_out_vcs;
95 std::vector<Cycles> m_ni_out_vcs_enqueue_time;
96
97 // The Message buffers that takes messages from the protocol
98 std::vector<MessageBuffer *> inNode_ptr;
99 // The Message buffers that provides messages to the protocol
100 std::vector<MessageBuffer *> outNode_ptr;
87
88 NetworkLink *inNetLink;
89 NetworkLink *outNetLink;
90 CreditLink *inCreditLink;
91 CreditLink *outCreditLink;
92
93 // Input Flit Buffers
94 // The flit buffers which will serve the Consumer
95 std::vector<flitBuffer *> m_ni_out_vcs;
96 std::vector<Cycles> m_ni_out_vcs_enqueue_time;
97
98 // The Message buffers that takes messages from the protocol
99 std::vector<MessageBuffer *> inNode_ptr;
100 // The Message buffers that provides messages to the protocol
101 std::vector<MessageBuffer *> outNode_ptr;
102 // When a vc stays busy for a long time, it indicates a deadlock
103 std::vector<int> vc_busy_counter;
101
102 bool flitisizeMessage(MsgPtr msg_ptr, int vnet);
103 int calculateVC(int vnet);
104 void scheduleOutputLink();
105 void checkReschedule();
106};
107
108#endif // __MEM_RUBY_NETWORK_GARNET_NETWORK_INTERFACE_HH__
104
105 bool flitisizeMessage(MsgPtr msg_ptr, int vnet);
106 int calculateVC(int vnet);
107 void scheduleOutputLink();
108 void checkReschedule();
109};
110
111#endif // __MEM_RUBY_NETWORK_GARNET_NETWORK_INTERFACE_HH__