src/mem/ruby/network/garnet/SwitchAllocator.cc
// Assign a free VC to the winner of the output port.
Assign a free VC to the winner of the output port.
Assign a free VC to the winner of the output port .
int
SwitchAllocator::vc_allocate(int outport, int inport, int invc)
{
    int outvc =
        m_router->getOutputUnit(outport)->select_free_vc(get_vnet(invc));
    assert(outvc != -1);
    m_router->getInputUnit(inport)->grant_outvc(invc, outvc);
    return outvc;
}
int SwitchAllocator :: vc_allocate ( int outport , int inport , int invc ) { int outvc = m_router -> getOutputUnit ( outport ) -> select_free_vc ( get_vnet ( invc ) ) ; assert ( outvc != -1 ) ; m_router -> getInputUnit ( inport ) -> grant_outvc ( invc , outvc ) ; return outvc ; }
Assign a free VC to the winner of the output port.
Assign a free VC to the winner of the output port .
// Select a free VC from the output port // has to get a valid VC since it checked before performing SA