Sets m_stage.second to the second parameter of the function.
Then, for every place where advance_stage is called, adds
a cycle to the argument being passed.
m_vcs[vc]->set_enqueue_time(m_router->curCycle());
} else {
- t_flit->advance_stage(SA_, m_router->curCycle());
+ t_flit->advance_stage(SA_, m_router->curCycle() + Cycles(1));
m_router->swarb_req();
}
// write flit into input buffer
{
int outport = routeCompute(t_flit);
in_unit->updateRoute(invc, outport, m_router->curCycle());
- t_flit->advance_stage(VA_, m_router->curCycle());
+ t_flit->advance_stage(VA_, m_router->curCycle() + Cycles(1));
m_router->vcarb_req();
}
// remove flit from Input Unit
flit_d *t_flit = m_input_unit[inport]->getTopFlit(invc);
- t_flit->advance_stage(ST_, m_router->curCycle());
+ t_flit->advance_stage(ST_, m_router->curCycle() + Cycles(1));
t_flit->set_vc(outvc);
t_flit->set_outport(outport);
t_flit->set_time(m_router->curCycle() + Cycles(1));
flit_d *t_flit = m_switch_buffer[inport]->peekTopFlit();
if (t_flit->is_stage(ST_, m_router->curCycle())) {
int outport = t_flit->get_outport();
- t_flit->advance_stage(LT_, m_router->curCycle());
+ t_flit->advance_stage(LT_, m_router->curCycle() + Cycles(1));
t_flit->set_time(m_router->curCycle() + Cycles(1));
// This will take care of waking up the Network Link
m_vc_state.first = ACTIVE_;
m_vc_state.second = curTime + Cycles(1);
flit_d *t_flit = m_input_buffer->peekTopFlit();
- t_flit->advance_stage(SA_, curTime);
+ t_flit->advance_stage(SA_, curTime + Cycles(1));
}
bool
}
void
- advance_stage(flit_stage t_stage, Cycles curTime)
+ advance_stage(flit_stage t_stage, Cycles newTime)
{
m_stage.first = t_stage;
- m_stage.second = curTime + Cycles(1);
+ m_stage.second = newTime;
}
std::pair<flit_stage, Cycles> get_stage() { return m_stage; }