Index: trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
===================================================================
--- trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp	(revision 465)
+++ trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp	(revision 468)
@@ -85,6 +85,6 @@
 {
     // Vectors of ports definition
-    p_cmd_in        = alloc_elems<DspinInput<dspin_cmd_width> >("p_cmd_in", 4, 2);
-    p_cmd_out       = alloc_elems<DspinOutput<dspin_cmd_width> >("p_cmd_out", 4, 2);
+    p_cmd_in        = alloc_elems<DspinInput<dspin_cmd_width> >("p_cmd_in", 4, 3);
+    p_cmd_out       = alloc_elems<DspinOutput<dspin_cmd_width> >("p_cmd_out", 4, 3);
     p_rsp_in        = alloc_elems<DspinInput<dspin_rsp_width> >("p_rsp_in", 4, 2);
     p_rsp_out       = alloc_elems<DspinOutput<dspin_rsp_width> >("p_rsp_out", 4, 2);
@@ -148,4 +148,5 @@
                      8,                                  // TRANSACTION TABLE DEPTH
                      8,                                  // UPDATE TABLE DEPTH
+                     8,                                  // INVALIDATE TABLE DEPTH
                      debug_start_cycle,
                      memc_debug_ok );
@@ -269,9 +270,22 @@
 
     /////////////////////////////////////////////////////////////////////////////
+    xbar_clack_c = new DspinLocalCrossbar<dspin_cmd_width>(
+                     "xbar_clack_c",
+                     mtd,                          // mapping table
+                     x_id, y_id,                   // cluster coordinates
+                     x_width, y_width, l_width,
+                     1,                            // number of local sources
+                     nb_procs,                     // number of local targets 
+                     1, 1,                         // fifo depths
+                     true,                         // CMD
+                     false,                        // don't use local routing table
+                     false);                       // broadcast
+
+    /////////////////////////////////////////////////////////////////////////////
     router_cmd = new VirtualDspinRouter<dspin_cmd_width>(
                      "router_cmd",
                      x_id,y_id,                    // coordinate in the mesh
                      x_width, y_width,             // x & y fields width
-                     2,                            // nb virtual channels
+                     3,                            // nb virtual channels
                      4,4);                         // input & output fifo depths
 
@@ -385,8 +399,12 @@
     for(int i = 0; i < 4; i++)
     {
-        for (int k = 0; k < 2; k++)
+        for (int k = 0; k < 3; k++)
         {
             router_cmd->p_out[i][k]          (this->p_cmd_out[i][k]);
             router_cmd->p_in[i][k]           (this->p_cmd_in[i][k]);
+        }
+
+        for (int k = 0; k < 2; k++)
+        {
             router_rsp->p_out[i][k]          (this->p_rsp_out[i][k]);
             router_rsp->p_in[i][k]           (this->p_rsp_in[i][k]);
@@ -396,6 +414,8 @@
     router_cmd->p_out[4][0]                  (signal_dspin_cmd_g2l_d);
     router_cmd->p_out[4][1]                  (signal_dspin_m2p_g2l_c);
+    router_cmd->p_out[4][2]                  (signal_dspin_clack_g2l_c);
     router_cmd->p_in[4][0]                   (signal_dspin_cmd_l2g_d);
     router_cmd->p_in[4][1]                   (signal_dspin_m2p_l2g_c);
+    router_cmd->p_in[4][2]                   (signal_dspin_clack_l2g_c);
 
     router_rsp->p_out[4][0]                  (signal_dspin_rsp_g2l_d);
@@ -403,4 +423,5 @@
     router_rsp->p_in[4][0]                   (signal_dspin_rsp_l2g_d);
     router_rsp->p_in[4][1]                   (signal_dspin_p2m_l2g_c);
+
 
     std::cout << "  - CMD & RSP routers connected" << std::endl;
@@ -473,4 +494,15 @@
     std::cout << "  - M2P Coherence crossbar connected" << std::endl;
 
+    ////////////////////// CLACK DSPIN local crossbar coherence
+    xbar_clack_c->p_clk                          (this->p_clk);
+    xbar_clack_c->p_resetn                       (this->p_resetn);
+    xbar_clack_c->p_global_out                   (signal_dspin_clack_l2g_c);
+    xbar_clack_c->p_global_in                    (signal_dspin_clack_g2l_c);
+    xbar_clack_c->p_local_in[0]                  (signal_dspin_clack_memc);
+    for (size_t p = 0; p < nb_procs; p++)
+        xbar_clack_c->p_local_out[p]               (signal_dspin_clack_proc[p]);
+
+    std::cout << "  - Clack Coherence crossbar connected" << std::endl;
+
     ////////////////////////// P2M DSPIN local crossbar coherence
     xbar_p2m_c->p_clk                            (this->p_clk);
@@ -491,6 +523,7 @@
         proc[p]->p_resetn                   (this->p_resetn);
         proc[p]->p_vci                      (signal_vci_ini_proc[p]);
-        proc[p]->p_dspin_in                 (signal_dspin_m2p_proc[p]);
-        proc[p]->p_dspin_out                (signal_dspin_p2m_proc[p]);
+        proc[p]->p_dspin_m2p                (signal_dspin_m2p_proc[p]);
+        proc[p]->p_dspin_p2m                (signal_dspin_p2m_proc[p]);
+        proc[p]->p_dspin_clack              (signal_dspin_clack_proc[p]);
         proc[p]->p_irq[0]                   (signal_proc_it[p]);
         for ( size_t j = 1 ; j < 6 ; j++)
@@ -549,6 +582,7 @@
     memc->p_vci_ixr                    (signal_vci_xram);
     memc->p_vci_tgt                    (signal_vci_tgt_memc);
-    memc->p_dspin_in                   (signal_dspin_p2m_memc);
-    memc->p_dspin_out                  (signal_dspin_m2p_memc);
+    memc->p_dspin_p2m                  (signal_dspin_p2m_memc);
+    memc->p_dspin_m2p                  (signal_dspin_m2p_memc);
+    memc->p_dspin_clack                (signal_dspin_clack_memc);
 
     // wrapper MEMC
