NetworkInterface::scheduleOutputLink()
{
int vc = m_vc_round_robin;
- m_vc_round_robin++;
- if (m_vc_round_robin == m_num_vcs)
- m_vc_round_robin = 0;
for (int i = 0; i < m_num_vcs; i++) {
vc++;
if (!is_candidate_vc)
continue;
+ m_vc_round_robin = vc;
+
m_out_vc_state[vc]->decrement_credit();
// Just removing the flit
flit *t_flit = m_ni_out_vcs[vc]->getTopFlit();
m_port_requests[outport][inport] = true;
m_vc_winners[outport][inport]= invc;
- // Update Round Robin pointer
- m_round_robin_invc[inport]++;
+ // Update Round Robin pointer to the next VC
+ m_round_robin_invc[inport] = invc + 1;
if (m_round_robin_invc[inport] >= m_num_vcs)
m_round_robin_invc[inport] = 0;
m_port_requests[outport][inport] = false;
// Update Round Robin pointer
- m_round_robin_inport[outport]++;
+ m_round_robin_inport[outport] = inport + 1;
if (m_round_robin_inport[outport] >= m_num_inports)
m_round_robin_inport[outport] = 0;
{
m_input_arbiter_activity = 0;
m_output_arbiter_activity = 0;
-}
\ No newline at end of file
+}