src/mem/ruby/network/garnet/NetworkInterface.cc
// Looking for a free output vc
Looking for a free output vc
Looking for a free output vc
int
NetworkInterface::calculateVC(int vnet)
{
    for (int i = 0; i < m_vc_per_vnet; i++) {
        int delta = m_vc_allocator[vnet];
        m_vc_allocator[vnet]++;
        if (m_vc_allocator[vnet] == m_vc_per_vnet)
            m_vc_allocator[vnet] = 0;
        if (outVcState[(vnet*m_vc_per_vnet) + delta].isInState(
                    IDLE_, curTick())) {
            vc_busy_counter[vnet] = 0;
            return ((vnet*m_vc_per_vnet) + delta);
        }
    }
    vc_busy_counter[vnet] += 1;
    panic_if(vc_busy_counter[vnet] > m_deadlock_threshold,
        "%s: Possible network deadlock in vnet: %d at time: %llu \n",
        name(), vnet, curTick());
    return -1;
}
int NetworkInterface :: calculateVC ( int vnet ) { for ( int i = 0 ; i < m_vc_per_vnet ; i ++ ) { int delta = m_vc_allocator [ vnet ] ; m_vc_allocator [ vnet ] ++ ; if ( m_vc_allocator [ vnet ] == m_vc_per_vnet ) m_vc_allocator [ vnet ] = 0 ; if ( outVcState [ ( vnet * m_vc_per_vnet ) + delta ] . isInState ( IDLE_ , curTick ( ) ) ) { vc_busy_counter [ vnet ] = 0 ; return ( ( vnet * m_vc_per_vnet ) + delta ) ; } } vc_busy_counter [ vnet ] += 1 ; panic_if ( vc_busy_counter [ vnet ] > m_deadlock_threshold , " \n " , name ( ) , vnet , curTick ( ) ) ; return -1 ; }
Looking for a free output vc
Looking for a free output vc