Index: trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/metadata/tsar_iob_cluster.sd
===================================================================
--- trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/metadata/tsar_iob_cluster.sd	(revision 959)
+++ trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/metadata/tsar_iob_cluster.sd	(revision 972)
@@ -29,4 +29,5 @@
         Uses('common:iss2'),
         Uses('common:elf_file_loader'),
+        Uses('caba:coproc_signals'),
 
         # internal network components
@@ -47,6 +48,10 @@
               cell_size          = parameter.Reference('vci_data_width_int')),
 
-        Uses('caba:vci_multi_dma',
+        Uses('caba:vci_mwmr_dma',
               cell_size          = parameter.Reference('vci_data_width_int')),
+
+        Uses('caba:coproc_gcd'),
+        Uses('caba:coproc_dct'),
+        Uses('caba:coproc_cpy'),
 
         Uses('caba:vci_local_crossbar', 
Index: trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
===================================================================
--- trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h	(revision 959)
+++ trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h	(revision 972)
@@ -28,8 +28,12 @@
 #include "dspin_router.h"
 #include "virtual_dspin_router.h"
-#include "vci_multi_dma.h"
+#include "vci_mwmr_dma.h"
 #include "vci_mem_cache.h"
 #include "vci_cc_vcache_wrapper.h"
 #include "vci_io_bridge.h"
+#include "coproc_signals.h"
+#include "coproc_gcd.h"
+#include "coproc_dct.h"
+#include "coproc_cpy.h"
 
 namespace soclib { namespace caba   {
@@ -71,7 +75,13 @@
     sc_signal<bool>                       signal_false;
     sc_signal<bool>                       signal_proc_it[32];
-    sc_signal<bool>                       signal_irq_mdma[8];
+    sc_signal<bool>                       signal_irq_mwmr;
     sc_signal<bool>                       signal_irq_memc;
     
+    // Coprocessor signals
+    CoprocSignals<uint32_t,uint8_t>       signal_to_coproc[8];
+    CoprocSignals<uint32_t,uint8_t>       signal_from_coproc[8];
+    sc_signal<uint32_t>                   signal_config_coproc[8];
+    sc_signal<uint32_t>                   signal_status_coproc[8];
+
     // INT network DSPIN signals between DSPIN routers and DSPIN local_crossbars
     DspinSignals<dspin_int_cmd_width>     signal_int_dspin_cmd_l2g_d; 
@@ -88,10 +98,10 @@
     // INT network VCI signals between VCI components and VCI local crossbar
     VciSignals<vci_param_int>             signal_int_vci_ini_proc[8]; 
-    VciSignals<vci_param_int>             signal_int_vci_ini_mdma; 
+    VciSignals<vci_param_int>             signal_int_vci_ini_mwmr; 
     VciSignals<vci_param_int>             signal_int_vci_ini_iobx; 
 
     VciSignals<vci_param_int>             signal_int_vci_tgt_memc;
     VciSignals<vci_param_int>             signal_int_vci_tgt_xicu;
-    VciSignals<vci_param_int>             signal_int_vci_tgt_mdma;
+    VciSignals<vci_param_int>             signal_int_vci_tgt_mwmr;
     VciSignals<vci_param_int>             signal_int_vci_tgt_iobx;
 
@@ -144,5 +154,9 @@
     VciXicu<vci_param_int>*                           xicu;
 
-    VciMultiDma<vci_param_int>*                       mdma;
+    VciMwmrDma<vci_param_int>*                        mwmr;
+
+    CoprocGcd*                                        gcd;
+    CoprocDct*                                        dct;
+    CoprocCpy*                                        cpy;
 
     VciLocalCrossbar<vci_param_int>*                  int_xbar_d;
@@ -188,5 +202,4 @@
     TsarIobCluster( sc_module_name                     insname,
                     size_t                             nb_procs,   
-                    size_t                             nb_dmas,  
                     size_t                             x,             // x coordinate
                     size_t                             y,             // y coordinate
@@ -205,8 +218,8 @@
                     size_t                             int_memc_tgt_id,
                     size_t                             int_xicu_tgt_id,
-                    size_t                             int_mdma_tgt_id,
+                    size_t                             int_mwmr_tgt_id,
                     size_t                             int_iobx_tgt_id,
                     size_t                             int_proc_ini_id,
-                    size_t                             int_mdma_ini_id,
+                    size_t                             int_mwmr_ini_id,
                     size_t                             int_iobx_ini_id,
 
@@ -231,4 +244,6 @@
                     size_t                             xcu_nb_irq,
 
+                    size_t                             coproc_type,
+
                     const Loader                       &loader,  // loader for XRAM
 
@@ -245,5 +260,4 @@
     void init();
  
-
 };
 
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 959)
+++ trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp	(revision 972)
@@ -15,4 +15,8 @@
 #include "../include/tsar_iob_cluster.h"
 
+#define MWR_COPROC_CPY  0
+#define MWR_COPROC_DCT  1
+#define MWR_COPROC_GCD  2
+
 #define tmpl(x) \
    template<typename vci_param_int      , typename vci_param_ext,\
@@ -26,12 +30,9 @@
 namespace soclib { namespace caba  {
 
-//////////////////////////////////////////////////////////////////////////
-//                 Constructor
-//////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
 tmpl(/**/)::TsarIobCluster(
-//////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////
                     sc_module_name                     insname,
                     size_t                             nb_procs,
-                    size_t                             nb_dmas,
                     size_t                             x_id,
                     size_t                             y_id,
@@ -50,9 +51,9 @@
                     size_t                             int_memc_tgt_id, // local index
                     size_t                             int_xicu_tgt_id, // local index
-                    size_t                             int_mdma_tgt_id, // local index
+                    size_t                             int_mwmr_tgt_id, // local index
                     size_t                             int_iobx_tgt_id, // local index
 
                     size_t                             int_proc_ini_id, // local index
-                    size_t                             int_mdma_ini_id, // local index
+                    size_t                             int_mwmr_ini_id, // local index
                     size_t                             int_iobx_ini_id, // local index
 
@@ -77,4 +78,6 @@
                     size_t                             xcu_nb_out,
 
+                    size_t                             coproc_type,
+
                     const Loader                      &loader,
 
@@ -88,5 +91,6 @@
       p_resetn("resetn")
 {
-    assert( (x_id < xmax) and (y_id < ymax) and "Illegal cluster coordinates");
+    assert( (x_id < xmax) and (y_id < ymax) and 
+    "Error in tsar_iob_cluster : Illegal cluster coordinates");
 
     size_t cluster_id = (x_id<<4) + y_id;
@@ -186,14 +190,57 @@
                      xcu_nb_out);                         // number of output IRQs
 
-    ////////////  MDMA
-    std::ostringstream s_mdma;
-    s_mdma << "mdma_" << x_id << "_" << y_id;
-    mdma = new VciMultiDma<vci_param_int>(
-                     s_mdma.str().c_str(),
+    ////////////  MWMR controller and coprocessor
+    std::ostringstream s_mwmr;
+    std::ostringstream s_copro;
+    s_mwmr << "mwmr_" << x_id << "_" << y_id;
+
+    if ( coproc_type ==  MWR_COPROC_CPY) 
+    {
+        s_copro << "cpy_" << x_id << "_" << y_id;
+        cpy = new CoprocCpy( s_copro.str().c_str(), 64 );       // burst size
+
+        mwmr = new VciMwmrDma<vci_param_int>(
+                     s_mwmr.str().c_str(),
                      mt_int,
-                     IntTab(cluster_id, nb_procs),        // SRCID
-                     IntTab(cluster_id, int_mdma_tgt_id), // TGTID
-                     64,                                  // burst size
-                     nb_dmas);                            // number of IRQs
+                     IntTab(cluster_id, int_mwmr_ini_id), // SRCID
+                     IntTab(cluster_id, int_mwmr_tgt_id), // TGTID
+                     1,                                   // nb to_coproc ports
+                     1,                                   // nb from_coproc ports
+                     1,                                   // nb config registers
+                     0,                                   // nb status registers
+                     64 );                                // burst size (bytes)
+    }
+    if ( coproc_type == MWR_COPROC_DCT ) 
+    {
+        s_copro << "dct_" << x_id << "_" << y_id;
+        dct = new CoprocDct( s_copro.str().c_str(), 64 , 16 );  // burst size / latency
+
+        mwmr = new VciMwmrDma<vci_param_int>(
+                     s_mwmr.str().c_str(),
+                     mt_int,
+                     IntTab(cluster_id, int_mwmr_ini_id), // SRCID
+                     IntTab(cluster_id, int_mwmr_tgt_id), // TGTID
+                     1,                                   // nb to_coproc ports
+                     1,                                   // nb from_coproc ports
+                     1,                                   // nb config registers
+                     0,                                   // nb status registers
+                     64 );                                // burst size (bytes)
+    }
+    if ( coproc_type == MWR_COPROC_GCD ) 
+    {
+        s_copro << "gcd_" << x_id << "_" << y_id;
+        gcd = new CoprocGcd( s_copro.str().c_str(), 64 );       // burst size
+
+        mwmr = new VciMwmrDma<vci_param_int>(
+                     s_mwmr.str().c_str(),
+                     mt_int,
+                     IntTab(cluster_id, int_mwmr_ini_id), // SRCID
+                     IntTab(cluster_id, int_mwmr_tgt_id), // TGTID
+                     2,                                   // nb to_coproc ports
+                     1,                                   // nb from_coproc ports
+                     1,                                   // nb config registers
+                     0,                                   // nb status registers
+                     64 );                                // burst size (bytes)
+    }
 
     ///////////  Direct LOCAL_XBAR(S)
@@ -435,6 +482,6 @@
     int_xbar_d->p_to_target[int_memc_tgt_id]          (signal_int_vci_tgt_memc);
     int_xbar_d->p_to_target[int_xicu_tgt_id]          (signal_int_vci_tgt_xicu);
-    int_xbar_d->p_to_target[int_mdma_tgt_id]          (signal_int_vci_tgt_mdma);
-    int_xbar_d->p_to_initiator[int_mdma_ini_id]       (signal_int_vci_ini_mdma);
+    int_xbar_d->p_to_target[int_mwmr_tgt_id]          (signal_int_vci_tgt_mwmr);
+    int_xbar_d->p_to_initiator[int_mwmr_ini_id]       (signal_int_vci_ini_mwmr);
     for (size_t p = 0; p < nb_procs; p++)
        int_xbar_d->p_to_initiator[int_proc_ini_id + p] (signal_int_vci_ini_proc[p]);
@@ -513,5 +560,5 @@
     {
         if      ( i == 0 )       xicu->p_hwi[i]  (signal_irq_memc);
-        else if ( i <= nb_dmas ) xicu->p_hwi[i]  (signal_irq_mdma[i-1]);
+        else if ( i == 1 )       xicu->p_hwi[i]  (signal_irq_mwmr);
         else                     xicu->p_hwi[i]  (signal_false);
     }
@@ -546,11 +593,62 @@
     xram_ram_wt->p_vci                           (signal_ram_vci_tgt_xram);
 
-    /////////////////////////////////// MDMA
-    mdma->p_clk                                  (this->p_clk);
-    mdma->p_resetn                               (this->p_resetn);
-    mdma->p_vci_target                           (signal_int_vci_tgt_mdma);
-    mdma->p_vci_initiator                        (signal_int_vci_ini_mdma);
-    for (size_t i=0 ; i<nb_dmas ; i++)
-        mdma->p_irq[i]                           (signal_irq_mdma[i]);
+    /////////////////////////////////// GCD coprocessor
+    if ( coproc_type == MWR_COPROC_GCD )
+    {
+        gcd->p_clk                               (this->p_clk);
+        gcd->p_resetn                            (this->p_resetn);
+        gcd->p_opa                               (signal_to_coproc[0]);
+        gcd->p_opb                               (signal_to_coproc[1]);
+        gcd->p_res                               (signal_from_coproc[0]);
+        gcd->p_config                            (signal_config_coproc[0]);
+
+        mwmr->p_clk                              (this->p_clk);
+        mwmr->p_resetn                           (this->p_resetn);
+        mwmr->p_vci_target                       (signal_int_vci_tgt_mwmr);
+        mwmr->p_vci_initiator                    (signal_int_vci_ini_mwmr);
+        mwmr->p_to_coproc[0]                     (signal_to_coproc[0]);
+        mwmr->p_to_coproc[1]                     (signal_to_coproc[1]);
+        mwmr->p_from_coproc[0]                   (signal_from_coproc[0]);
+        mwmr->p_config[0]                        (signal_config_coproc[0]);
+        mwmr->p_irq                              (signal_irq_mwmr);
+    }
+
+    /////////////////////////////////// DCT coprocessor
+    if ( coproc_type == MWR_COPROC_DCT )
+    {
+        dct->p_clk                               (this->p_clk);
+        dct->p_resetn                            (this->p_resetn);
+        dct->p_in                                (signal_to_coproc[0]);
+        dct->p_out                               (signal_from_coproc[0]);
+        dct->p_config                            (signal_config_coproc[0]);
+
+        mwmr->p_clk                              (this->p_clk);
+        mwmr->p_resetn                           (this->p_resetn);
+        mwmr->p_vci_target                       (signal_int_vci_tgt_mwmr);
+        mwmr->p_vci_initiator                    (signal_int_vci_ini_mwmr);
+        mwmr->p_to_coproc[0]                     (signal_to_coproc[0]);
+        mwmr->p_from_coproc[0]                   (signal_from_coproc[0]);
+        mwmr->p_config[0]                        (signal_config_coproc[0]);
+        mwmr->p_irq                              (signal_irq_mwmr);
+    }
+
+    /////////////////////////////////// CPY coprocessor
+    if ( coproc_type == MWR_COPROC_CPY )
+    {
+        cpy->p_clk                               (this->p_clk);
+        cpy->p_resetn                            (this->p_resetn);
+        cpy->p_load                              (signal_to_coproc[0]);
+        cpy->p_store                             (signal_from_coproc[0]);
+        cpy->p_config                            (signal_config_coproc[0]);
+
+        mwmr->p_clk                              (this->p_clk);
+        mwmr->p_resetn                           (this->p_resetn);
+        mwmr->p_vci_target                       (signal_int_vci_tgt_mwmr);
+        mwmr->p_vci_initiator                    (signal_int_vci_ini_mwmr);
+        mwmr->p_to_coproc[0]                     (signal_to_coproc[0]);
+        mwmr->p_from_coproc[0]                   (signal_from_coproc[0]);
+        mwmr->p_config[0]                        (signal_config_coproc[0]);
+        mwmr->p_irq                              (signal_irq_mwmr);
+    }
 
     //////////////////////////// RAM network CMD & RSP routers
@@ -624,5 +722,5 @@
    signal_ram_dspin_cmd_false.write = false;
    signal_ram_dspin_rsp_false.read  = true;
-} // end init
+} 
 
 }}
