Index: trunk/platforms/tsar_generic_xbar/top.cpp
===================================================================
--- trunk/platforms/tsar_generic_xbar/top.cpp	(revision 378)
+++ trunk/platforms/tsar_generic_xbar/top.cpp	(revision 379)
@@ -16,4 +16,5 @@
 // - It uses the vci_mem_cache
 // - It contains one vci_xicu and one vci_multi_dma per cluster.
+// - It contains one vci_simple ram per cluster to model the L3 cache.
 //
 // All clusters are identical, but the cluster containing address
@@ -27,5 +28,5 @@
 // It is build with one single component implementing a cluster:
 // The Tsarv4ClusterMmu component is defined in files
-// tsarv4_cluster_mmu.* (with * = cpp, h, sd)
+// tsar_xbar_cluster.* (with * = cpp, h, sd)
 //
 // The IRQs are connected to XICUs as follow:
@@ -157,6 +158,6 @@
 #define BDEV_IMAGE_NAME       "giet_vm/display/images.raw"
 
-#define NIC_RX_NAME           "giet_vm/nic/rx_data.txt"
-#define NIC_TX_NAME           "giet_vm/nic/tx_data.txt"
+#define NIC_RX_NAME           "giet_vm/nic/rx_packets.txt"
+#define NIC_TX_NAME           "giet_vm/nic/tx_packets.txt"
 #define NIC_TIMEOUT           10000
 
@@ -426,42 +427,4 @@
    }
    std::cout << maptabd << std::endl;
-
-/*
-   WE DONT NEED any COHERENCE MAPPING TABLE, AS THE DIRECT NETWORK
-   USES DIRECT ADRESSING (XID,YID,LID)
-
-   // coherence network
-   // - tgtid_c_proc = srcid_c_proc = local procid
-   // - tgtid_c_memc = srcid_c_memc = NB_PROCS_MAX
-   MappingTable maptabc(address_width, 
-         IntTab(x_width + y_width, srcid_width - x_width - y_width), 
-         IntTab(x_width + y_width, srcid_width - x_width - y_width), 
-         0x00FF0000);
-
-   for (size_t x = 0; x < CLUSTER_X; x++)
-   {
-      for (size_t y = 0; y < CLUSTER_Y; y++)
-      {
-         sc_uint<address_width> offset  = cluster(x,y) << (address_width-x_width-y_width);
-
-         // cleanup requests must be routed to the memory cache
-         std::ostringstream sh;
-         sh << "c_seg_memc_" << x << "_" << y;
-         maptabc.add(Segment(sh.str(), (NB_PROCS_MAX << (address_width - srcid_width)) + offset, 
-                     0x10, IntTab(cluster(x,y), NB_PROCS_MAX), false));
-
-         // update & invalidate requests must be routed to the proper processor
-         for ( size_t p = 0 ; p < NB_PROCS_MAX ; p++) 
-         {
-            std::ostringstream sp;
-            sp << "c_seg_proc_" << x << "_" << y << "_" << p;
-            maptabc.add( Segment( sp.str() , (p << (address_width - srcid_width)) + offset , 
-                         0x10 , IntTab(cluster(x,y), p) , false)); 
-         }
-      }
-   }
-   std::cout << maptabc << std::endl;
-
-*/
 
    // external network
@@ -601,5 +564,8 @@
             );
 
+            std::cout << std::endl;
             std::cout << "cluster_" << x << "_" << y << " constructed" << std::endl;
+            std::cout << std::endl;
+
 #if USE_OPENMP
             } // end critical
@@ -796,46 +762,41 @@
          clusters[1][1]->signal_dspin_rsp_brom_t.print_trace("DIRECT rsp_out_brom_1_1");
 */
+        // trace proc[debug_proc_id] 
+        if ( debug_proc_id < (CLUSTER_X * CLUSTER_Y * NB_PROCS_MAX) )
+        {
+            size_t l = debug_proc_id % (CLUSTER_X * CLUSTER_Y) ;
+            size_t y = (debug_proc_id / NB_PROCS_MAX) % CLUSTER_Y ;
+            size_t x = debug_proc_id / (CLUSTER_Y * NB_PROCS_MAX) ;
+
+            std::ostringstream signame;
+            signame << "VCI signal PROC_" << x << "_" << y << "_" << l;
+
+            clusters[x][y]->proc[l]->print_trace();
+            clusters[x][y]->signal_vci_ini_proc[l].print_trace("signame");
+        }
 /*
-         // trace proc[debug_proc_id] 
-         if ( debug_proc_id < (CLUSTER_X * CLUSTER_Y * NB_PROCS_MAX) )
-         {
-             size_t proc_x = debug_proc_id / CLUSTER_Y;
-             size_t proc_y = debug_proc_id % CLUSTER_Y;
-
-             clusters[proc_x][proc_y]->proc[0]->print_trace();
-             clusters[proc_x][proc_y]->signal_vci_ini_proc[0].print_trace("proc_0");
-         }
-
-         // trace memc[debug_memc_id] 
-         if ( debug_memc_id < (CLUSTER_X * CLUSTER_Y) )
-         {
-             size_t memc_x = debug_memc_id / CLUSTER_Y;
-             size_t memc_y = debug_memc_id % CLUSTER_Y;
-
-             clusters[memc_x][memc_y]->memc->print_trace();
-             clusters[memc_x][memc_y]->signal_vci_tgt_memc.print_trace("memc");
-         }
+        // trace memc[debug_memc_id] 
+        if ( debug_memc_id < (CLUSTER_X * CLUSTER_Y) )
+        {
+            size_t x = debug_memc_id / CLUSTER_Y;
+            size_t y = debug_memc_id % CLUSTER_Y;
+
+            std::ostringstream signame;
+            signame << "VCI signal MEMC_" << x << "_" << y;
+
+            clusters[memc_x][memc_y]->memc->print_trace();
+            clusters[memc_x][memc_y]->signal_vci_tgt_memc.print_trace("signame");
+        }
 */
-// clusters[0][0]->signal_vci_tgt_xicu.print_trace("xicu_0_0");
-// clusters[0][1]->signal_vci_tgt_xicu.print_trace("xicu_0_1");
-// clusters[1][0]->signal_vci_tgt_xicu.print_trace("xicu_1_0");
-// clusters[1][1]->signal_vci_tgt_xicu.print_trace("xicu_1_1");
-
-// if ( clusters[1][1]->signal_irq_mdma[0].read() ) 
-//    std::cout << std::endl << " IRQ_DMA_1_1 activated" << std::endl;
-// if ( clusters[1][1]->signal_proc_it[0].read() )
-//    std::cout <<  " IRQ_PROC_1_1 activated" << std::endl << std::endl;
-
-// trace ioc component 
-// size_t io_x   = cluster_io_id / CLUSTER_Y;
-// size_t io_y   = cluster_io_id % CLUSTER_Y;
-// clusters[io_x][io_y]->bdev->print_trace();
-// clusters[io_x][io_y]->signal_vci_tgt_bdev.print_trace("bdev_tgt  ");
-// clusters[io_x][io_y]->signal_vci_ini_bdev.print_trace("bdev_ini  ");
-
-// clusters[1][1]->mdma->print_trace();
-// clusters[1][1]->signal_vci_tgt_mdma.print_trace("mdma_1_1_tgt  ");
-// clusters[1][1]->signal_vci_ini_mdma.print_trace("mdma_1_1_ini  ");
-
+        // trace external peripherals
+        size_t io_x   = cluster_io_id / CLUSTER_Y;
+        size_t io_y   = cluster_io_id % CLUSTER_Y;
+        
+        clusters[io_x][io_y]->signal_vci_tgt_mtty.print_trace("VCI signal TTY");
+/*
+        clusters[io_x][io_y]->bdev->print_trace();
+        clusters[io_x][io_y]->signal_vci_tgt_bdev.print_trace("VCI signal BDEV_TGT");
+        clusters[io_x][io_y]->signal_vci_ini_bdev.print_trace("VCI signal BDEV_INI");
+*/
       }
 
