Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_statistics_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_statistics_allocation.cpp	(revision 119)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_statistics_allocation.cpp	(revision 120)
@@ -8,4 +8,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h"
+#include "Behavioural/include/Allocation.h"
 
 namespace morpheo {
@@ -26,5 +27,39 @@
 		      "Context_State",
 		      param_statistics);
-    
+
+    ALLOC1(_stat_nb_cycle_state_ok                     ,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_excep               ,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_miss_branch         ,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_miss_load           ,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_miss_load_and_branch,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_msync               ,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_psync               ,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_csync               ,counter_t *,_param->_nb_context);
+    ALLOC1(_stat_nb_cycle_state_ko_spr                 ,counter_t *,_param->_nb_context);
+
+    for (uint32_t i=0; i<_param->_nb_context; ++i)
+      {
+        _stat_nb_cycle_state_ok                      [i] = _stat->create_counter("nb_cycle_state_ok_"                     +toString(i),"",toString(_("Number of cycle in state ok                      (context %d)"),i));
+        _stat_nb_cycle_state_ko_excep                [i] = _stat->create_counter("nb_cycle_state_ko_excep_"               +toString(i),"",toString(_("Number of cycle in state ko_excep                (context %d)"),i));
+        _stat_nb_cycle_state_ko_miss_branch          [i] = _stat->create_counter("nb_cycle_state_ko_miss_branch_"         +toString(i),"",toString(_("Number of cycle in state ko_miss_branch          (context %d)"),i));
+        _stat_nb_cycle_state_ko_miss_load            [i] = _stat->create_counter("nb_cycle_state_ko_miss_load_"           +toString(i),"",toString(_("Number of cycle in state ko_miss_load            (context %d)"),i));
+        _stat_nb_cycle_state_ko_miss_load_and_branch [i] = _stat->create_counter("nb_cycle_state_ko_miss_load_and_branch_"+toString(i),"",toString(_("Number of cycle in state ko_miss_load_and_branch (context %d)"),i));
+        _stat_nb_cycle_state_ko_msync                [i] = _stat->create_counter("nb_cycle_state_ko_msync_"               +toString(i),"",toString(_("Number of cycle in state ko_msync                (context %d)"),i));
+        _stat_nb_cycle_state_ko_psync                [i] = _stat->create_counter("nb_cycle_state_ko_psync_"               +toString(i),"",toString(_("Number of cycle in state ko_psync                (context %d)"),i));
+        _stat_nb_cycle_state_ko_csync                [i] = _stat->create_counter("nb_cycle_state_ko_csync_"               +toString(i),"",toString(_("Number of cycle in state ko_csync                (context %d)"),i));
+        _stat_nb_cycle_state_ko_spr                  [i] = _stat->create_counter("nb_cycle_state_ko_spr_"                 +toString(i),"",toString(_("Number of cycle in state ko_spr                  (context %d)"),i));
+
+
+        _stat->create_expr_percent("percent_state_ok_"                     +toString(i),"nb_cycle_state_ok_"                     +toString(i),"cycle",toString(_("Percent of cycle in state ok                      (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_excep_"               +toString(i),"nb_cycle_state_ko_excep_"               +toString(i),"cycle",toString(_("Percent of cycle in state ko_excep                (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_miss_branch_"         +toString(i),"nb_cycle_state_ko_miss_branch_"         +toString(i),"cycle",toString(_("Percent of cycle in state ko_miss_branch          (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_miss_load_"           +toString(i),"nb_cycle_state_ko_miss_load_"           +toString(i),"cycle",toString(_("Percent of cycle in state ko_miss_load            (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_miss_load_and_branch_"+toString(i),"nb_cycle_state_ko_miss_load_and_branch_"+toString(i),"cycle",toString(_("Percent of cycle in state ko_miss_load_and_branch (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_msync_"               +toString(i),"nb_cycle_state_ko_msync_"               +toString(i),"cycle",toString(_("Percent of cycle in state ko_msync                (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_psync_"               +toString(i),"nb_cycle_state_ko_psync_"               +toString(i),"cycle",toString(_("Percent of cycle in state ko_psync                (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_csync_"               +toString(i),"nb_cycle_state_ko_csync_"               +toString(i),"cycle",toString(_("Percent of cycle in state ko_csync                (context %d)"),i));
+        _stat->create_expr_percent("percent_state_ko_spr_"                 +toString(i),"nb_cycle_state_ko_spr_"                 +toString(i),"cycle",toString(_("Percent of cycle in state ko_spr                  (context %d)"),i));
+      }
+
     log_end(Context_State,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_statistics_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_statistics_deallocation.cpp	(revision 119)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_statistics_deallocation.cpp	(revision 120)
@@ -8,4 +8,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h"
+#include "Behavioural/include/Allocation.h"
 
 namespace morpheo {
@@ -24,6 +25,16 @@
 
     log_printf(INFO,Context_State,FUNCTION,_("Generate Statistics file"));
-    
+
     delete _stat;
+
+    DELETE1(_stat_nb_cycle_state_ok                     ,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_excep               ,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_miss_branch         ,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_miss_load           ,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_miss_load_and_branch,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_msync               ,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_psync               ,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_csync               ,_param->_nb_context);
+    DELETE1(_stat_nb_cycle_state_ko_spr                 ,_param->_nb_context);
     
     log_end(Context_State,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp	(revision 119)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp	(revision 120)
@@ -678,4 +678,47 @@
       }
 
+
+#ifdef STATISTICS
+    if (usage_is_set(_usage,USE_STATISTICS))
+      for (uint32_t i=0; i<_param->_nb_context; ++i)
+        switch(reg_STATE[i])
+          {
+          case CONTEXT_STATE_OK                                 : (*_stat_nb_cycle_state_ok                      [i])++; break;
+
+          case CONTEXT_STATE_KO_EXCEP                           : 
+          case CONTEXT_STATE_KO_EXCEP_ADDR                      : 
+          case CONTEXT_STATE_KO_EXCEP_SPR                       : (*_stat_nb_cycle_state_ko_excep                [i])++; break;
+
+          case CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE         : 
+          case CONTEXT_STATE_KO_MISS_BRANCH_ADDR                : 
+          case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND             : (*_stat_nb_cycle_state_ko_miss_branch          [i])++; break;
+
+          case CONTEXT_STATE_KO_MISS_LOAD_ADDR                  : 
+          case CONTEXT_STATE_KO_MISS_LOAD_WAITEND               : (*_stat_nb_cycle_state_ko_miss_load            [i])++; break;
+
+          case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE: 
+          case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR       : 
+          case CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND    : (*_stat_nb_cycle_state_ko_miss_load_and_branch [i])++; break;
+
+//        case CONTEXT_STATE_KO_MSYNC                           : 
+//        case CONTEXT_STATE_KO_MSYNC_ISSUE                     : 
+          case CONTEXT_STATE_KO_MSYNC_EXEC                      : (*_stat_nb_cycle_state_ko_msync                [i])++; break;
+
+//        case CONTEXT_STATE_KO_PSYNC                           : 
+          case CONTEXT_STATE_KO_PSYNC_FLUSH                     : 
+          case CONTEXT_STATE_KO_PSYNC_ADDR                      : (*_stat_nb_cycle_state_ko_psync                [i])++; break;
+
+//        case CONTEXT_STATE_KO_CSYNC                           : 
+          case CONTEXT_STATE_KO_CSYNC_FLUSH                     : 
+          case CONTEXT_STATE_KO_CSYNC_ADDR                      : (*_stat_nb_cycle_state_ko_csync                [i])++; break;
+
+//        case CONTEXT_STATE_KO_SPR                             : 
+//        case CONTEXT_STATE_KO_SPR_ISSUE                       : 
+          case CONTEXT_STATE_KO_SPR_EXEC                        : (*_stat_nb_cycle_state_ko_spr                  [i])++; break;
+          }
+#endif
+
+
+
 #if DEBUG >= DEBUG_TRACE
     for (uint32_t i=0; i<_param->_nb_context; i++)
