Index: branches/v5/platforms/tsar_generic_xbar/top.cpp
===================================================================
--- branches/v5/platforms/tsar_generic_xbar/top.cpp	(revision 447)
+++ branches/v5/platforms/tsar_generic_xbar/top.cpp	(revision 448)
@@ -505,4 +505,8 @@
    DspinSignals<dspin_rsp_width>*** signal_dspin_h_rsp_dec =
       alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_h_rsp_dec", XMAX-1, YMAX, 2);
+   DspinSignals<dspin_cmd_width>**  signal_dspin_h_clack_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_clack_inc", XMAX-1, YMAX);
+   DspinSignals<dspin_cmd_width>**  signal_dspin_h_clack_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_h_clack_dec", XMAX-1, YMAX);
 
    // Vertical inter-clusters DSPIN signals
@@ -515,4 +519,8 @@
    DspinSignals<dspin_rsp_width>*** signal_dspin_v_rsp_dec =
       alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_v_rsp_dec", XMAX, YMAX-1, 2);
+   DspinSignals<dspin_cmd_width>**  signal_dspin_v_clack_inc =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_clack_inc", XMAX, YMAX-1);
+   DspinSignals<dspin_cmd_width>**  signal_dspin_v_clack_dec =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_v_clack_dec", XMAX, YMAX-1);
 
    // Mesh boundaries DSPIN signals
@@ -525,4 +533,8 @@
    DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_out =
       alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_out", XMAX, YMAX, 2, 4);
+   DspinSignals<dspin_cmd_width>***  signal_dspin_false_clack_in =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_clack_in", XMAX, YMAX, 4);
+   DspinSignals<dspin_cmd_width>***  signal_dspin_false_clack_out =
+      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_clack_out", XMAX, YMAX, 4);
 
 
@@ -653,4 +665,8 @@
                clusters[x+1][y]->p_rsp_out[k][WEST]    (signal_dspin_h_rsp_dec[x][y][k]);
             }
+            clusters[x][y]->p_clack_out[EAST]      (signal_dspin_h_clack_inc[x][y]);
+            clusters[x+1][y]->p_clack_in[WEST]     (signal_dspin_h_clack_inc[x][y]);
+            clusters[x][y]->p_clack_in[EAST]       (signal_dspin_h_clack_dec[x][y]);
+            clusters[x+1][y]->p_clack_out[WEST]    (signal_dspin_h_clack_dec[x][y]);
          }
       }
@@ -672,4 +688,8 @@
                clusters[x][y+1]->p_rsp_out[k][SOUTH]   (signal_dspin_v_rsp_dec[x][y][k]);
             }
+            clusters[x][y]->p_clack_out[NORTH]     (signal_dspin_v_clack_inc[x][y]);
+            clusters[x][y+1]->p_clack_in[SOUTH]    (signal_dspin_v_clack_inc[x][y]);
+            clusters[x][y]->p_clack_in[NORTH]      (signal_dspin_v_clack_dec[x][y]);
+            clusters[x][y+1]->p_clack_out[SOUTH]   (signal_dspin_v_clack_dec[x][y]);
          }
       }
@@ -682,8 +702,8 @@
       for (size_t k = 0; k < 2; k++)
       {
-         clusters[0][y]->p_cmd_in[k][WEST]             (signal_dspin_false_cmd_in[0][y][k][WEST]);
-         clusters[0][y]->p_cmd_out[k][WEST]            (signal_dspin_false_cmd_out[0][y][k][WEST]);
-         clusters[0][y]->p_rsp_in[k][WEST]             (signal_dspin_false_rsp_in[0][y][k][WEST]);
-         clusters[0][y]->p_rsp_out[k][WEST]            (signal_dspin_false_rsp_out[0][y][k][WEST]);
+         clusters[0][y]->p_cmd_in[k][WEST]        (signal_dspin_false_cmd_in[0][y][k][WEST]);
+         clusters[0][y]->p_cmd_out[k][WEST]       (signal_dspin_false_cmd_out[0][y][k][WEST]);
+         clusters[0][y]->p_rsp_in[k][WEST]        (signal_dspin_false_rsp_in[0][y][k][WEST]);
+         clusters[0][y]->p_rsp_out[k][WEST]       (signal_dspin_false_rsp_out[0][y][k][WEST]);
 
          clusters[XMAX-1][y]->p_cmd_in[k][EAST]   (signal_dspin_false_cmd_in[XMAX-1][y][k][EAST]);
@@ -692,4 +712,10 @@
          clusters[XMAX-1][y]->p_rsp_out[k][EAST]  (signal_dspin_false_rsp_out[XMAX-1][y][k][EAST]);
       }
+
+      clusters[0][y]->p_clack_in[WEST]       (signal_dspin_false_clack_in[0][y][WEST]);
+      clusters[0][y]->p_clack_out[WEST]      (signal_dspin_false_clack_out[0][y][WEST]);
+
+      clusters[XMAX-1][y]->p_clack_in[EAST]  (signal_dspin_false_clack_in[XMAX-1][y][EAST]);
+      clusters[XMAX-1][y]->p_clack_out[EAST] (signal_dspin_false_clack_out[XMAX-1][y][EAST]);
    }
 
@@ -699,8 +725,8 @@
       for (size_t k = 0; k < 2; k++)
       {
-         clusters[x][0]->p_cmd_in[k][SOUTH]            (signal_dspin_false_cmd_in[x][0][k][SOUTH]);
-         clusters[x][0]->p_cmd_out[k][SOUTH]           (signal_dspin_false_cmd_out[x][0][k][SOUTH]);
-         clusters[x][0]->p_rsp_in[k][SOUTH]            (signal_dspin_false_rsp_in[x][0][k][SOUTH]);
-         clusters[x][0]->p_rsp_out[k][SOUTH]           (signal_dspin_false_rsp_out[x][0][k][SOUTH]);
+         clusters[x][0]->p_cmd_in[k][SOUTH]       (signal_dspin_false_cmd_in[x][0][k][SOUTH]);
+         clusters[x][0]->p_cmd_out[k][SOUTH]      (signal_dspin_false_cmd_out[x][0][k][SOUTH]);
+         clusters[x][0]->p_rsp_in[k][SOUTH]       (signal_dspin_false_rsp_in[x][0][k][SOUTH]);
+         clusters[x][0]->p_rsp_out[k][SOUTH]      (signal_dspin_false_rsp_out[x][0][k][SOUTH]);
 
          clusters[x][YMAX-1]->p_cmd_in[k][NORTH]  (signal_dspin_false_cmd_in[x][YMAX-1][k][NORTH]);
@@ -709,4 +735,10 @@
          clusters[x][YMAX-1]->p_rsp_out[k][NORTH] (signal_dspin_false_rsp_out[x][YMAX-1][k][NORTH]);
       }
+
+      clusters[x][0]->p_clack_in[SOUTH]       (signal_dspin_false_clack_in[x][0][SOUTH]);
+      clusters[x][0]->p_clack_out[SOUTH]      (signal_dspin_false_clack_out[x][0][SOUTH]);
+
+      clusters[x][YMAX-1]->p_clack_in[NORTH]  (signal_dspin_false_clack_in[x][YMAX-1][NORTH]);
+      clusters[x][YMAX-1]->p_clack_out[NORTH] (signal_dspin_false_clack_out[x][YMAX-1][NORTH]);
    }
    std::cout << "North, South, West, East connections established" << std::endl;
@@ -736,4 +768,15 @@
                signal_dspin_false_rsp_out[x][y][k][a].read  = true;
             }
+         }
+      }
+   }
+   // clack network boundaries signals
+   for (size_t x = 0; x < XMAX ; x++){
+      for (size_t y = 0; y < YMAX ; y++){
+         for (size_t k = 0; k < 4; k++){
+            signal_dspin_false_clack_in [x][y][k].write = false;
+            signal_dspin_false_clack_in [x][y][k].read  = true;
+            signal_dspin_false_clack_out[x][y][k].write = false;
+            signal_dspin_false_clack_out[x][y][k].read  = true;
          }
       }
