Index: trunk/platforms/tsar_generic_xbar/top.cpp
===================================================================
--- trunk/platforms/tsar_generic_xbar/top.cpp	(revision 836)
+++ trunk/platforms/tsar_generic_xbar/top.cpp	(revision 885)
@@ -654,32 +654,81 @@
 
    // Horizontal inter-clusters DSPIN signals
-   DspinSignals<dspin_cmd_width>*** signal_dspin_h_cmd_inc =
-      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_inc", X_SIZE-1, Y_SIZE, 3);
-   DspinSignals<dspin_cmd_width>*** signal_dspin_h_cmd_dec =
-      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_dec", X_SIZE-1, Y_SIZE, 3);
-   DspinSignals<dspin_rsp_width>*** signal_dspin_h_rsp_inc =
-      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_inc", X_SIZE-1, Y_SIZE, 2);
-   DspinSignals<dspin_rsp_width>*** signal_dspin_h_rsp_dec =
-      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_dec", X_SIZE-1, Y_SIZE, 2);
+   DspinSignals<dspin_cmd_width>** signal_dspin_h_cmd_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_inc", X_SIZE-1, Y_SIZE);
+   DspinSignals<dspin_cmd_width>** signal_dspin_h_cmd_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cmd_dec", X_SIZE-1, Y_SIZE);
+
+   DspinSignals<dspin_rsp_width>** signal_dspin_h_rsp_inc =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_inc", X_SIZE-1, Y_SIZE);
+   DspinSignals<dspin_rsp_width>** signal_dspin_h_rsp_dec =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_dec", X_SIZE-1, Y_SIZE);
+
+   DspinSignals<dspin_cmd_width>** signal_dspin_h_m2p_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_m2p_inc", X_SIZE-1, Y_SIZE);
+   DspinSignals<dspin_cmd_width>** signal_dspin_h_m2p_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_m2p_dec", X_SIZE-1, Y_SIZE);
+
+   DspinSignals<dspin_rsp_width>** signal_dspin_h_p2m_inc =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_p2m_inc", X_SIZE-1, Y_SIZE);
+   DspinSignals<dspin_rsp_width>** signal_dspin_h_p2m_dec =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_p2m_dec", X_SIZE-1, Y_SIZE);
+
+   DspinSignals<dspin_cmd_width>** signal_dspin_h_cla_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cla_inc", X_SIZE-1, Y_SIZE);
+   DspinSignals<dspin_cmd_width>** signal_dspin_h_cla_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_cla_dec", X_SIZE-1, Y_SIZE);
 
    // Vertical inter-clusters DSPIN signals
-   DspinSignals<dspin_cmd_width>*** signal_dspin_v_cmd_inc =
-      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_inc", X_SIZE, Y_SIZE-1, 3);
-   DspinSignals<dspin_cmd_width>*** signal_dspin_v_cmd_dec =
-      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_dec", X_SIZE, Y_SIZE-1, 3);
-   DspinSignals<dspin_rsp_width>*** signal_dspin_v_rsp_inc =
-      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_inc", X_SIZE, Y_SIZE-1, 2);
-   DspinSignals<dspin_rsp_width>*** signal_dspin_v_rsp_dec =
-      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_dec", X_SIZE, Y_SIZE-1, 2);
-
-   // Mesh boundaries DSPIN signals
-   DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_in =
-         alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_in" , X_SIZE, Y_SIZE, 4, 3);
-   DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_out =
-         alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_out", X_SIZE, Y_SIZE, 4, 3);
-   DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_in =
-         alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_in" , X_SIZE, Y_SIZE, 4, 2);
-   DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_out =
-         alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_out", X_SIZE, Y_SIZE, 4, 2);
+   DspinSignals<dspin_cmd_width>** signal_dspin_v_cmd_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_inc", X_SIZE, Y_SIZE-1);
+   DspinSignals<dspin_cmd_width>** signal_dspin_v_cmd_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cmd_dec", X_SIZE, Y_SIZE-1);
+
+   DspinSignals<dspin_rsp_width>** signal_dspin_v_rsp_inc =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_inc", X_SIZE, Y_SIZE-1);
+   DspinSignals<dspin_rsp_width>** signal_dspin_v_rsp_dec =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_dec", X_SIZE, Y_SIZE-1);
+
+   DspinSignals<dspin_cmd_width>** signal_dspin_v_m2p_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_m2p_inc", X_SIZE, Y_SIZE-1);
+   DspinSignals<dspin_cmd_width>** signal_dspin_v_m2p_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_m2p_dec", X_SIZE, Y_SIZE-1);
+
+   DspinSignals<dspin_rsp_width>** signal_dspin_v_p2m_inc =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_p2m_inc", X_SIZE, Y_SIZE-1);
+   DspinSignals<dspin_rsp_width>** signal_dspin_v_p2m_dec =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_p2m_dec", X_SIZE, Y_SIZE-1);
+
+   DspinSignals<dspin_cmd_width>** signal_dspin_v_cla_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cla_inc", X_SIZE, Y_SIZE-1);
+   DspinSignals<dspin_cmd_width>** signal_dspin_v_cla_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_cla_dec", X_SIZE, Y_SIZE-1);
+
+   // Mesh boundaries DSPIN signals (Most of those signals are not used...)
+   DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cmd_in =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cmd_in" , X_SIZE, Y_SIZE, 4);
+   DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cmd_out =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cmd_out", X_SIZE, Y_SIZE, 4);
+
+   DspinSignals<dspin_rsp_width>*** signal_dspin_bound_rsp_in =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_rsp_in" , X_SIZE, Y_SIZE, 4);
+   DspinSignals<dspin_rsp_width>*** signal_dspin_bound_rsp_out =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_rsp_out", X_SIZE, Y_SIZE, 4);
+
+   DspinSignals<dspin_cmd_width>*** signal_dspin_bound_m2p_in =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_m2p_in" , X_SIZE, Y_SIZE, 4);
+   DspinSignals<dspin_cmd_width>*** signal_dspin_bound_m2p_out =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_m2p_out", X_SIZE, Y_SIZE, 4);
+
+   DspinSignals<dspin_rsp_width>*** signal_dspin_bound_p2m_in =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_p2m_in" , X_SIZE, Y_SIZE, 4);
+   DspinSignals<dspin_rsp_width>*** signal_dspin_bound_p2m_out =
+      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_bound_p2m_out", X_SIZE, Y_SIZE, 4);
+
+   DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cla_in =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cla_in" , X_SIZE, Y_SIZE, 4);
+   DspinSignals<dspin_cmd_width>*** signal_dspin_bound_cla_out =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_bound_cla_out", X_SIZE, Y_SIZE, 4);
+
 
    ////////////////////////////
@@ -794,87 +843,128 @@
 
    // Inter Clusters horizontal connections
-   if (X_SIZE > 1){
-      for (size_t x = 0; x < (X_SIZE-1); x++){
-         for (size_t y = 0; y < Y_SIZE; y++){
-            for (size_t k = 0; k < 3; k++){
-               clusters[x][y]->p_cmd_out[EAST][k]      (signal_dspin_h_cmd_inc[x][y][k]);
-               clusters[x+1][y]->p_cmd_in[WEST][k]     (signal_dspin_h_cmd_inc[x][y][k]);
-               clusters[x][y]->p_cmd_in[EAST][k]       (signal_dspin_h_cmd_dec[x][y][k]);
-               clusters[x+1][y]->p_cmd_out[WEST][k]    (signal_dspin_h_cmd_dec[x][y][k]);
-            }
-
-            for (size_t k = 0; k < 2; k++){
-               clusters[x][y]->p_rsp_out[EAST][k]      (signal_dspin_h_rsp_inc[x][y][k]);
-               clusters[x+1][y]->p_rsp_in[WEST][k]     (signal_dspin_h_rsp_inc[x][y][k]);
-               clusters[x][y]->p_rsp_in[EAST][k]       (signal_dspin_h_rsp_dec[x][y][k]);
-               clusters[x+1][y]->p_rsp_out[WEST][k]    (signal_dspin_h_rsp_dec[x][y][k]);
-            }
-         }
-      }
-   }
-   std::cout << std::endl << "Horizontal connections established" << std::endl;
+   if (X_SIZE > 1) {
+       for (size_t x = 0; x < (X_SIZE-1); x++) {
+           for (size_t y = 0; y < (Y_SIZE); y++) {
+               clusters[x][y]->p_cmd_out[EAST]      (signal_dspin_h_cmd_inc[x][y]);
+               clusters[x+1][y]->p_cmd_in[WEST]     (signal_dspin_h_cmd_inc[x][y]);
+               clusters[x][y]->p_cmd_in[EAST]       (signal_dspin_h_cmd_dec[x][y]);
+               clusters[x+1][y]->p_cmd_out[WEST]    (signal_dspin_h_cmd_dec[x][y]);
+
+               clusters[x][y]->p_rsp_out[EAST]      (signal_dspin_h_rsp_inc[x][y]);
+               clusters[x+1][y]->p_rsp_in[WEST]     (signal_dspin_h_rsp_inc[x][y]);
+               clusters[x][y]->p_rsp_in[EAST]       (signal_dspin_h_rsp_dec[x][y]);
+               clusters[x+1][y]->p_rsp_out[WEST]    (signal_dspin_h_rsp_dec[x][y]);
+
+               clusters[x][y]->p_m2p_out[EAST]      (signal_dspin_h_m2p_inc[x][y]);
+               clusters[x+1][y]->p_m2p_in[WEST]     (signal_dspin_h_m2p_inc[x][y]);
+               clusters[x][y]->p_m2p_in[EAST]       (signal_dspin_h_m2p_dec[x][y]);
+               clusters[x+1][y]->p_m2p_out[WEST]    (signal_dspin_h_m2p_dec[x][y]);
+
+               clusters[x][y]->p_p2m_out[EAST]      (signal_dspin_h_p2m_inc[x][y]);
+               clusters[x+1][y]->p_p2m_in[WEST]     (signal_dspin_h_p2m_inc[x][y]);
+               clusters[x][y]->p_p2m_in[EAST]       (signal_dspin_h_p2m_dec[x][y]);
+               clusters[x+1][y]->p_p2m_out[WEST]    (signal_dspin_h_p2m_dec[x][y]);
+
+               clusters[x][y]->p_cla_out[EAST]      (signal_dspin_h_cla_inc[x][y]);
+               clusters[x+1][y]->p_cla_in[WEST]     (signal_dspin_h_cla_inc[x][y]);
+               clusters[x][y]->p_cla_in[EAST]       (signal_dspin_h_cla_dec[x][y]);
+               clusters[x+1][y]->p_cla_out[WEST]    (signal_dspin_h_cla_dec[x][y]);
+           }
+       }
+   }
+   std::cout << std::endl << "Horizontal connections done" << std::endl;
 
    // Inter Clusters vertical connections
    if (Y_SIZE > 1) {
-      for (size_t y = 0; y < (Y_SIZE-1); y++){
-         for (size_t x = 0; x < X_SIZE; x++){
-            for (size_t k = 0; k < 3; k++){
-               clusters[x][y]->p_cmd_out[NORTH][k]     (signal_dspin_v_cmd_inc[x][y][k]);
-               clusters[x][y+1]->p_cmd_in[SOUTH][k]    (signal_dspin_v_cmd_inc[x][y][k]);
-               clusters[x][y]->p_cmd_in[NORTH][k]      (signal_dspin_v_cmd_dec[x][y][k]);
-               clusters[x][y+1]->p_cmd_out[SOUTH][k]   (signal_dspin_v_cmd_dec[x][y][k]);
-            }
-
-            for (size_t k = 0; k < 2; k++){
-               clusters[x][y]->p_rsp_out[NORTH][k]     (signal_dspin_v_rsp_inc[x][y][k]);
-               clusters[x][y+1]->p_rsp_in[SOUTH][k]    (signal_dspin_v_rsp_inc[x][y][k]);
-               clusters[x][y]->p_rsp_in[NORTH][k]      (signal_dspin_v_rsp_dec[x][y][k]);
-               clusters[x][y+1]->p_rsp_out[SOUTH][k]   (signal_dspin_v_rsp_dec[x][y][k]);
-            }
-         }
-      }
-   }
-   std::cout << "Vertical connections established" << std::endl;
+       for (size_t y = 0; y < (Y_SIZE-1); y++) {
+           for (size_t x = 0; x < X_SIZE; x++) {
+               clusters[x][y]->p_cmd_out[NORTH]     (signal_dspin_v_cmd_inc[x][y]);
+               clusters[x][y+1]->p_cmd_in[SOUTH]    (signal_dspin_v_cmd_inc[x][y]);
+               clusters[x][y]->p_cmd_in[NORTH]      (signal_dspin_v_cmd_dec[x][y]);
+               clusters[x][y+1]->p_cmd_out[SOUTH]   (signal_dspin_v_cmd_dec[x][y]);
+
+               clusters[x][y]->p_rsp_out[NORTH]     (signal_dspin_v_rsp_inc[x][y]);
+               clusters[x][y+1]->p_rsp_in[SOUTH]    (signal_dspin_v_rsp_inc[x][y]);
+               clusters[x][y]->p_rsp_in[NORTH]      (signal_dspin_v_rsp_dec[x][y]);
+               clusters[x][y+1]->p_rsp_out[SOUTH]   (signal_dspin_v_rsp_dec[x][y]);
+
+               clusters[x][y]->p_m2p_out[NORTH]     (signal_dspin_v_m2p_inc[x][y]);
+               clusters[x][y+1]->p_m2p_in[SOUTH]    (signal_dspin_v_m2p_inc[x][y]);
+               clusters[x][y]->p_m2p_in[NORTH]      (signal_dspin_v_m2p_dec[x][y]);
+               clusters[x][y+1]->p_m2p_out[SOUTH]   (signal_dspin_v_m2p_dec[x][y]);
+
+               clusters[x][y]->p_p2m_out[NORTH]     (signal_dspin_v_p2m_inc[x][y]);
+               clusters[x][y+1]->p_p2m_in[SOUTH]    (signal_dspin_v_p2m_inc[x][y]);
+               clusters[x][y]->p_p2m_in[NORTH]      (signal_dspin_v_p2m_dec[x][y]);
+               clusters[x][y+1]->p_p2m_out[SOUTH]   (signal_dspin_v_p2m_dec[x][y]);
+
+               clusters[x][y]->p_cla_out[NORTH]     (signal_dspin_v_cla_inc[x][y]);
+               clusters[x][y+1]->p_cla_in[SOUTH]    (signal_dspin_v_cla_inc[x][y]);
+               clusters[x][y]->p_cla_in[NORTH]      (signal_dspin_v_cla_dec[x][y]);
+               clusters[x][y+1]->p_cla_out[SOUTH]   (signal_dspin_v_cla_dec[x][y]);
+           }
+       }
+   }
+   std::cout << std::endl << "Vertical connections done" << std::endl;
 
    // East & West boundary cluster connections
-   for (size_t y = 0; y < Y_SIZE; y++)
-   {
-      for (size_t k = 0; k < 3; k++)
-      {
-         clusters[0][y]->p_cmd_in[WEST][k]        (signal_dspin_false_cmd_in [0][y][WEST][k]);
-         clusters[0][y]->p_cmd_out[WEST][k]       (signal_dspin_false_cmd_out[0][y][WEST][k]);
-         clusters[X_SIZE-1][y]->p_cmd_in[EAST][k] (signal_dspin_false_cmd_in [X_SIZE-1][y][EAST][k]);
-         clusters[X_SIZE-1][y]->p_cmd_out[EAST][k](signal_dspin_false_cmd_out[X_SIZE-1][y][EAST][k]);
-      }
-
-      for (size_t k = 0; k < 2; k++)
-      {
-         clusters[0][y]->p_rsp_in[WEST][k]        (signal_dspin_false_rsp_in [0][y][WEST][k]);
-         clusters[0][y]->p_rsp_out[WEST][k]       (signal_dspin_false_rsp_out[0][y][WEST][k]);
-         clusters[X_SIZE-1][y]->p_rsp_in[EAST][k] (signal_dspin_false_rsp_in [X_SIZE-1][y][EAST][k]);
-         clusters[X_SIZE-1][y]->p_rsp_out[EAST][k](signal_dspin_false_rsp_out[X_SIZE-1][y][EAST][k]);
-      }
-   }
+   for (size_t y = 0; y < (Y_SIZE); y++) {
+       clusters[0][y]->p_cmd_in[WEST]           (signal_dspin_bound_cmd_in[0][y][WEST]);
+       clusters[0][y]->p_cmd_out[WEST]          (signal_dspin_bound_cmd_out[0][y][WEST]);
+       clusters[X_SIZE-1][y]->p_cmd_in[EAST]    (signal_dspin_bound_cmd_in[X_SIZE-1][y][EAST]);
+       clusters[X_SIZE-1][y]->p_cmd_out[EAST]   (signal_dspin_bound_cmd_out[X_SIZE-1][y][EAST]);
+
+       clusters[0][y]->p_rsp_in[WEST]           (signal_dspin_bound_rsp_in[0][y][WEST]);
+       clusters[0][y]->p_rsp_out[WEST]          (signal_dspin_bound_rsp_out[0][y][WEST]);
+       clusters[X_SIZE-1][y]->p_rsp_in[EAST]    (signal_dspin_bound_rsp_in[X_SIZE-1][y][EAST]);
+       clusters[X_SIZE-1][y]->p_rsp_out[EAST]   (signal_dspin_bound_rsp_out[X_SIZE-1][y][EAST]);
+
+       clusters[0][y]->p_m2p_in[WEST]           (signal_dspin_bound_m2p_in[0][y][WEST]);
+       clusters[0][y]->p_m2p_out[WEST]          (signal_dspin_bound_m2p_out[0][y][WEST]);
+       clusters[X_SIZE-1][y]->p_m2p_in[EAST]    (signal_dspin_bound_m2p_in[X_SIZE-1][y][EAST]);
+       clusters[X_SIZE-1][y]->p_m2p_out[EAST]   (signal_dspin_bound_m2p_out[X_SIZE-1][y][EAST]);
+
+       clusters[0][y]->p_p2m_in[WEST]           (signal_dspin_bound_p2m_in[0][y][WEST]);
+       clusters[0][y]->p_p2m_out[WEST]          (signal_dspin_bound_p2m_out[0][y][WEST]);
+       clusters[X_SIZE-1][y]->p_p2m_in[EAST]    (signal_dspin_bound_p2m_in[X_SIZE-1][y][EAST]);
+       clusters[X_SIZE-1][y]->p_p2m_out[EAST]   (signal_dspin_bound_p2m_out[X_SIZE-1][y][EAST]);
+
+       clusters[0][y]->p_cla_in[WEST]           (signal_dspin_bound_cla_in[0][y][WEST]);
+       clusters[0][y]->p_cla_out[WEST]          (signal_dspin_bound_cla_out[0][y][WEST]);
+       clusters[X_SIZE-1][y]->p_cla_in[EAST]    (signal_dspin_bound_cla_in[X_SIZE-1][y][EAST]);
+       clusters[X_SIZE-1][y]->p_cla_out[EAST]   (signal_dspin_bound_cla_out[X_SIZE-1][y][EAST]);
+   }
+
+   std::cout << std::endl << "West & East boundaries connections done" << std::endl;
 
    // North & South boundary clusters connections
-   for (size_t x = 0; x < X_SIZE; x++)
-   {
-      for (size_t k = 0; k < 3; k++)
-      {
-         clusters[x][0]->p_cmd_in[SOUTH][k]        (signal_dspin_false_cmd_in [x][0][SOUTH][k]);
-         clusters[x][0]->p_cmd_out[SOUTH][k]       (signal_dspin_false_cmd_out[x][0][SOUTH][k]);
-         clusters[x][Y_SIZE-1]->p_cmd_in[NORTH][k] (signal_dspin_false_cmd_in [x][Y_SIZE-1][NORTH][k]);
-         clusters[x][Y_SIZE-1]->p_cmd_out[NORTH][k](signal_dspin_false_cmd_out[x][Y_SIZE-1][NORTH][k]);
-      }
-
-      for (size_t k = 0; k < 2; k++)
-      {
-         clusters[x][0]->p_rsp_in[SOUTH][k]        (signal_dspin_false_rsp_in [x][0][SOUTH][k]);
-         clusters[x][0]->p_rsp_out[SOUTH][k]       (signal_dspin_false_rsp_out[x][0][SOUTH][k]);
-         clusters[x][Y_SIZE-1]->p_rsp_in[NORTH][k] (signal_dspin_false_rsp_in [x][Y_SIZE-1][NORTH][k]);
-         clusters[x][Y_SIZE-1]->p_rsp_out[NORTH][k](signal_dspin_false_rsp_out[x][Y_SIZE-1][NORTH][k]);
-      }
-   }
-   std::cout << "North, South, West, East connections established" << std::endl;
+   for (size_t x = 0; x < X_SIZE; x++) {
+       clusters[x][0]->p_cmd_in[SOUTH]          (signal_dspin_bound_cmd_in[x][0][SOUTH]);
+       clusters[x][0]->p_cmd_out[SOUTH]         (signal_dspin_bound_cmd_out[x][0][SOUTH]);
+       clusters[x][Y_SIZE-1]->p_cmd_in[NORTH]   (signal_dspin_bound_cmd_in[x][Y_SIZE-1][NORTH]);
+       clusters[x][Y_SIZE-1]->p_cmd_out[NORTH]  (signal_dspin_bound_cmd_out[x][Y_SIZE-1][NORTH]);
+
+       clusters[x][0]->p_rsp_in[SOUTH]          (signal_dspin_bound_rsp_in[x][0][SOUTH]);
+       clusters[x][0]->p_rsp_out[SOUTH]         (signal_dspin_bound_rsp_out[x][0][SOUTH]);
+       clusters[x][Y_SIZE-1]->p_rsp_in[NORTH]   (signal_dspin_bound_rsp_in[x][Y_SIZE-1][NORTH]);
+       clusters[x][Y_SIZE-1]->p_rsp_out[NORTH]  (signal_dspin_bound_rsp_out[x][Y_SIZE-1][NORTH]);
+
+       clusters[x][0]->p_m2p_in[SOUTH]          (signal_dspin_bound_m2p_in[x][0][SOUTH]);
+       clusters[x][0]->p_m2p_out[SOUTH]         (signal_dspin_bound_m2p_out[x][0][SOUTH]);
+       clusters[x][Y_SIZE-1]->p_m2p_in[NORTH]   (signal_dspin_bound_m2p_in[x][Y_SIZE-1][NORTH]);
+       clusters[x][Y_SIZE-1]->p_m2p_out[NORTH]  (signal_dspin_bound_m2p_out[x][Y_SIZE-1][NORTH]);
+
+       clusters[x][0]->p_p2m_in[SOUTH]          (signal_dspin_bound_p2m_in[x][0][SOUTH]);
+       clusters[x][0]->p_p2m_out[SOUTH]         (signal_dspin_bound_p2m_out[x][0][SOUTH]);
+       clusters[x][Y_SIZE-1]->p_p2m_in[NORTH]   (signal_dspin_bound_p2m_in[x][Y_SIZE-1][NORTH]);
+       clusters[x][Y_SIZE-1]->p_p2m_out[NORTH]  (signal_dspin_bound_p2m_out[x][Y_SIZE-1][NORTH]);
+
+       clusters[x][0]->p_cla_in[SOUTH]          (signal_dspin_bound_cla_in[x][0][SOUTH]);
+       clusters[x][0]->p_cla_out[SOUTH]         (signal_dspin_bound_cla_out[x][0][SOUTH]);
+       clusters[x][Y_SIZE-1]->p_cla_in[NORTH]   (signal_dspin_bound_cla_in[x][Y_SIZE-1][NORTH]);
+       clusters[x][Y_SIZE-1]->p_cla_out[NORTH]  (signal_dspin_bound_cla_out[x][Y_SIZE-1][NORTH]);
+   }
+
+   std::cout << std::endl << "North & South boundaries connections done" << std::endl;
    std::cout << std::endl;
 
@@ -955,22 +1045,35 @@
    signal_resetn = false;
 
-   // network boundaries signals
-   for (size_t x = 0; x < X_SIZE ; x++){
-      for (size_t y = 0; y < Y_SIZE ; y++){
-         for (size_t a = 0; a < 4; a++){
-            for (size_t k = 0; k < 3; k++){
-               signal_dspin_false_cmd_in [x][y][a][k].write = false;
-               signal_dspin_false_cmd_in [x][y][a][k].read  = true;
-               signal_dspin_false_cmd_out[x][y][a][k].write = false;
-               signal_dspin_false_cmd_out[x][y][a][k].read  = true;
-            }
-            for (size_t k = 0; k < 2; k++){
-               signal_dspin_false_rsp_in [x][y][a][k].write = false;
-               signal_dspin_false_rsp_in [x][y][a][k].read  = true;
-               signal_dspin_false_rsp_out[x][y][a][k].write = false;
-               signal_dspin_false_rsp_out[x][y][a][k].read  = true;
-            }
-         }
-      }
+   // set network boundaries signals default values
+   // for all boundary clusters
+   for (size_t x = 0; x < X_SIZE ; x++) {
+       for (size_t y = 0; y < Y_SIZE ; y++) {
+           for (size_t face = 0; face < 4; face++) {
+               signal_dspin_bound_cmd_in [x][y][face].write = false;
+               signal_dspin_bound_cmd_in [x][y][face].read  = true;
+               signal_dspin_bound_cmd_out[x][y][face].write = false;
+               signal_dspin_bound_cmd_out[x][y][face].read  = true;
+
+               signal_dspin_bound_rsp_in [x][y][face].write = false;
+               signal_dspin_bound_rsp_in [x][y][face].read  = true;
+               signal_dspin_bound_rsp_out[x][y][face].write = false;
+               signal_dspin_bound_rsp_out[x][y][face].read  = true;
+
+               signal_dspin_bound_m2p_in [x][y][face].write = false;
+               signal_dspin_bound_m2p_in [x][y][face].read  = true;
+               signal_dspin_bound_m2p_out[x][y][face].write = false;
+               signal_dspin_bound_m2p_out[x][y][face].read  = true;
+
+               signal_dspin_bound_p2m_in [x][y][face].write = false;
+               signal_dspin_bound_p2m_in [x][y][face].read  = true;
+               signal_dspin_bound_p2m_out[x][y][face].write = false;
+               signal_dspin_bound_p2m_out[x][y][face].read  = true;
+
+               signal_dspin_bound_cla_in [x][y][face].write = false;
+               signal_dspin_bound_cla_in [x][y][face].read  = true;
+               signal_dspin_bound_cla_out[x][y][face].write = false;
+               signal_dspin_bound_cla_out[x][y][face].read  = true;
+           }
+       }
    }
 
@@ -1037,5 +1140,4 @@
 
                      clusters[x][y]->proc[proc]->print_trace();
-                     
                      std::ostringstream proc_signame;
                      proc_signame << "[SIG]PROC_" << x << "_" << y << "_" << proc ;
@@ -1121,5 +1223,5 @@
    }
 
-   
+
    // Free memory
    for (size_t i = 0; i  < (X_SIZE * Y_SIZE); i++)
@@ -1130,16 +1232,48 @@
    }
 
-   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_inc, X_SIZE - 1, Y_SIZE, 3);
-   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_dec, X_SIZE - 1, Y_SIZE, 3);
-   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_inc, X_SIZE - 1, Y_SIZE, 2);
-   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_dec, X_SIZE - 1, Y_SIZE, 2);
-   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_inc, X_SIZE, Y_SIZE - 1, 3);
-   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_dec, X_SIZE, Y_SIZE - 1, 3);
-   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_inc, X_SIZE, Y_SIZE - 1, 2);
-   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_dec, X_SIZE, Y_SIZE - 1, 2);
-   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_false_cmd_in, X_SIZE, Y_SIZE, 4, 3);
-   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_false_cmd_out, X_SIZE, Y_SIZE, 4, 3);
-   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_false_rsp_in, X_SIZE, Y_SIZE, 4, 2);
-   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_false_rsp_out, X_SIZE, Y_SIZE, 4, 2);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_inc, X_SIZE-1, Y_SIZE);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cmd_dec, X_SIZE-1, Y_SIZE);
+
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_inc, X_SIZE-1, Y_SIZE);
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_rsp_dec, X_SIZE-1, Y_SIZE);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_m2p_inc, X_SIZE-1, Y_SIZE);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_m2p_dec, X_SIZE-1, Y_SIZE);
+
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_p2m_inc, X_SIZE-1, Y_SIZE);
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_h_p2m_dec, X_SIZE-1, Y_SIZE);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cla_inc, X_SIZE-1, Y_SIZE);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_h_cla_dec, X_SIZE-1, Y_SIZE);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_inc, X_SIZE, Y_SIZE-1);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cmd_dec, X_SIZE, Y_SIZE-1);
+
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_inc, X_SIZE, Y_SIZE-1);
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_rsp_dec, X_SIZE, Y_SIZE-1);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_m2p_inc, X_SIZE, Y_SIZE-1);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_m2p_dec, X_SIZE, Y_SIZE-1);
+
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_p2m_inc, X_SIZE, Y_SIZE-1);
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_v_p2m_dec, X_SIZE, Y_SIZE-1);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cla_inc, X_SIZE, Y_SIZE-1);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_v_cla_dec, X_SIZE, Y_SIZE-1);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cmd_in, X_SIZE, Y_SIZE, 4);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cmd_out, X_SIZE, Y_SIZE, 4);
+
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_rsp_in, X_SIZE, Y_SIZE, 4);
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_rsp_out, X_SIZE, Y_SIZE, 4);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_m2p_in, X_SIZE, Y_SIZE, 4);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_m2p_out, X_SIZE, Y_SIZE, 4);
+
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_p2m_in, X_SIZE, Y_SIZE, 4);
+   dealloc_elems<DspinSignals<dspin_rsp_width> >(signal_dspin_bound_p2m_out, X_SIZE, Y_SIZE, 4);
+
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cla_in, X_SIZE, Y_SIZE, 4);
+   dealloc_elems<DspinSignals<dspin_cmd_width> >(signal_dspin_bound_cla_out, X_SIZE, Y_SIZE, 4);
 
    return EXIT_SUCCESS;
