NOC Simulator static VC allocation
Is there a way to implement a static VC allocation in Virtualchannel.cc ?
(I want to test my routing algorithm and vc assignment step)
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 ? )
There is no restriction on the number of virtual networks supported by Garnet.
Garnet Standalone uses 3 virtual networks: Line 113 in
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
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 ?
Garnet already does forward VC allocation.
It allocates the direction(outport) at each router in RoutingUnit::outportCompute
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
Then it arbitrates output ports from the winners of Step2 above. SwitchAllocator::arbitrate_outports()
It then selects an output VC (VC in the next router) by calling
outvc = vc_allocate(outport, inport, invc);
The vc_allocate function tries to find a free VC in the next router by calling OutputUnit::select_free_vc(int vnet)
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
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.