Index: trunk/platforms/tsar_generic_iob/genmap.py
===================================================================
--- trunk/platforms/tsar_generic_iob/genmap.py	(revision 708)
+++ trunk/platforms/tsar_generic_iob/genmap.py	(revision 710)
@@ -159,5 +159,5 @@
     cma = mapping.addPeriph( 'CMA', base = cma_base, size = cma_size, ptype = 'CMA', channels = 2*nb_nics )
 
-    fbf = mapping.addPeriph( 'FBF', base = fbf_base, size = fbf_size, ptype = 'FBF', arg1 = 128, arg2 = 128 )
+    fbf = mapping.addPeriph( 'FBF', base = fbf_base, size = fbf_size, ptype = 'FBF', arg = 128 )
 
     rom = mapping.addPeriph( 'ROM', base = rom_base, size = rom_size, ptype = 'ROM' )
@@ -165,24 +165,18 @@
     pic = mapping.addPeriph( 'PIC', base = pic_base, size = pic_size, ptype = 'PIC', channels = 32 )
 
-    mapping.addIrq( pic, index = 0,  isrtype = 'ISR_NIC_RX', channel = 0 )
-    mapping.addIrq( pic, index = 1,  isrtype = 'ISR_NIC_RX', channel = 1 )
-    mapping.addIrq( pic, index = 2,  isrtype = 'ISR_NIC_TX', channel = 0 )
-    mapping.addIrq( pic, index = 3,  isrtype = 'ISR_NIC_TX', channel = 1 )
-
-    mapping.addIrq( pic, index = 4,  isrtype = 'ISR_CMA'   , channel = 0 )
-    mapping.addIrq( pic, index = 5,  isrtype = 'ISR_CMA'   , channel = 1 )
-    mapping.addIrq( pic, index = 6,  isrtype = 'ISR_CMA'   , channel = 2 )
-    mapping.addIrq( pic, index = 7,  isrtype = 'ISR_CMA'   , channel = 3 )
-
-    mapping.addIrq( pic, index = 8,  isrtype = 'ISR_BDV'   , channel = 0 )
-
-    mapping.addIrq( pic, index = 16, isrtype = 'ISR_TTY_RX', channel = 0 )
-    mapping.addIrq( pic, index = 17, isrtype = 'ISR_TTY_RX', channel = 1 )
-    mapping.addIrq( pic, index = 18, isrtype = 'ISR_TTY_RX', channel = 2 )
-    mapping.addIrq( pic, index = 19, isrtype = 'ISR_TTY_RX', channel = 3 )
-    mapping.addIrq( pic, index = 20, isrtype = 'ISR_TTY_RX', channel = 4 )
-    mapping.addIrq( pic, index = 21, isrtype = 'ISR_TTY_RX', channel = 5 )
-    mapping.addIrq( pic, index = 22, isrtype = 'ISR_TTY_RX', channel = 6 )
-    mapping.addIrq( pic, index = 23, isrtype = 'ISR_TTY_RX', channel = 7 )
+    mapping.addIrq( pic, index = 0, isrtype = 'ISR_NIC_RX', channel = 0 )
+    mapping.addIrq( pic, index = 1, isrtype = 'ISR_NIC_RX', channel = 1 )
+
+    mapping.addIrq( pic, index = 2, isrtype = 'ISR_NIC_TX', channel = 0 )
+    mapping.addIrq( pic, index = 3, isrtype = 'ISR_NIC_TX', channel = 1 )
+
+    mapping.addIrq( pic, index = 4, isrtype = 'ISR_CMA'   , channel = 0 )
+    mapping.addIrq( pic, index = 5, isrtype = 'ISR_CMA'   , channel = 1 )
+    mapping.addIrq( pic, index = 6, isrtype = 'ISR_CMA'   , channel = 2 )
+    mapping.addIrq( pic, index = 7, isrtype = 'ISR_CMA'   , channel = 3 )
+
+    mapping.addIrq( pic, index = 8, isrtype = 'ISR_BDV'   , channel = 0 )
+
+    mapping.addIrq( pic, index = 9, isrtype = 'ISR_TTY_RX', channel = 0 )
 
     ### hardware components replicated in all clusters   
@@ -202,9 +196,5 @@
 
             xcu = mapping.addPeriph( 'XCU', base = xcu_base + offset, size = xcu_size, 
-                                     ptype = 'XCU', channels = nb_procs * irq_per_proc, 
-                                     arg1 = 16, arg2 = 16, arg3 = 16 )
-
-            # MMC IRQ replicated in all clusters
-            mapping.addIrq( xcu, index = 0, isrtype = 'ISR_MMC' )
+                                     ptype = 'XCU', channels = nb_procs * irq_per_proc, arg = 16 )
 
             # DMA IRQs replicated in all clusters
@@ -212,4 +202,7 @@
                 mapping.addIrq( xcu, index = (p+1), isrtype = 'ISR_DMA', channel = p )
             
+            # MMC IRQ replicated in all clusters
+            mapping.addIrq( xcu, index = 0, isrtype = 'ISR_MMC' )
+
             # processors
             for p in xrange ( nb_procs ):
@@ -273,7 +266,7 @@
                        vtype = 'PERI', x = 0, y = 0, pseg = 'ROM', identity = True )
 
-    ### Global vsegs for replicated peripherals, and for scheduler 
-    ### Note: one vseg per cluster: the vseg name is indexed by (x,y)
-    ### the vseg base address is incremented by (cluster_xy * 0x10000)
+    ### Global vsegs for replicated peripherals, and for scheduler. 
+    ### A replicated vseg is replicated in all clusters: vseg name is indexed by (x,y),
+    ### and vseg base address is incremented by (cluster_xy * 0x10000)
 
     mapping.addGlobal( 'seg_xcu'  , xcu_base          , xcu_size         , '__W_', 
Index: trunk/platforms/tsar_generic_iob/top.cpp
===================================================================
--- trunk/platforms/tsar_generic_iob/top.cpp	(revision 708)
+++ trunk/platforms/tsar_generic_iob/top.cpp	(revision 710)
@@ -82,5 +82,5 @@
 // - Y_SIZE           : number of clusters in a column
 // - NB_PROCS_MAX     : number of processors per cluster (power of 2)
-// - NB_TTY_CHANNELS  : number of TTY channels in I/O network (up to 16)
+// - NB_TTY_CHANNELS  : number of TTY channels in I/O network (must be 1)
 // - NB_NIC_CHANNELS  : number of NIC channels in I/O network (up to 2)
 // - NB_CMA_CHANNELS  : number of CMA channels in I/O network (up to 4)
@@ -415,4 +415,7 @@
          {
             debug_memc_id = atoi(argv[n+1]);
+
+std::cout << "@@@@@@@@@@@@@@ MEMCID = " << debug_memc_id << std::endl;
+
             size_t x = debug_memc_id >> 4;
             size_t y = debug_memc_id & 0xF;
@@ -497,6 +500,6 @@
            "The NB_DMA_CHANNELS parameter cannot be larger than 4" );
 
-   assert( (NB_TTY_CHANNELS < 16) and
-           "The NB_TTY_CHANNELS parameter must be smaller than 16" );
+   assert( (NB_TTY_CHANNELS == 1) and
+           "The NB_TTY_CHANNELS parameter must be 1" );
 
    assert( (NB_NIC_CHANNELS == 2) and
@@ -507,6 +510,6 @@
              << " - YMAX            = " << YMAX << std::endl
              << " - NB_PROCS_MAX    = " << NB_PROCS_MAX <<  std::endl
+             << " - NB_TTY_CHANNELS = " << NB_TTY_CHANNELS <<  std::endl
              << " - NB_DMA_CHANNELS = " << NB_DMA_CHANNELS <<  std::endl
-             << " - NB_TTY_CHANNELS = " << NB_TTY_CHANNELS <<  std::endl
              << " - NB_NIC_CHANNELS = " << NB_NIC_CHANNELS <<  std::endl
              << " - MEMC_WAYS       = " << MEMC_WAYS << std::endl
@@ -845,8 +848,7 @@
     sc_signal<bool>                   signal_irq_false;
     sc_signal<bool>                   signal_irq_bdev;
+    sc_signal<bool>                   signal_irq_mtty_rx;
     sc_signal<bool>                   signal_irq_mnic_rx[NB_NIC_CHANNELS];
     sc_signal<bool>                   signal_irq_mnic_tx[NB_NIC_CHANNELS];
-    sc_signal<bool>                   signal_irq_mtty_rx[NB_TTY_CHANNELS];
-//  sc_signal<bool>                   signal_irq_mtty_tx[NB_TTY_CHANNELS];
     sc_signal<bool>                   signal_irq_cdma[NB_CMA_CHANNELS];
 
@@ -1028,6 +1030,5 @@
                                        IntTab(0, IOPI_LOCAL_SRCID),
                                        IntTab(0, IOX_IOPI_TGT_ID),
-                                       32,          // number of input HWI             
-                                       5000 );      // period between WTI
+                                       32 );        // number of input HWI             
    // Clusters 
    TsarIobCluster<vci_param_int,
@@ -1188,8 +1189,5 @@
     mtty->p_resetn                                       (signal_resetn);
     mtty->p_vci                                          (signal_vci_tgt_mtty);
-    for ( size_t i=0 ; i<NB_TTY_CHANNELS ; i++ )
-    {
-        mtty->p_irq[i]              	                   (signal_irq_mtty_rx[i]);
-    }
+    mtty->p_irq[0]              	                        (signal_irq_mtty_rx);
 
     std::cout << "  - MTTY connected" << std::endl;
@@ -1221,9 +1219,5 @@
        else if(i < 8)                  iopi->p_hwi[i] (signal_irq_false);
        else if(i == 8)                 iopi->p_hwi[i] (signal_irq_bdev);
-       else if(i < 16)                 iopi->p_hwi[i] (signal_irq_false);
-       else if(i < 16+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_rx[i-16]);
-       else if(i < 24)                 iopi->p_hwi[i] (signal_irq_false);
-       else if(i < 24+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_false);
-//     else if(i < 24+NB_TTY_CHANNELS) iopi->p_hwi[i] (signal_irq_mtty_tx[i-24]);
+       else if(i == 9)                 iopi->p_hwi[i] (signal_irq_mtty_rx);
        else                            iopi->p_hwi[i] (signal_irq_false);
     }
@@ -1615,6 +1609,6 @@
 //              signal_vci_ini_cdma.print_trace("[SIG]IOX_CDMA_INI");
 
-                brom->print_trace();
-                signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT");
+//              brom->print_trace();
+//              signal_vci_tgt_brom.print_trace("[SIG]IOX_BROM_TGT");
 
 //              mtty->print_trace();
@@ -1634,6 +1628,6 @@
 
                 // interrupts
-                if (signal_irq_bdev)       std::cout << "### IRQ_BDEV ACTIVE" << std::endl;
-                if (signal_irq_mtty_rx[0]) std::cout << "### IRQ_MTTY ACTIVE" << std::endl;
+                if (signal_irq_bdev)    std::cout << "### IRQ_BDEV ACTIVE" << std::endl;
+                if (signal_irq_mtty_rx) std::cout << "### IRQ_MTTY ACTIVE" << std::endl;
             }
         }
