Index: trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h
===================================================================
--- trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h	(revision 649)
+++ trunk/modules/vci_mem_cache/caba/source/include/vci_mem_cache.h	(revision 663)
@@ -405,4 +405,5 @@
       // instrumentation counters
       uint32_t     m_cpt_cycles;         // Counter of cycles
+      uint32_t     m_cpt_reset_count;    // Cycle at which the counters were last reset
 
       // Counters accessible in software (not yet but eventually)
@@ -449,5 +450,5 @@
       uint32_t     m_cpt_write_miss;     // Number of MISS WRITE
       uint32_t     m_cpt_write_dirty;    // Cumulated length for WRITE transactions
-      uint32_t     m_cpt_write_broadcast;// Number of BROADCAST INVAL because write
+      uint32_t     m_cpt_write_broadcast;// Number of BROADCAST INVAL because of writes
 
       uint32_t     m_cpt_trt_rb;         // Read blocked by a hit in trt
@@ -515,4 +516,5 @@
       ~VciMemCache();
 
+      void reset_counters();
       void print_stats(bool activity_counters, bool stats);
       void print_trace( size_t detailed = 0 );
Index: trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp
===================================================================
--- trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 649)
+++ trunk/modules/vci_mem_cache/caba/source/src/vci_mem_cache.cpp	(revision 663)
@@ -31,4 +31,5 @@
  *              alexandre.joannou@lip6.fr
  */
+
 
 #include "../include/vci_mem_cache.h"
@@ -799,4 +800,47 @@
     }
 
+    
+    /////////////////////////////////////////
+    tmpl(void)::reset_counters()
+    /////////////////////////////////////////
+    {
+        m_cpt_reset_count        = m_cpt_cycles;
+        m_cpt_read_local         = 0;
+        m_cpt_read_remote        = 0;
+        m_cpt_read_cost          = 0;
+        m_cpt_write_local        = 0;
+        m_cpt_write_remote       = 0;
+        m_cpt_write_flits_local  = 0;
+        m_cpt_write_flits_remote = 0;
+        m_cpt_write_cost         = 0;
+        m_cpt_ll_local           = 0;
+        m_cpt_ll_remote          = 0;
+        m_cpt_ll_cost            = 0;
+        m_cpt_sc_local           = 0;
+        m_cpt_sc_remote          = 0;
+        m_cpt_sc_cost            = 0;
+        m_cpt_cas_local          = 0;
+        m_cpt_cas_remote         = 0;
+        m_cpt_cas_cost           = 0;
+        m_cpt_update             = 0;
+        m_cpt_update_local       = 0;
+        m_cpt_update_remote      = 0;
+        m_cpt_update_cost        = 0;
+        m_cpt_minval             = 0;
+        m_cpt_minval_local       = 0;
+        m_cpt_minval_remote      = 0;
+        m_cpt_minval_cost        = 0;
+        m_cpt_binval             = 0;
+        m_cpt_cleanup_local      = 0;
+        m_cpt_cleanup_remote     = 0;
+        m_cpt_cleanup_cost       = 0;
+        m_cpt_read_miss          = 0;
+        m_cpt_write_miss         = 0;
+        m_cpt_write_dirty        = 0;
+        m_cpt_trt_rb             = 0;
+        m_cpt_trt_full           = 0;
+        m_cpt_get                = 0;
+        m_cpt_put                = 0;
+    }
 
     /////////////////////////////////////////
@@ -812,4 +856,5 @@
             std::cout << "----------------------------------" << std::dec << std::endl;
             std::cout
+                << "[000] COUNTERS RESET AT CYCLE   = " << m_cpt_reset_count << std::endl
                 << "[001] NUMBER OF CYCLES          = " << m_cpt_cycles << std::endl
                 << std::endl
@@ -941,5 +986,5 @@
         delete [] m_debug_data;
 
-        print_stats();
+        //print_stats();
     }
 
@@ -1068,4 +1113,5 @@
             // Activity counters
             m_cpt_cycles             = 0;
+            m_cpt_reset_count        = 0;
             m_cpt_read_local         = 0;
             m_cpt_read_remote        = 0;
@@ -1206,5 +1252,4 @@
                 if (p_vci_tgt.cmdval)
                 {
-
 #if DEBUG_MEMC_TGT_CMD
                     if (m_debug)
@@ -3705,6 +3750,4 @@
                             "MEMC ERROR in WRITE_BC_DIR_READ state: Bad DIR allocation");
 
-                    m_cpt_write_broadcast++;
-
                     // write enable signal for data buffer.
                     r_write_bc_data_we = true;
@@ -5509,5 +5552,5 @@
                             << " address = "   << std::hex << r_cleanup_nline.read()*m_words*4
                             << " / way = "   << std::dec << r_cleanup_way.read()
-                            << " / srcid = " << std::dec << r_cleanup_srcid.read() 
+                            << " / srcid = " << std::hex << r_cleanup_srcid.read() 
                             << std::endl;
 #endif
@@ -6639,4 +6682,5 @@
                     // <Activity Counters>
                     m_cpt_binval++;
+                    m_cpt_write_broadcast++;
                     // </Activity Counters>
 
