I checked the problem more detailed.

However, I think the problem is if we fix the VC for any same directional
routing then many packets remains in deadlock.
Hence, the best option is to make sure to fix the VC while we are making
the wrap-around routing and can choose any VC after the wrap around routing
has been completed.

Now, I need to know how can I find the next router ID in RoutingUnit.cc.
Problem is in RoutingUnit.cc only provides the output link number.

So I need to know the Next router ID. Please let me know, if there is any
property or parameter can let me know the next router ID (May not be
destination router ID) which is connected with the output port of the
current router.

Thanks a lot again.

Thanks and best regards,

F.A. Faisal

On Tue, Jul 25, 2017 at 7:30 PM, F. A. Faisal <dipu.7...@gmail.com> wrote:

> Dear Professor,
>
> Thanks for the reply.
>
> If I understand you correctly, I have update the OutputUnit.cc file as
> below-
> However, I am still facing the deadlock issue.
>
> Please let me know if I am missing something or it requires any other file
> to be updated.
>
> // Check if the output port (i.e., input port at next router) has free VCs.
> // invc is the input port vc number, obtained from 
> SwitchAllocator::send_allowed(int
> invc)
> bool
> OutputUnit::has_free_vc(int vnet, int invc)
> {
>     int vc_base = vnet*m_vc_per_vnet;
>     for (int vc = vc_base; vc < vc_base + m_vc_per_vnet; vc++) {
>         if (invc % 2 == 0){  // if invc is even can choose any VC,,,
>                 if (is_vc_idle(vc, m_router->curCycle()))
>                     return true;
>         }else {
>                  if (vc % 2 != 0) { // if invc is odd then choose the odd
> VC only...
>                         if (is_vc_idle(vc, m_router->curCycle()))
>                                 return true;
>                  }
>         }
>     }
>     return false;
> }
>
> // Assign a free output VC to the winner of Switch Allocation
> int
> OutputUnit::select_free_vc(int vnet, int invc)
> {
>     int vc_base = vnet*m_vc_per_vnet;
>     for (int vc = vc_base; vc < vc_base + m_vc_per_vnet; vc++) {
>         if (invc % 2 == 0){
>           if (is_vc_idle(vc, m_router->curCycle())) {
>             m_outvc_state[vc]->setState(ACTIVE_, m_router->curCycle());
>             return vc;
>           }
>         }
>         else{
>          if (vc % 2 != 0) {  // if invc is odd then choose the odd VC
> only...
>           if (is_vc_idle(vc, m_router->curCycle())) {
>             m_outvc_state[vc]->setState(ACTIVE_, m_router->curCycle());
>             return vc;
>           }
>          }
>         }
>     }
>     return -1;
> }
>
> Thanks again.
>
> Best regards,
>
> F. A. Faisal
>
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to