Skip to content

Commit

Permalink
Debug to XY routing, added
Browse files Browse the repository at this point in the history
  • Loading branch information
edualvss committed Dec 1, 2016
1 parent aa2a2fc commit 53ff76d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Routing_XY/Routing_XY.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "Routing_XY.h"

//#define DEBUG_ROUTING

/*!
* \brief Routing_XY::Routing_XY XY routing for Mesh topology constructor
* \param mn Module name
Expand Down Expand Up @@ -61,10 +63,28 @@ void Routing_XY::p_REQUEST() {
} else { // X == Y == 0
v_REQUEST = REQ_L;
}

} else {
v_REQUEST = REQ_NONE;
}

#ifdef DEBUG_ROUTING
std::cout << "\n[Routing_XY]"
<< " Local(" << XID << "," << YID
<< ") - Dest(" << v_XDEST << "," << v_YDEST << ") "
<< ", Req: ";
if(v_REQUEST == REQ_L) {
std::cout << "LOCAL";
} else if(v_REQUEST == REQ_N) {
std::cout << "NORTH";
} else if(v_REQUEST == REQ_E) {
std::cout << "EAST";
} else if(v_REQUEST == REQ_S) {
std::cout << "SOUTH";
} else if(v_REQUEST == REQ_W) {
std::cout << "WEST";
}
#endif
// Outputs
for( unsigned short i = 0; i < numPorts; i++ ) {
o_REQUEST[i].write( v_REQUEST[i] );
Expand Down

0 comments on commit 53ff76d

Please sign in to comment.