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