Index: trunk/platforms/almos-tsar-mipsel/top.cpp
===================================================================
--- trunk/platforms/almos-tsar-mipsel/top.cpp	(revision 749)
+++ trunk/platforms/almos-tsar-mipsel/top.cpp	(revision 752)
@@ -201,19 +201,19 @@
 /////////////////////////////////////////////////////////
 // There is 3 segments replicated in all clusters
-// and 5 specific segments in the "IO" cluster 
+// and 5 specific segments in the "IO" cluster
 // (containing address 0xBF000000)
 /////////////////////////////////////////////////////////
 // Physical Address Decoding: 8 GID + 8 LID + 16 offset.
 /////////////////////////////////////////////////////////
-#define RAM_BASE        0x00000000      
+#define RAM_BASE        0x00000000
 #define RAM_SIZE        0x00C00000
 
-#define BROM_BASE       0xBFC00000      
+#define BROM_BASE       0xBFC00000
 #define BROM_SIZE       0x00100000
 
-#define FBUF_BASE       0xBFD00000      
+#define FBUF_BASE       0xBFD00000
 #define FBUF_SIZE       0x00200000
 
-#define XICU_BASE       0x00F00000      
+#define XICU_BASE       0x00F00000
 #define XICU_SIZE       0x00002000
 
@@ -221,5 +221,5 @@
 #define BDEV_SIZE       0x00000100
 
-#define MTTY_BASE       0xBFF20000      
+#define MTTY_BASE       0xBFF20000
 #define MTTY_SIZE       0x00000100
 
@@ -227,5 +227,5 @@
 #define MDMA_SIZE       0x00001000 * NB_DMA_CHANNELS  // 4 Kbytes per channel
 
-#define MEMC_BASE       0x00F40000      
+#define MEMC_BASE       0x00F40000
 #define MEMC_SIZE       0x00001000
 
@@ -233,5 +233,5 @@
 #define SIMH_SIZE       0x00001000
 
-#define CDMA_BASE       0xBFF60000      
+#define CDMA_BASE       0xBFF60000
 #define CDMA_SIZE       0x00000100
 
@@ -255,5 +255,5 @@
    bool     debug_ok         = false;              // trace activated
    size_t   debug_period     = 1;                  // trace period
-   size_t   debug_memc_id    = 0;                  // index of memc to be traced 
+   size_t   debug_memc_id    = 0;                  // index of memc to be traced
    size_t   debug_proc_id    = 0;                  // index of proc to be traced
    uint32_t debug_from       = 0;                  // trace start cycle
@@ -596,5 +596,5 @@
    {
       for (size_t y = 0; y < ymax ; y++)
-      { 
+      {
 
          sc_uint<vci_address_width> offset;
@@ -781,5 +781,5 @@
       }
    }
-   std::cout << std::endl << "Horizontal connections established" << std::endl;   
+   std::cout << std::endl << "Horizontal connections established" << std::endl;
 
    // Inter Clusters vertical connections
Index: trunk/platforms/tsar_generic_xbar/scripts/run_simus.py
===================================================================
--- trunk/platforms/tsar_generic_xbar/scripts/run_simus.py	(revision 749)
+++ trunk/platforms/tsar_generic_xbar/scripts/run_simus.py	(revision 752)
@@ -4,4 +4,5 @@
 import os
 import sys
+import shutil
 
 #TODO: recopier les fichiers d'entrees dans le script en fonction de l'appli selectionnee
@@ -14,5 +15,5 @@
 
 nb_procs = [ 4 ]
-#nb_procs = [ 1, 4, 8, 16, 32, 64, 128, 256 ]
+#nb_procs = [ 16, 32, 64, 128, 256 ]
 rerun_stats = True
 use_omp = False
@@ -25,5 +26,5 @@
 # to come: 'barnes', 'fmm', 'ocean', 'raytrace', 'radiosity', 'waters', 'watern'
 
-apps = [ 'histogram', 'pca' ]
+apps = [ 'cholesky' ]
 
 
@@ -155,9 +156,7 @@
       os.symlink(target, link_name)
 
-   target = hdd_img_name
-   link_name = 'hdd-img.bin'
-   if not os.path.isfile(link_name):
-      print "ln -s", target, link_name
-      os.symlink(target, link_name)
+   copied_hdd = 'hdd-img.bin'
+   print "cp", hdd_img_name, copied_hdd
+   shutil.copy(hdd_img_name, copied_hdd)
 
    os.chdir(old_path)
@@ -255,5 +254,5 @@
       shrc = "exec -p 0 /bin/lu -n%(nproc)d -m512\n" % dict(nproc = nprocs)
    elif (app_name == "radix"):
-      shrc = "exec -p 0 /bin/radix -n%(nproc)d -k2097152\n" % dict(nproc = nprocs) # test : 1024 ; simu : 2097152
+      shrc = "exec -p 0 /bin/radix -n%(nproc)d -k1024\n" % dict(nproc = nprocs) # test : 1024 ; simu : 2097152
    elif (app_name == "radix_ga"):
       shrc = "exec -p 0 /bin/radix_ga -n%(nproc)d -k2097152\n" % dict(nproc = nprocs) # p = proc, n = num_keys
Index: trunk/platforms/tsar_generic_xbar/top.cpp
===================================================================
--- trunk/platforms/tsar_generic_xbar/top.cpp	(revision 749)
+++ trunk/platforms/tsar_generic_xbar/top.cpp	(revision 752)
@@ -632,5 +632,5 @@
    {
       for (size_t y = 0; y < Y_SIZE ; y++)
-      { 
+      {
 
          sc_uint<vci_address_width> offset;
@@ -676,12 +676,11 @@
    // Mesh boundaries DSPIN signals
    DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_in =
-      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_in" , X_SIZE, Y_SIZE, 4, 3);
+         alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_in" , X_SIZE, Y_SIZE, 4, 3);
    DspinSignals<dspin_cmd_width>**** signal_dspin_false_cmd_out =
-      alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_out", X_SIZE, Y_SIZE, 4, 3);
+         alloc_elems<DspinSignals<dspin_cmd_width> >("signal_dspin_false_cmd_out", X_SIZE, Y_SIZE, 4, 3);
    DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_in =
-      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_in" , X_SIZE, Y_SIZE, 4, 2);
+         alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_in" , X_SIZE, Y_SIZE, 4, 2);
    DspinSignals<dspin_rsp_width>**** signal_dspin_false_rsp_out =
-      alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_out", X_SIZE, Y_SIZE, 4, 2);
-
+         alloc_elems<DspinSignals<dspin_rsp_width> >("signal_dspin_false_rsp_out", X_SIZE, Y_SIZE, 4, 2);
 
    ////////////////////////////
@@ -730,6 +729,6 @@
                 sc.str().c_str(),
                 NB_PROCS_MAX,
-                NB_TTY_CHANNELS,  
-                NB_DMA_CHANNELS, 
+                NB_TTY_CHANNELS,
+                NB_DMA_CHANNELS,
                 x,
                 y,
@@ -772,5 +771,5 @@
                 debug_from,
                 debug_ok and (cluster(x,y) == debug_memc_id),
-                debug_ok and (cluster(x,y) == debug_proc_id) 
+                debug_ok and (cluster(x,y) == debug_proc_id)
             );
 
@@ -815,5 +814,5 @@
       }
    }
-   std::cout << std::endl << "Horizontal connections established" << std::endl;   
+   std::cout << std::endl << "Horizontal connections established" << std::endl;
 
    // Inter Clusters vertical connections
@@ -844,16 +843,16 @@
       for (size_t k = 0; k < 3; k++)
       {
-         clusters[0][y]->p_cmd_in[WEST][k]        (signal_dspin_false_cmd_in[0][y][WEST][k]);
+         clusters[0][y]->p_cmd_in[WEST][k]        (signal_dspin_false_cmd_in [0][y][WEST][k]);
          clusters[0][y]->p_cmd_out[WEST][k]       (signal_dspin_false_cmd_out[0][y][WEST][k]);
-         clusters[X_SIZE-1][y]->p_cmd_in[EAST][k]   (signal_dspin_false_cmd_in[X_SIZE-1][y][EAST][k]);
-         clusters[X_SIZE-1][y]->p_cmd_out[EAST][k]  (signal_dspin_false_cmd_out[X_SIZE-1][y][EAST][k]);
+         clusters[X_SIZE-1][y]->p_cmd_in[EAST][k] (signal_dspin_false_cmd_in [X_SIZE-1][y][EAST][k]);
+         clusters[X_SIZE-1][y]->p_cmd_out[EAST][k](signal_dspin_false_cmd_out[X_SIZE-1][y][EAST][k]);
       }
 
       for (size_t k = 0; k < 2; k++)
       {
-         clusters[0][y]->p_rsp_in[WEST][k]        (signal_dspin_false_rsp_in[0][y][WEST][k]);
+         clusters[0][y]->p_rsp_in[WEST][k]        (signal_dspin_false_rsp_in [0][y][WEST][k]);
          clusters[0][y]->p_rsp_out[WEST][k]       (signal_dspin_false_rsp_out[0][y][WEST][k]);
-         clusters[X_SIZE-1][y]->p_rsp_in[EAST][k]   (signal_dspin_false_rsp_in[X_SIZE-1][y][EAST][k]);
-         clusters[X_SIZE-1][y]->p_rsp_out[EAST][k]  (signal_dspin_false_rsp_out[X_SIZE-1][y][EAST][k]);
+         clusters[X_SIZE-1][y]->p_rsp_in[EAST][k] (signal_dspin_false_rsp_in [X_SIZE-1][y][EAST][k]);
+         clusters[X_SIZE-1][y]->p_rsp_out[EAST][k](signal_dspin_false_rsp_out[X_SIZE-1][y][EAST][k]);
       }
    }
@@ -864,16 +863,16 @@
       for (size_t k = 0; k < 3; k++)
       {
-         clusters[x][0]->p_cmd_in[SOUTH][k]       (signal_dspin_false_cmd_in[x][0][SOUTH][k]);
-         clusters[x][0]->p_cmd_out[SOUTH][k]      (signal_dspin_false_cmd_out[x][0][SOUTH][k]);
-         clusters[x][Y_SIZE-1]->p_cmd_in[NORTH][k]  (signal_dspin_false_cmd_in[x][Y_SIZE-1][NORTH][k]);
-         clusters[x][Y_SIZE-1]->p_cmd_out[NORTH][k] (signal_dspin_false_cmd_out[x][Y_SIZE-1][NORTH][k]);
+         clusters[x][0]->p_cmd_in[SOUTH][k]        (signal_dspin_false_cmd_in [x][0][SOUTH][k]);
+         clusters[x][0]->p_cmd_out[SOUTH][k]       (signal_dspin_false_cmd_out[x][0][SOUTH][k]);
+         clusters[x][Y_SIZE-1]->p_cmd_in[NORTH][k] (signal_dspin_false_cmd_in [x][Y_SIZE-1][NORTH][k]);
+         clusters[x][Y_SIZE-1]->p_cmd_out[NORTH][k](signal_dspin_false_cmd_out[x][Y_SIZE-1][NORTH][k]);
       }
 
       for (size_t k = 0; k < 2; k++)
       {
-         clusters[x][0]->p_rsp_in[SOUTH][k]       (signal_dspin_false_rsp_in[x][0][SOUTH][k]);
-         clusters[x][0]->p_rsp_out[SOUTH][k]      (signal_dspin_false_rsp_out[x][0][SOUTH][k]);
-         clusters[x][Y_SIZE-1]->p_rsp_in[NORTH][k]  (signal_dspin_false_rsp_in[x][Y_SIZE-1][NORTH][k]);
-         clusters[x][Y_SIZE-1]->p_rsp_out[NORTH][k] (signal_dspin_false_rsp_out[x][Y_SIZE-1][NORTH][k]);
+         clusters[x][0]->p_rsp_in[SOUTH][k]        (signal_dspin_false_rsp_in [x][0][SOUTH][k]);
+         clusters[x][0]->p_rsp_out[SOUTH][k]       (signal_dspin_false_rsp_out[x][0][SOUTH][k]);
+         clusters[x][Y_SIZE-1]->p_rsp_in[NORTH][k] (signal_dspin_false_rsp_in [x][Y_SIZE-1][NORTH][k]);
+         clusters[x][Y_SIZE-1]->p_rsp_out[NORTH][k](signal_dspin_false_rsp_out[x][Y_SIZE-1][NORTH][k]);
       }
    }
@@ -899,5 +898,4 @@
                signal_dspin_false_cmd_out[x][y][a][k].read  = true;
             }
-
             for (size_t k = 0; k < 2; k++){
                signal_dspin_false_rsp_in [x][y][a][k].write = false;
@@ -913,4 +911,49 @@
    signal_resetn = true;
 
+#define SC_TRACE
+#ifdef SC_TRACE
+   sc_trace_file * tf = sc_create_vcd_trace_file("my_trace_file");
+
+   if (X_SIZE > 1){
+      for (size_t x = 0; x < (X_SIZE-1); x++){
+         for (size_t y = 0; y < Y_SIZE; y++){
+            for (size_t k = 0; k < 3; k++){
+               signal_dspin_h_cmd_inc[x][y][k].trace(tf, "dspin_h_cmd_inc");
+               signal_dspin_h_cmd_dec[x][y][k].trace(tf, "dspin_h_cmd_dec");
+            }
+
+            for (size_t k = 0; k < 2; k++){
+               signal_dspin_h_rsp_inc[x][y][k].trace(tf, "dspin_h_rsp_inc");
+               signal_dspin_h_rsp_dec[x][y][k].trace(tf, "dspin_h_rsp_dec");
+            }
+         }
+      }
+   }
+
+   if (Y_SIZE > 1) {
+      for (size_t y = 0; y < (Y_SIZE-1); y++){
+         for (size_t x = 0; x < X_SIZE; x++){
+            for (size_t k = 0; k < 3; k++){
+               signal_dspin_v_cmd_inc[x][y][k].trace(tf, "dspin_v_cmd_inc");
+               signal_dspin_v_cmd_dec[x][y][k].trace(tf, "dspin_v_cmd_dec");
+            }
+
+            for (size_t k = 0; k < 2; k++){
+               signal_dspin_v_rsp_inc[x][y][k].trace(tf, "dspin_v_rsp_inc");
+               signal_dspin_v_rsp_dec[x][y][k].trace(tf, "dspin_v_rsp_dec");
+            }
+         }
+      }
+   }
+
+   for (size_t x = 0; x < (X_SIZE); x++){
+      for (size_t y = 0; y < Y_SIZE; y++){
+         std::ostringstream signame;
+         signame << "cluster" << x << "_" << y;
+         clusters[x][y]->trace(tf, signame.str());
+      }
+   }
+#endif
+
    if (debug_ok) {
       #if USE_OPENMP
@@ -932,5 +975,5 @@
          {
 
-            if (gettimeofday(&t2, NULL) != 0) 
+            if (gettimeofday(&t2, NULL) != 0)
             {
                perror("gettimeofday");
@@ -942,5 +985,5 @@
             std::cerr << "platform clock frequency " << (double) 5000000 / (double) (ms2 - ms1) << "Khz" << std::endl;
 
-            if (gettimeofday(&t1, NULL) != 0) 
+            if (gettimeofday(&t1, NULL) != 0)
             {
                perror("gettimeofday");
@@ -966,10 +1009,10 @@
          }
 
-         if (debug_ok and (n > debug_from) and (n % debug_period == 0))
+         if ((n > debug_from) and (n % debug_period == 0))
          {
             std::cout << "****************** cycle " << std::dec << n ;
             std::cout << " ************************************************" << std::endl;
 
-            // trace proc[debug_proc_id] 
+            // trace proc[debug_proc_id]
             size_t l = debug_proc_id % NB_PROCS_MAX ;
             size_t y = (debug_proc_id / NB_PROCS_MAX) % Y_SIZE ;
@@ -992,5 +1035,5 @@
             //clusters[x][y]->signal_dspin_rsp_g2l_d.print_trace("[SIG]G2L RSP");
 
-            // trace memc[debug_memc_id] 
+            // trace memc[debug_memc_id]
             x = debug_memc_id / Y_SIZE;
             y = debug_memc_id % Y_SIZE;
Index: trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h
===================================================================
--- trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h	(revision 749)
+++ trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/include/tsar_xbar_cluster.h	(revision 752)
@@ -211,4 +211,5 @@
 
     ~TsarXbarCluster();
+    void trace(sc_trace_file * tf, const std::string & name);
 
 };
Index: trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp
===================================================================
--- trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp	(revision 749)
+++ trunk/platforms/tsar_generic_xbar/tsar_xbar_cluster/caba/source/src/tsar_xbar_cluster.cpp	(revision 752)
@@ -669,4 +669,41 @@
 
 
+template<size_t dspin_cmd_width,
+         size_t dspin_rsp_width,
+         typename vci_param_int,
+         typename vci_param_ext>
+void TsarXbarCluster<dspin_cmd_width,
+                     dspin_rsp_width,
+                     vci_param_int,
+                     vci_param_ext>::trace(sc_core::sc_trace_file * tf, const std::string & name) {
+
+#define __trace(x) sc_core::sc_trace(tf, x, name + "_" + #x)
+    __trace(signal_vci_l2g_d);
+    __trace(signal_vci_g2l_d);
+    __trace(signal_vci_tgt_memc);
+    __trace(signal_vci_tgt_xicu);
+    __trace(signal_vci_tgt_mdma);
+    __trace(signal_vci_ini_mdma);
+
+    for (size_t p = 0; p < n_procs; p++) {
+        std::ostringstream signame;
+        signame << "vci_ini_proc_" << p;
+        sc_core::sc_trace(tf, signal_vci_ini_proc[p], signame.str());
+    }
+    __trace(signal_vci_tgt_mtty);
+    __trace(signal_vci_tgt_brom);
+    __trace(signal_vci_tgt_bdev);
+    __trace(signal_vci_tgt_fbuf);
+    __trace(signal_vci_tgt_simh);
+    __trace(signal_vci_ini_bdev);
+    __trace(signal_vci_tgt_memc);
+    __trace(signal_vci_xram);
+#undef trace
+
+}                        
+                                    
+
+
+
 }}
 
@@ -680,4 +717,2 @@
 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
 
-
-
