Index: /soft/giet_vm/giet_xml/mapping_info.h
===================================================================
--- /soft/giet_vm/giet_xml/mapping_info.h	(revision 521)
+++ /soft/giet_vm/giet_xml/mapping_info.h	(revision 522)
@@ -8,20 +8,19 @@
 // 
 // 1) a description of a clusterized hardware architecture.
-// The number of cluster is variable (can be one). The number of processors
-// per cluster is variable (can be one). The number of peripherals per cluser
-// and coprocessor per cluster is variable. The number of physical memory
-// banks per cluster is variable.
+// The number of cluster is variable (can be one). 
+// The number of processors per cluster is variable (can be zero). 
+// The number of peripherals per cluster is variable (can be zero),
+// The number of physical memory bank per cluster is variable.
 //
 // 2/ a description of the applications (called vspaces) to be - statically - 
 // launched on the platform. The number of parallel tasks per application is
-// variable (can be one). Multi-Writer/Multi-Reader communication channels
-// betwwen tasks are supported. Each vspace contains a variable number 
-// of virtual segments (called vsegs). The number of virtual space can be one.
+// variable (can be one). Each vspace contains a variable number 
+// of virtual segments (called vsegs). 
 //
 // 3/ the mapping directives: both tasks on processors, and software objects 
-// (called vsegs) on the physical memory banks (called psegs).
+// (vsegs) on the physical memory banks (psegs).
 //
 // The mapping_info data structure is organised as the concatenation of
-// a fixed size header, and 11 variable size arrays:
+// a fixed size header, and 8 variable size arrays:
 //
 // - mapping_cluster_t  cluster[]  
@@ -32,6 +31,4 @@
 // - mapping_proc_t     proc[]  
 // - mapping_irq_t      irq[]   
-// - mapping_coproc_t   coproc[]
-// - mapping_cp_port_t  cp_port[] 
 // - mapping_periph_t   periph[]
 //
@@ -50,6 +47,5 @@
 #define MAPPING_PROC_SIZE     sizeof(mapping_proc_t)
 #define MAPPING_IRQ_SIZE      sizeof(mapping_irq_t)
-#define MAPPING_COPROC_SIZE   sizeof(mapping_coproc_t)
-#define MAPPING_CP_PORT_SIZE  sizeof(mapping_cp_port_t)
+#define MAPPING_PERIPH_SIZE   sizeof(mapping_periph_t)
 
 #define C_MODE_MASK  0b1000   // cacheable
@@ -86,15 +82,17 @@
 };
 
+
 enum psegType 
 {
     PSEG_TYPE_RAM  = 0,
-    PSEG_TYPE_ROM  = 1,      // deprecated => you should use PSEG_TYPE_PERI  
     PSEG_TYPE_PERI = 2,
 };
 
-// The enum definitions for psegType and periphType must be kept
-// consistent with the definitions in the xml_driver.c file...
-
-enum periphType 
+
+////////////////////////////////////////////////////////////////////
+// These enum must be coherent with the values in
+// xml_driver.c / xml_parser.c / mapping.py
+///////////////////////////////////////////////////////////////////
+enum periphTypes
 {
     PERIPH_TYPE_CMA       = 0,
@@ -117,18 +115,28 @@
 };
 
-enum periphSubtype 
-{
-    PERIPH_SUBTYPE_BDV       = 0,
-    PERIPH_SUBTYPE_HBA       = 1,
-    PERIPH_SUBTYPE_SPI       = 2,
-    PERIPH_SUBTYPE_NONE      = 3,
-};
-
-enum mwmrPortDirection 
-{
-    PORT_TO_COPROC   = 0, // status register
-    PORT_FROM_COPROC = 1, // config register
-};
-
+enum iocTypes 
+{
+    IOC_SUBTYPE_BDV    = 0,
+    IOC_SUBTYPE_HBA    = 1,
+    IOC_SUBTYPE_SPI    = 2,
+    IOC_SUBTYPE_NONE   = 3,
+};
+
+enum mwrTypes
+{
+    MWR_SUBTYPE_GCD       = 0,
+    MWR_SUBTYPE_DCT       = 1,
+};
+
+//////////////////////////////////////////////////////////
+// This enum must be coherent with the values in 
+// mwr_driver.h                
+//////////////////////////////////////////////////////////
+enum MwmrDmaModes
+{
+    MODE_MWMR             = 0,
+    MODE_DMA_IRQ          = 1,
+    MODE_DMA_NO_IRQ       = 2,
+};
 
 ////////////////////////////////////////////////////////
@@ -149,8 +157,6 @@
     unsigned int vsegs;              // total number of virtual segments
     unsigned int tasks;              // total number of tasks 
-    unsigned int procs;              // total number of procs 
+    unsigned int procs;              // total number of processors 
     unsigned int irqs;               // total number of irqs 
-    unsigned int coprocs;            // total number of coprocs 
-    unsigned int cp_ports;           // total number of cp_ports 
     unsigned int periphs;            // total number of peripherals 
     char name[32];                   // mapping name
@@ -165,14 +171,11 @@
 
     unsigned int    psegs;           // number of psegs in cluster
-    unsigned int    pseg_offset;     // global index of first pseg in psegs 
+    unsigned int    pseg_offset;     // global index of first pseg in cluster
 
     unsigned int    procs;           // number of processors in cluster
-    unsigned int    proc_offset;     // global index of first proc in procs 
+    unsigned int    proc_offset;     // global index of first proc in cluster
  
-    unsigned int    coprocs;         // number of coprocessors in cluster
-    unsigned int    coproc_offset;   // global index of first coproc in coprocs
-
     unsigned int    periphs;         // number of peripherals in cluster
-    unsigned int    periph_offset;   // global index of first coproc in periphs
+    unsigned int    periph_offset;   // global index of first coproc in cluster
 } mapping_cluster_t;
 
@@ -241,23 +244,4 @@
 
 ////////////////////////////////////////////////////////
-typedef struct __attribute__((packed))  mapping_coproc_s 
-{
-    char            name[32];        // coprocessor name (probablement inutile AG)
-    unsigned int    psegid;          // global pseg index 
-    unsigned int    ports;           // number of MWMR ports used by coprocessor
-    unsigned int    port_offset;     // global index of first MWMR port 
-} mapping_coproc_t;
-
-
-/////////////////////////////////////////////////////////
-typedef struct __attribute__((packed))  mapping_cp_port_s 
-{
-    unsigned int    direction;       // TO_COPROC == 0 / FROM_COPROC == 1
-    unsigned int    vspaceid;        // index of the vspace containing MWMR channel
-    unsigned int    mwmr_vseg_id;    // global index of vseg containing MWMR channel
-} mapping_cp_port_t;
-
-
-////////////////////////////////////////////////////////
 typedef struct __attribute__((packed))  mapping_periph_s 
 {
@@ -266,5 +250,8 @@
     unsigned int    psegid;          // pseg index in cluster
     unsigned int    channels;        // number of channels
-    unsigned int    arg;             // argument depending on peripheral type
+    unsigned int    arg0;            // semantic depends on peripheral type
+    unsigned int    arg1;            // semantic depends on peripheral type
+    unsigned int    arg2;            // semantic depends on peripheral type
+    unsigned int    arg3;            // semantic depends on peripheral type
     unsigned int    irqs;            // number of input IRQs (for XCU or PIC)
     unsigned int    irq_offset;      // index of first IRQ 
Index: /soft/giet_vm/giet_xml/xml_driver.c
===================================================================
--- /soft/giet_vm/giet_xml/xml_driver.c	(revision 521)
+++ /soft/giet_vm/giet_xml/xml_driver.c	(revision 522)
@@ -24,5 +24,5 @@
     { 
         "ELF",        // binary code generated by GCC
-        "BLOB",       // binary code generated by GCC
+        "BLOB",       // binary 
         "PTAB",       // page table 
         "PERI",       // hardware component
@@ -52,5 +52,6 @@
     };
 
-    // mnemonics defined in irq_handler.h
+    // These mnemonics must be consistent with values in
+    // irq_handler.h / irq_handler.c / mapping.py
     const char * isr_type[] =
     {
@@ -68,7 +69,13 @@
         "ISR_DMA",
         "ISR_SPI",
-    };
-
-    // mnemonics defined in mapping_info.h
+        "ISR_MWR",
+    };
+
+    const char * mwr_subtype[] =
+    {
+        "GCD",
+        "DCT",
+    };
+
     const char * periph_type[] =
     {
@@ -96,10 +103,4 @@
         "SPI",
         "NONE",
-    };
-
-    const char * port_direction[] =
-    {
-        "TO_COPROC",
-        "FROM_COPROC",
     };
 
@@ -131,6 +132,4 @@
     unsigned int proc_id;
     unsigned int irq_id;
-    unsigned int coproc_id;
-    unsigned int port_id;
     unsigned int periph_id;
 
@@ -142,6 +141,4 @@
     mapping_proc_t * proc;
     mapping_irq_t * irq;    
-    mapping_coproc_t * coproc;
-    mapping_cp_port_t * cp_port;
     mapping_periph_t * periph;
 
@@ -195,6 +192,6 @@
             MAPPING_PROC_SIZE * header->procs);
 
-    // computes the base address for coprocs array 
-    coproc = (mapping_coproc_t *) ((char *) header +
+    // computes the base address for periphs array 
+    periph = (mapping_periph_t *) ((char *) header +
             MAPPING_HEADER_SIZE +
             MAPPING_CLUSTER_SIZE * header->x_size * header->y_size +
@@ -205,29 +202,4 @@
             MAPPING_PROC_SIZE * header->procs +
             MAPPING_IRQ_SIZE * header->irqs);
-
-    // computes the base address for cp_ports array 
-    cp_port = (mapping_cp_port_t *) ((char *) header +
-            MAPPING_HEADER_SIZE +
-            MAPPING_CLUSTER_SIZE * header->x_size * header->y_size +
-            MAPPING_PSEG_SIZE * header->psegs +
-            MAPPING_VSPACE_SIZE * header->vspaces +
-            MAPPING_VSEG_SIZE * header->vsegs +
-            MAPPING_TASK_SIZE * header->tasks +
-            MAPPING_PROC_SIZE * header->procs +
-            MAPPING_IRQ_SIZE * header->irqs +
-            MAPPING_COPROC_SIZE * header->coprocs);
-
-    // computes the base address for periphs array 
-    periph = (mapping_periph_t *) ((char *) header +
-            MAPPING_HEADER_SIZE +
-            MAPPING_CLUSTER_SIZE * header->x_size * header->y_size +
-            MAPPING_PSEG_SIZE * header->psegs +
-            MAPPING_VSPACE_SIZE * header->vspaces +
-            MAPPING_VSEG_SIZE * header->vsegs +
-            MAPPING_TASK_SIZE * header->tasks +
-            MAPPING_PROC_SIZE * header->procs +
-            MAPPING_IRQ_SIZE * header->irqs +
-            MAPPING_COPROC_SIZE * header->coprocs +
-            MAPPING_CP_PORT_SIZE * header->cp_ports);
 
     ///////////////////////// header /////////////////////////////////////////////
@@ -276,24 +248,4 @@
         }
 
-        ///////////////////// coprocessors ///////////////////////////////////////////
-
-        for (coproc_id = cluster[cluster_id].coproc_offset;
-             coproc_id < cluster[cluster_id].coproc_offset + cluster[cluster_id].coprocs;
-             coproc_id++) 
-        {
-            fprintf(fpout, "            <coproc name=\"%s\"", coproc[coproc_id].name);
-            fprintf(fpout, " psegname=\"%s\" >\n", pseg[coproc[coproc_id].psegid].name);
-            for (port_id = coproc[coproc_id].port_offset;
-                 port_id < coproc[coproc_id].port_offset + coproc[coproc_id].ports;
-                 port_id++) 
-            {
-                unsigned int vseg_id = cp_port[port_id].mwmr_vseg_id; 
-                fprintf(fpout, "             <port direction=\"%s\"", port_direction[cp_port[port_id].direction]);
-                fprintf(fpout, " vspacename=\"%s\"", vspace[cp_port[port_id].vspaceid].name);
-                fprintf(fpout, " vsegname=\"%s\" />\n",  vseg[vseg_id].name);
-            }
-            fprintf(fpout, "            </coproc>\n" );
-        }
-
         ///////////////////// periphs  ///////////////////////////////////////////////
 
@@ -307,7 +259,13 @@
                 fprintf(fpout, " subtype=\"%s\"", ioc_subtype[periph[periph_id].subtype]);
 
+            if (periph[periph_id].type == PERIPH_TYPE_MWR) 
+                fprintf(fpout, " subtype=\"%s\"", mwr_subtype[periph[periph_id].subtype]);
+
             fprintf(fpout, " psegname=\"%s\"", pseg[periph[periph_id].psegid].name);
             fprintf(fpout, " channels=\"%d\"",  periph[periph_id].channels);
-            fprintf(fpout, " arg=\"%d\" >\n",  periph[periph_id].arg);
+            fprintf(fpout, " arg0=\"%d\" >\n",  periph[periph_id].arg0);
+            fprintf(fpout, " arg1=\"%d\" >\n",  periph[periph_id].arg1);
+            fprintf(fpout, " arg2=\"%d\" >\n",  periph[periph_id].arg2);
+            fprintf(fpout, " arg3=\"%d\" >\n",  periph[periph_id].arg3);
             if ( (periph[periph_id].type == PERIPH_TYPE_PIC) ||
                  (periph[periph_id].type == PERIPH_TYPE_XCU) )
Index: /soft/giet_vm/giet_xml/xml_parser.c
===================================================================
--- /soft/giet_vm/giet_xml/xml_parser.c	(revision 521)
+++ /soft/giet_vm/giet_xml/xml_parser.c	(revision 522)
@@ -34,6 +34,4 @@
 #define MAX_PROCS      1024
 #define MAX_IRQS       8192
-#define MAX_COPROCS    4096
-#define MAX_CP_PORTS   8192
 #define MAX_PERIPHS    8192
 
@@ -52,6 +50,4 @@
 mapping_proc_t *     proc[MAX_PROCS];        // proc array
 mapping_irq_t *      irq[MAX_IRQS];          // irq array
-mapping_coproc_t *   coproc[MAX_COPROCS];    // coproc array
-mapping_cp_port_t *  cp_port[MAX_CP_PORTS];  // coproc port array
 mapping_periph_t *   periph[MAX_PERIPHS];    // peripheral array
 
@@ -69,10 +65,4 @@
 unsigned int irq_loc_index  = 0;
 
-unsigned int coproc_index = 0;
-unsigned int coproc_loc_index = 0;
-
-unsigned int cp_port_index = 0;
-unsigned int cp_port_loc_index = 0;
-
 unsigned int periph_index = 0;
 unsigned int periph_loc_index = 0;
@@ -83,48 +73,4 @@
 unsigned int task_index = 0;
 unsigned int task_loc_index = 0;
-
-
-//////////////////////////////
-// for replicated peripheral
-//////////////////////////////
-char found_timer = 0;
-char found_icu   = 0;
-char found_xcu   = 0;
-char found_dma   = 0;
-char found_mmc   = 0;
-
-/*
-////////////////////////////////////////////////////////////////////////
-// These variables are used to generate the hard_config.h file.
-////////////////////////////////////////////////////////////////////////
-
-
-unsigned int tim_channels     = 0; // number of user timers  (per cluster)
-unsigned int dma_channels     = 0; // number of DMA channels (per cluster)
-
-unsigned int tty_channels     = 0; // number of TTY channels
-unsigned int ioc_channels     = 0; // number of HBA channels
-unsigned int nic_channels     = 0; // number of NIC channels
-unsigned int cma_channels     = 0; // number of CMA channels 
-unsigned int pic_channels     = 0; // number of PIC channels
-
-unsigned int use_iob          = 0; // using IOB component
-unsigned int use_pic          = 0; // using PIC component
-unsigned int use_xcu          = 0; // using XCU (not ICU)
-unsigned int use_fbf          = 0; // using Frame Buffer 
-
-// These variables define the IOC peripheral subtype
-
-unsigned int use_hba          = 0; // using SoClib AHCI controller
-unsigned int use_bdv          = 0; // using SoCLIB block device controller
-unsigned int use_spi          = 0; // using SDCard-SPI
-
-////////////////////////////////////////////////////////////////
-// These variables are used to generate the giet_vseg.ld file
-////////////////////////////////////////////////////////////////
-
-unsigned int periph_vbase_array[PERIPH_TYPE_MAX_VALUE] 
-         = { [0 ... (PERIPH_TYPE_MAX_VALUE - 1)] = 0xFFFFFFFF };
-*/
 
 
@@ -967,59 +913,4 @@
 
 
-
-////////////////////////////////////////
-void cpPortNode(xmlTextReaderPtr reader) 
-{
-    char * str;
-    unsigned int ok;
-
-    if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_END_ELEMENT) return;
-
-    if (cp_port_index >= MAX_CP_PORTS) 
-    {
-        printf("[XML ERROR] The number of ports (for coprocs) is larger than %d\n", 
-                 MAX_CP_PORTS);
-        exit(1);
-    }
-
-#if XML_PARSER_DEBUG
-printf("\n  port %d\n", cp_port_index);
-#endif
-
-    cp_port[cp_port_index] = (mapping_cp_port_t *) malloc(sizeof(mapping_cp_port_t));
-
-    ///////// get direction attribute
-    str = getStringValue(reader, "direction", &ok);
-    if (ok) 
-    {
-#if XML_PARSER_DEBUG
-printf("      direction = %s\n", str);
-#endif
-        if (strcmp(str, "TO_COPROC")   ==  0) 
-        {
-            cp_port[cp_port_index]->direction = PORT_TO_COPROC;
-        }
-        else if (strcmp(str, "FROM_COPROC") ==  0) 
-        {
-            cp_port[cp_port_index]->direction = PORT_FROM_COPROC;
-        }
-        else 
-        {
-            printf("[XML ERROR] illegal <direction> for cp_port %d in cluster %d\n",
-                    cp_port_index, cluster_index);
-            exit(1);
-        }
-    }  
-    else 
-    {
-        printf("[XML ERROR] missing <direction> for cp_port %d in cluster %d\n",
-                cp_port_index, cluster_index);
-        exit(1);
-    }
-
-    cp_port_index++;
-    cp_port_loc_index++;
-} // end cpPortNode()
-
 ////////////////////////////////////////
 void periphNode(xmlTextReaderPtr reader) 
@@ -1059,16 +950,42 @@
     }
 
-    ///////// get arg attribute (optionnal : 0 if missing)
-    value = getIntValue(reader, "arg", &ok);
-    if (ok) 
-    {
-#if XML_PARSER_DEBUG
-printf("      arg         = %d\n", value);
-#endif
-        periph[periph_index]->arg = value;
-    }
-    else 
-    {
-        periph[periph_index]->arg = 1;
+    ///////// get arg0 attribute (optionnal : undefined if missing)
+    value = getIntValue(reader, "arg0", &ok);
+    if (ok) 
+    {
+#if XML_PARSER_DEBUG
+printf("      arg0        = %d\n", value);
+#endif
+        periph[periph_index]->arg0 = value;
+    }
+
+    ///////// get arg1 attribute (optionnal : undefined if missing)
+    value = getIntValue(reader, "arg1", &ok);
+    if (ok) 
+    {
+#if XML_PARSER_DEBUG
+printf("      arg1        = %d\n", value);
+#endif
+        periph[periph_index]->arg1 = value;
+    }
+
+    ///////// get arg2 attribute (optionnal : undefined if missing)
+    value = getIntValue(reader, "arg2", &ok);
+    if (ok) 
+    {
+#if XML_PARSER_DEBUG
+printf("      arg2        = %d\n", value);
+#endif
+        periph[periph_index]->arg2 = value;
+    }
+
+    ///////// get arg3 attribute (optionnal : undefined if missing)
+    value = getIntValue(reader, "arg3", &ok);
+    if (ok) 
+    {
+#if XML_PARSER_DEBUG
+printf("      arg3        = %d\n", value);
+#endif
+        periph[periph_index]->arg3 = value;
     }
 
@@ -1108,15 +1025,17 @@
 #endif
         if      (strcmp(str, "CMA" ) == 0) periph[periph_index]->type = PERIPH_TYPE_CMA;
+        else if (strcmp(str, "DMA" ) == 0) periph[periph_index]->type = PERIPH_TYPE_DMA;
         else if (strcmp(str, "FBF" ) == 0) periph[periph_index]->type = PERIPH_TYPE_FBF;
         else if (strcmp(str, "IOB" ) == 0) periph[periph_index]->type = PERIPH_TYPE_IOB;
         else if (strcmp(str, "IOC" ) == 0) periph[periph_index]->type = PERIPH_TYPE_IOC;
+        else if (strcmp(str, "MMC" ) == 0) periph[periph_index]->type = PERIPH_TYPE_MMC;
+        else if (strcmp(str, "MWR" ) == 0) periph[periph_index]->type = PERIPH_TYPE_MWR;
         else if (strcmp(str, "NIC" ) == 0) periph[periph_index]->type = PERIPH_TYPE_NIC;
         else if (strcmp(str, "ROM" ) == 0) periph[periph_index]->type = PERIPH_TYPE_ROM;
         else if (strcmp(str, "SIM" ) == 0) periph[periph_index]->type = PERIPH_TYPE_SIM;
+        else if (strcmp(str, "SIM" ) == 0) periph[periph_index]->type = PERIPH_TYPE_TIM;
         else if (strcmp(str, "TTY" ) == 0) periph[periph_index]->type = PERIPH_TYPE_TTY;
+        else if (strcmp(str, "XCU" ) == 0) periph[periph_index]->type = PERIPH_TYPE_XCU;
         else if (strcmp(str, "PIC" ) == 0) periph[periph_index]->type = PERIPH_TYPE_PIC;
-        else if (strcmp(str, "DMA" ) == 0) periph[periph_index]->type = PERIPH_TYPE_DMA;
-        else if (strcmp(str, "MMC" ) == 0) periph[periph_index]->type = PERIPH_TYPE_MMC;
-        else if (strcmp(str, "XCU" ) == 0) periph[periph_index]->type = PERIPH_TYPE_XCU;
         else if (strcmp(str, "DROM") == 0) periph[periph_index]->type = PERIPH_TYPE_DROM;
         else
@@ -1138,13 +1057,38 @@
 #endif
             if      (strcmp(subtype, "BDV") == 0) 
-            periph[periph_index]->subtype = PERIPH_SUBTYPE_BDV;
+            periph[periph_index]->subtype = IOC_SUBTYPE_BDV;
             else if (strcmp(subtype, "HBA") == 0) 
-            periph[periph_index]->subtype = PERIPH_SUBTYPE_HBA;
+            periph[periph_index]->subtype = IOC_SUBTYPE_HBA;
             else if (strcmp(subtype, "SPI") == 0) 
-            periph[periph_index]->subtype = PERIPH_SUBTYPE_SPI;
+            periph[periph_index]->subtype = IOC_SUBTYPE_SPI;
         }
         else
         {
             printf("[XML ERROR] illegal subtype for IOC peripheral\n");
+            exit(1);
+        }
+    }
+    else
+    {
+        periph[periph_index]->subtype = 0XFFFFFFFF;
+    }
+
+    ////////// get subtype if MWR
+    if (periph[periph_index]->type == PERIPH_TYPE_MWR )
+    {
+        char* subtype = getStringValue(reader, "subtype", &ok);
+        if (ok)
+        {
+#if XML_PARSER_DEBUG
+printf("      subtype     = %s\n", str);
+#endif
+            if      (strcmp(subtype, "GCD") == 0) 
+            periph[periph_index]->subtype = MWR_SUBTYPE_GCD;
+            else if (strcmp(subtype, "DCT") == 0) 
+            periph[periph_index]->subtype = MWR_SUBTYPE_DCT;
+        }
+        else
+        {
+            printf("[XML ERROR] illegal subtype for MWR peripheral\n");
             exit(1);
         }
@@ -1203,107 +1147,4 @@
 } // end periphNode
 
-////////////////////////////////////////
-void coprocNode(xmlTextReaderPtr reader) 
-{
-    char * str;
-    unsigned int ok;
-
-    cp_port_loc_index = 0;
-
-    if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_END_ELEMENT) return;
-
-    if (coproc_index >= MAX_COPROCS) 
-    {
-        printf("[XML ERROR] The number of coprocs is larger than %d\n", MAX_COPROCS);
-        exit(1);
-    }
-
-#if XML_PARSER_DEBUG
-printf("\n  coproc %d\n", coproc_index);
-#endif
-
-    coproc[coproc_index] = (mapping_coproc_t *) malloc(sizeof(mapping_coproc_t));
-
-    /////////// get name attribute 
-    str = getStringValue(reader, "name", &ok);
-    if (ok) 
-    {
-#if XML_PARSER_DEBUG
-printf("      name = %s\n", str);
-#endif
-        strncpy(coproc[coproc_index]->name, str, 31);
-    }
-    else 
-    {
-        printf("[XML ERROR] illegal or missing <name> for coproc %d in cluster %d\n",
-                coproc_index, cluster_index);
-        exit(1);
-    }
-
-    /////////// get psegname attribute 
-    str = getStringValue(reader, "psegname", &ok);
-    if (ok == 0) 
-    {
-        printf("[XML ERROR] illegal or missing <psegname> for coproc %d in cluster %d\n", 
-                coproc_index, cluster_index);
-        exit(1);
-    }
-
-    /////////// set psegid attribute
-    int index = getPsegId( cluster[cluster_index]->x, cluster[cluster_index]->y, str);
-    if (index >= 0) 
-    {
-#if XML_PARSER_DEBUG
-printf("      clusterid = %d\n", cluster_index);
-printf("      psegname  = %s\n", str);
-printf("      psegid    = %d\n", index);
-#endif
-        coproc[coproc_index]->psegid = index;
-        assert(pseg[index]->type == PSEG_TYPE_PERI && 
-        "coproc psegname attribute must refer to a pseg of type PERI" );
-    }
-    else 
-    {
-        printf("[XML ERROR] pseg not found for coproc %d / clusterid = %d / psegname = %s\n", 
-                coproc_index, cluster_index, str );
-        exit(1);
-    }  
-
-    ////////// set port_offset 
-    coproc[coproc_index]->port_offset = cp_port_index;
-
-#if XML_PARSER_DEBUG
-printf("      port_offset = %d\n", cp_port_index);
-#endif
-
-    int status = xmlTextReaderRead(reader);
-    while (status == 1) 
-    {
-        const char * tag = (const char *) xmlTextReaderConstName(reader);
-
-        if (strcmp(tag, "port") == 0 ) 
-        {
-            cpPortNode(reader);
-        }
-        else if (strcmp(tag, "#text")    == 0 ) { }
-        else if (strcmp(tag, "#comment") == 0 ) { }
-        else if (strcmp(tag, "coproc") == 0 ) 
-        {
-            coproc[coproc_index]->ports = cp_port_loc_index;
-            cluster[cluster_index]->coprocs++;
-            coproc_loc_index++;
-            coproc_index++;
-            return;
-        }
-        else 
-        {
-            printf("[XML ERROR] Unknown tag %s", tag);
-            exit(1);
-        }
-        status = xmlTextReaderRead(reader);
-    }
-} // end coprocNode()
-
-
 //////////////////////////////////////
 void procNode(xmlTextReaderPtr reader) 
@@ -1455,11 +1296,4 @@
     coproc_loc_index = 0;
     periph_loc_index = 0;
-
-    // for replicated periph
-    found_timer = 0;
-    found_icu   = 0;
-    found_xcu   = 0;
-    found_dma   = 0;
-    found_mmc   = 0;
 
     if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_END_ELEMENT)  return;
@@ -1578,5 +1412,4 @@
             header->irqs = irq_index;
             header->coprocs = coproc_index;
-            header->cp_ports = cp_port_index;
             header->periphs = periph_index;
             return;
@@ -1838,5 +1671,4 @@
     header->irqs      = 0;
     header->coprocs   = 0;
-    header->cp_ports  = 0;
     header->periphs   = 0;
 
@@ -1965,6 +1797,4 @@
     //building coprocs array
     BuildTable(fdout, "coproc", coproc_index, sizeof(mapping_coproc_t), (char **) coproc);
-    //building cp_ports array
-    BuildTable(fdout, "cp_port", cp_port_index, sizeof(mapping_cp_port_t),(char **) cp_port);
     //building periphs array
     BuildTable(fdout, "periph", periph_index, sizeof(mapping_periph_t), (char **) periph);
