Index: trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
===================================================================
--- trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp	(revision 550)
+++ trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp	(revision 584)
@@ -206,5 +206,5 @@
                      mt_int,                            // mapping table INT network
                      IntTab(cluster_id,xicu_int_tgtid), // TGTID direct space
-                     nb_procs,                          // number of timer IRQs
+                     32,                                // number of timer IRQs
                      32,                                // number of hard IRQs
                      32,                                // number of soft IRQs
@@ -366,14 +366,16 @@
     std::ostringstream s_ram_router_cmd;
     s_ram_router_cmd << "ram_router_cmd_" << x_id << "_" << y_id;
+    size_t is_iob0 = (x_id == 0) and (y_id == 0);
+    size_t is_iob1 = (x_id == (xmax-1)) and (y_id == (ymax-1));
     ram_router_cmd = new DspinRouterTsar<dspin_ram_cmd_width>(
                      s_ram_router_cmd.str().c_str(),
-                     x_id, y_id,                  // router coordinates in mesh
-                     x_width,                     // x field width in first flit
-                     x_width,                     // y field width in first flit
-                     4, 4,                        // input & output fifo depths
-                     cluster_iob0,                // cluster containing IOB0
-                     cluster_iob1,                // cluster containing IOB1
-                     l_width,                     // local field width in first flit
-                     iobx_ram_srcid );            // IOB local index
+                     x_id, y_id,                     // router coordinates in mesh
+                     x_width,                        // x field width in first flit
+                     y_width,                        // y field width in first flit
+                     4, 4,                           // input & output fifo depths
+                     is_iob0,                        // cluster contains IOB0
+                     is_iob1,                        // cluster contains IOB1
+                     false,                          // not a response router
+                     l_width);                       // local field width in first flit
 
     std::ostringstream s_ram_router_rsp;
@@ -381,12 +383,12 @@
     ram_router_rsp = new DspinRouterTsar<dspin_ram_rsp_width>(
                      s_ram_router_rsp.str().c_str(),
-                     x_id, y_id,                  // coordinates in mesh
-                     x_width,                     // x field width in first flit
-                     y_width,                     // y field width in first flit
-                     4, 4,                        // input & output fifo depths
-                     cluster_iob0,                // cluster containing IOB0
-                     cluster_iob1,                // cluster containing IOB1
-                     l_width,                     // local field width in first flit
-                     iobx_ram_srcid );            // IOB local index
+                     x_id, y_id,                     // coordinates in mesh
+                     x_width,                        // x field width in first flit
+                     y_width,                        // y field width in first flit
+                     4, 4,                           // input & output fifo depths
+                     is_iob0,                        // cluster contains IOB0
+                     is_iob1,                        // cluster contains IOB1
+                     true,                           // response router
+                     l_width);                       // local field width in first flit
 
 
@@ -460,5 +462,8 @@
     // on coherence network : local srcid[proc] in [0...nb_procs-1]
     //                      : local srcid[memc] = nb_procs
-
+    // In cluster_iob0, 32 HWI interrupts from external peripherals
+    // are connected to the XICU ports p_hwi[0:31] 
+    // In other clusters, no HWI interrupts are connected to XICU
+ 
     //////////////////////// internal CMD & RSP routers
     int_router_cmd->p_clk                        (this->p_clk);
@@ -594,14 +599,10 @@
         xicu->p_irq[p]                           (signal_proc_it[p]);
     }
-    for ( size_t i=0 ; i<4 ; i++)
-    {
-        xicu->p_hwi[i]                           (signal_irq_mdma[i]);
-    }
-    for ( size_t i=4 ; i<32 ; i++)
+    for ( size_t i=0 ; i<32 ; i++)
     {
         if (cluster_id == cluster_iob0) 
-        xicu->p_hwi[i]                           (*(this->p_irq[i]));
+            xicu->p_hwi[i]                       (*(this->p_irq[i]));
         else  
-        xicu->p_hwi[i]                           (signal_false);
+            xicu->p_hwi[i]                       (signal_false);
     }                     
 
