src/mem/ruby/network/garnet/SwitchAllocator.cc
// Wakeup the router next cycle to perform SA again
// if there are flits ready.
Wakeup the router next cycle to perform SA again
if there are flits ready.
Wakeup the router next cycle to perform SA again if there are flits ready .
void
SwitchAllocator::check_for_wakeup()
{
    Tick nextCycle = m_router->clockEdge(Cycles(1));
    if (m_router->alreadyScheduled(nextCycle)) {
        return;
    }
    for (int i = 0; i < m_num_inports; i++) {
        for (int j = 0; j < m_num_vcs; j++) {
            if (m_router->getInputUnit(i)->need_stage(j, SA_, nextCycle)) {
                m_router->schedule_wakeup(Cycles(1));
                return;
            }
        }
    }
}
void SwitchAllocator :: check_for_wakeup ( ) { Tick nextCycle = m_router -> clockEdge ( Cycles ( 1 ) ) ; if ( m_router -> alreadyScheduled ( nextCycle ) ) { return ; } for ( int i = 0 ; i < m_num_inports ; i ++ ) { for ( int j = 0 ; j < m_num_vcs ; j ++ ) { if ( m_router -> getInputUnit ( i ) -> need_stage ( j , SA_ , nextCycle ) ) { m_router -> schedule_wakeup ( Cycles ( 1 ) ) ; return ; } } } }
Wakeup the router next cycle to perform SA again
if there are flits ready.
Wakeup the router next cycle to perform SA again if there are flits ready .