NOC Simulator static VC allocation

Description

Is there a way to implement a static VC allocation in Virtualchannel.cc ?
(I want to test my routing algorithm and vc assignment step)

Activity

Show:
uday mallappa
December 7, 2020, 8:30 PM
Edited

Thank you so much. by default, you have 3 virtual nets (request, forward and response). I see in the stats that the packets are split among these. Is there a way to change this and have just 1 virtual net during my simulation ? Not sure if it makes any sense..

(To just validate my routing algorithms on synthetic traffic, cache protocols do not matter right ? )

srikant.bharadwaj
December 7, 2020, 7:38 PM

There is no restriction on the number of virtual networks supported by Garnet.

For example,

  1. Garnet Standalone uses 3 virtual networks: Line 113 in

  2. GPU_Viper uses 11 virtual networks: Line 802 in

If you are using Garnet Standalone, you can change the virtual networks being used by changing the protocol for Garnet Standalone. For example, virtual network for each message type is defined in Lines 35-40 in

You can also change the vcs_per_vnet by just changing the parameter value in

uday mallappa
December 7, 2020, 7:24 PM

Got it. This is very very helpful. Thank you so much. Also, one last query (deviation). I see that garnet has 3 virtual nets by default, but only one of them gets used during forward process ? I intend to set virtual net as 1, as num_vcs_per_vnet as 4. Is there a way to realize that ?

srikant.bharadwaj
December 7, 2020, 7:18 PM

Garnet already does forward VC allocation.

  1. It allocates the direction(outport) at each router in RoutingUnit::outportCompute

  2. It then arbitrates within the input ports to find an inputVC in a round robin manner SwitchAllocator::arbitrate_inports().
    Only VCs which go to an output port with free VCs are allowed to be selected. This is checked by calling OutputUnit::has_free_vc

  3. Then it arbitrates output ports from the winners of Step2 above. SwitchAllocator::arbitrate_outports()

  4. It then selects an output VC (VC in the next router) by calling
    outvc = vc_allocate(outport, inport, invc);

  5. The vc_allocate function tries to find a free VC in the next router by calling OutputUnit::select_free_vc(int vnet)

  6. The output unit is aware of the free VCs in the next router because of the credit back pressure mechanism.

If you want to implement a custom VC selection mechanism, you need to change has_free_vc and select_free_vc

uday mallappa
December 7, 2020, 7:04 PM

Thanks for your quick response, Srikant.

I am trying to simulate my custom routing algorithm for synthetic traffic. This routng algorithm sets the direction at each router, that the packet needs to flow and the VC allocation of the next hop (to avoid deadlock). With more than 1 virtual channel (say VC = 4), apart from setting the input/output port (in src/mem/ruby/network/garnet2.0/RoutingUnit.cc), I am looking for a way to do a static VC assignment.

Assignee

Unassigned

Reporter

uday mallappa

Components

Priority

High

Fix versions

Labels