Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h	(revision 123)
@@ -143,4 +143,5 @@
     // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   public    : SC_OUT(Tcontrol_t         )  ** out_CONTEXT_DECOD_ENABLE               ;//[nb_context]
+  public    : SC_OUT(Tcontrol_t         )  ** out_CONTEXT_EVENT                      ;//[nb_context]
 
     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -211,4 +212,5 @@
   public  : void        genMoore                  (void);
   public  : void        genMealy_decod_event      (void);
+  public  : void        genMealy_context_event    (void);
 #endif					       
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State.cpp	(revision 123)
@@ -39,9 +39,9 @@
     usage_environment(_usage);
 
-#if DEBUG_Context_State == true
-    log_printf(INFO,Context_State,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Context_State == true
+//     log_printf(INFO,Context_State,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Context_State,FUNCTION,_("Allocation"));
@@ -139,4 +139,24 @@
 	// List dependency information
 # endif    
+
+	log_printf(INFO,Context_State,FUNCTION,_("Method - genMealy_context_event"));
+
+	SC_METHOD (genMealy_context_event);
+	dont_initialize ();
+// 	sensitive << (*(in_CLOCK)).neg(); // use internal register
+        sensitive << (*(in_COMMIT_EVENT_VAL             ));
+        if (_param->_have_port_context_id)				        
+        sensitive << (*(in_COMMIT_EVENT_CONTEXT_ID      ));
+        for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
+          {
+            sensitive << (*(in_BRANCH_COMPLETE_VAL             [i]))
+                      << (*(in_BRANCH_COMPLETE_MISS_PREDICTION [i]));
+            if (_param->_have_port_context_id)				        
+            sensitive << (*(in_BRANCH_COMPLETE_CONTEXT_ID      [i]));
+          }
+	
+# ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+# endif    
 	
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp	(revision 123)
@@ -172,4 +172,5 @@
       
       ALLOC1_SIGNAL_OUT(out_CONTEXT_DECOD_ENABLE               ,"decod_enable",Tcontrol_t,1);
+      ALLOC1_SIGNAL_OUT(out_CONTEXT_EVENT                      ,"event"       ,Tcontrol_t,1);
 
       ALLOC1_INTERFACE_END(_param->_nb_context);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp	(revision 123)
@@ -91,4 +91,5 @@
         
 	DELETE1_SIGNAL(out_CONTEXT_DECOD_ENABLE               ,_param->_nb_context,1);
+	DELETE1_SIGNAL(out_CONTEXT_EVENT                      ,_param->_nb_context,1);
 
 	DELETE1_SIGNAL( in_DEPTH_MIN                          ,_param->_nb_context,_param->_size_depth);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMealy_context_event.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMealy_context_event.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMealy_context_event.cpp	(revision 123)
@@ -0,0 +1,72 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace context_state {
+
+
+#undef  FUNCTION
+#define FUNCTION "Context_State::genMealy_context_event"
+  void Context_State::genMealy_context_event (void)
+  {
+    log_begin(Context_State,FUNCTION);
+    log_function(Context_State,FUNCTION,_name.c_str());
+
+    bool context_event [_param->_nb_context];
+
+    // init
+    for (uint32_t i=0; i<_param->_nb_context; ++i)
+      context_event [i] = false;
+
+    if (PORT_READ(in_NRESET))
+      {
+    // Commit Event ?
+    if (PORT_READ(in_COMMIT_EVENT_VAL))
+      {
+        Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_COMMIT_EVENT_CONTEXT_ID):0;
+      
+        context_event [context] = true;
+      }
+
+    // Miss ?
+    for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
+    if (PORT_READ(in_BRANCH_COMPLETE_VAL             [i]) and
+        PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))
+      {
+        Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
+      
+        context_event [context] = true;
+      }
+
+    for (uint32_t i=0; i<_param->_nb_context; ++i)
+      PORT_WRITE(out_CONTEXT_EVENT [i], context_event [i]);
+      }
+//     else
+//       {
+//       }
+
+    for (uint32_t i=0; i<_param->_nb_context; ++i)
+      PORT_WRITE(out_CONTEXT_EVENT [i], context_event [i]);
+
+    log_end(Context_State,FUNCTION);
+  };
+
+}; // end namespace context_state
+}; // end namespace front_end
+}; // end namespace multi_front_end
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMealy_decod_event.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMealy_decod_event.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMealy_decod_event.cpp	(revision 123)
@@ -24,4 +24,6 @@
     log_function(Context_State,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
       {
@@ -49,6 +51,14 @@
 
         internal_DECOD_EVENT_ACK [i] = ack;
-        PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]);
       }
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+          internal_DECOD_EVENT_ACK [i] = 0;
+      }
+
+    for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+      PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]);
 
     log_end(Context_State,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp	(revision 123)
@@ -24,4 +24,6 @@
     log_function(Context_State,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     // -------------------------------------------------------------------
     // -----[ EVENT ]-----------------------------------------------------
@@ -67,5 +69,4 @@
 
         internal_EVENT_VAL [i] = val;
-	PORT_WRITE(out_EVENT_VAL              [i], val);
 	PORT_WRITE(out_EVENT_ADDRESS          [i], address);
 	PORT_WRITE(out_EVENT_ADDRESS_NEXT     [i], address_next); 
@@ -97,5 +98,4 @@
 	internal_SPR_EVENT_VAL [i] = (state == CONTEXT_STATE_KO_EXCEP_SPR  );
 
-	PORT_WRITE(out_SPR_EVENT_VAL       [i], internal_SPR_EVENT_VAL     [i]);
 	PORT_WRITE(out_SPR_EVENT_EPCR      [i], reg_EVENT_ADDRESS_EPCR     [i]);
 	PORT_WRITE(out_SPR_EVENT_EEAR      [i], reg_EVENT_ADDRESS_EEAR     [i]);
@@ -117,4 +117,22 @@
 	PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], (state==CONTEXT_STATE_OK));
       }
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_context; i++)
+          {
+            internal_EVENT_VAL     [i] = 0;
+            internal_SPR_EVENT_VAL [i] = 0;
+
+            PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], 0);
+          }
+      }
+
+    // Write output
+    for (uint32_t i=0; i<_param->_nb_context; i++)
+      {
+        PORT_WRITE(out_EVENT_VAL     [i], internal_EVENT_VAL     [i]);
+        PORT_WRITE(out_SPR_EVENT_VAL [i], internal_SPR_EVENT_VAL [i]);
+      }
 
     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 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp	(revision 123)
@@ -16,10 +16,12 @@
 namespace context_state {
 
-#define MISS_FAST
+// #define MANAGE_EVENT MANAGE_EVENT_WAIT_ALL
+// #define MANAGE_EVENT MANAGE_EVENT_WAIT_DECODE
+#define MANAGE_EVENT MANAGE_EVENT_NO_WAIT
 
 #define get_priority(x) \
   (((state == CONTEXT_STATE_KO_MISS_LOAD_ADDR                  ) or  \
+    (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND               ) or  \
     (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR       ) or  \
-    (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND               ) or  \
     (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND    ) or  \
     (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE))?3: \
@@ -43,4 +45,5 @@
             reg_STATE            [i] = CONTEXT_STATE_OK;
             reg_INTERRUPT_ENABLE [i] = 0;
+            reg_EVENT_DEPTH      [i] = 0; // unacessary
           }
       }
@@ -59,4 +62,7 @@
             Tcounter_t inst_all        = inst_commit_all + inst_decod_all;
 //          Tcounter_t inst_mem        = inst_commit_mem + inst_decod_all;
+            bool       condition       = ( (MANAGE_EVENT == MANAGE_EVENT_WAIT_ALL   )?(inst_all       == 0):
+                                          ((MANAGE_EVENT == MANAGE_EVENT_WAIT_DECODE)?(inst_decod_all == 0):
+                                            true));
 
             context_state_t state = reg_STATE [i];
@@ -89,14 +95,5 @@
               case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND :
                 {
-                  // Wait end of all instruction
-//                if (inst_all == 0)
-                  if (
-#ifdef  MISS_FAST
-                      inst_decod_all ==
-#else
-                      inst_all ==
-#endif
-                      0)
-                    
+                  if (condition)
 //                  state = CONTEXT_STATE_OK;
                     state = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
@@ -106,12 +103,5 @@
                 {
                   // Wait end of all instruction
-//                if (inst_all == 0)
-                  if (
-#ifdef  MISS_FAST
-                      inst_decod_all ==
-#else
-                      inst_all ==
-#endif
-                      0)
+                  if (condition)
                     state = CONTEXT_STATE_KO_MISS_LOAD_ADDR;
 
@@ -146,12 +136,5 @@
                 {
                   // Wait end of all instruction
-//                if (inst_all == 0)
-                  if (
-#ifdef  MISS_FAST
-                      inst_decod_all ==
-#else
-                      inst_all ==
-#endif
-                      0)
+                  if (condition)
 //                  state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod)
                     state = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR;
@@ -333,4 +316,5 @@
 #endif
 
+              log_printf(TRACE,Context_State,FUNCTION,"    * state     : %s",toString(state).c_str());
               log_printf(TRACE,Context_State,FUNCTION,"    * depth     : %d",depth     );
               log_printf(TRACE,Context_State,FUNCTION,"    * depth_cur : %d",depth_cur );
@@ -648,4 +632,7 @@
                           }
                         }
+
+                      depth = (depth+1)%_param->_nb_inst_branch_speculated[context];
+
                       break;
                     }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp	(revision 123)
@@ -38,9 +38,9 @@
     log_printf(FUNC,Decod,FUNCTION,"Begin");
 
-#if DEBUG_Decod == true
-    log_printf(INFO,Decod,FUNCTION,_("<%s> Parameters"),_name.c_str());
-
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Decod == true
+//     log_printf(INFO,Decod,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Decod,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Decod,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     //-----------------------------------
     // Initialization
@@ -280,4 +282,28 @@
 #endif
       }
+      }
+    else
+      {
+    for (uint32_t i=0; i<_param->_nb_context; i++)
+      {
+	internal_CONTEXT_HAVE_TRANSACTION [i] = false;
+// 	internal_CONTEXT_ADDRESS_PREVIOUS [i] = reg_CONTEXT_ADDRESS_PREVIOUS [i];
+// 	internal_CONTEXT_IS_DELAY_SLOT    [i] = reg_CONTEXT_IS_DELAY_SLOT    [i];
+      for (uint32_t j=0; j<_param->_nb_inst_fetch[i]; j++)
+	PORT_WRITE(out_IFETCH_ACK [i][j], 0);
+      }
+
+    PORT_WRITE(out_CONTEXT_EVENT_VAL, 0);
+
+    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+      {
+	PORT_WRITE(out_PREDICT_VAL [i], 0);
+	PORT_WRITE(out_DECOD_VAL   [i], 0);
+
+#ifdef STATISTICS
+        internal_DECOD_VAL [i] = 0;
+#endif
+      }
+      }
 
     log_end(Decod,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h	(revision 123)
@@ -106,4 +106,6 @@
   public    : SC_OUT(Toperation_t       )  ** out_DECOD_OUT_OPERATION     ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_NO_EXECUTE    ;//[nb_inst_decod]
+//public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_HAVE_EVENT    ;//[nb_inst_decod]
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_LAST_EVENT    ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod]
 #ifdef DEBUG
@@ -134,4 +136,7 @@
   public    : SC_OUT(Tcounter_t         )  ** out_NB_INST_ALL             ;//[nb_context]
 
+    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_EVENT           ;//[nb_context]
+
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
@@ -141,4 +146,6 @@
   private   : std::list<decod_queue_entry_t*> * reg_QUEUE                  ;
   private   : uint32_t                        * reg_NB_INST                ;//[nb_context]
+  private   : uint32_t                        * reg_NB_INST_EVENT          ;//[nb_context]
+
     // implementation : one_fifo only
   private   : uint32_t                          reg_LAST_SLOT              ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp	(revision 123)
@@ -40,9 +40,9 @@
     usage_environment(_usage);
 
-#if DEBUG_Decod_queue == true
-    log_printf(INFO,Decod_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Decod_queue == true
+//     log_printf(INFO,Decod_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Decod_queue,FUNCTION,_("Allocation"));
@@ -129,28 +129,28 @@
 	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
 	  sensitive << (*(in_DECOD_OUT_ACK [i]));
-	  for (uint32_t i=0; i<_param->_nb_context; i++)
-            {
-              if (_param->_have_port_depth)
-                {
-              sensitive << (*(in_DEPTH_MIN [i]));
-              sensitive << (*(in_DEPTH_MAX [i]));
-                }
-              sensitive << (*(in_DEPTH_FULL[i]));
-            }
+//         for (uint32_t i=0; i<_param->_nb_context; i++)
+//           {
+//             if (_param->_have_port_depth)
+//               {
+//                 sensitive << (*(in_DEPTH_MIN [i]));
+//                 sensitive << (*(in_DEPTH_MAX [i]));
+//               }
+//             sensitive << (*(in_DEPTH_FULL[i]));
+//           }
 
 # ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
-	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
-	  {
-	    (*(out_DECOD_OUT_VAL [i])) (*(in_DECOD_OUT_ACK [i]));
-            for (uint32_t j=0; j<_param->_nb_context; j++)
-              {
-                if (_param->_have_port_depth)
-                  {
-                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j]));
-                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j]));
-                  }
-              }
-	  }
+// 	// List dependency information
+// 	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+// 	  {
+// 	    (*(out_DECOD_OUT_VAL [i])) (*(in_DECOD_OUT_ACK [i]));
+//             for (uint32_t j=0; j<_param->_nb_context; j++)
+//               {
+//                 if (_param->_have_port_depth)
+//                   {
+//                 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j]));
+//                 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j]));
+//                   }
+//               }
+// 	  }
 # endif    
 	
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp	(revision 123)
@@ -100,4 +100,6 @@
       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_OPERATION      ,"operation"    ,Toperation_t       ,_param->_size_operation             );
       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
+//    ALLOC1_SIGNAL_OUT(out_DECOD_OUT_HAVE_EVENT     ,"have_event"   ,Tcontrol_t         ,1                                   );
+      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_LAST_EVENT     ,"last_event"   ,Tcontrol_t         ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
 #ifdef DEBUG
@@ -143,4 +145,13 @@
     }
 
+    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            
+    {
+      ALLOC1_INTERFACE_BEGIN("context",IN ,NORTH,_("Context"), _param->_nb_context);
+
+      ALLOC1_SIGNAL_IN ( in_CONTEXT_EVENT  ,"event"    ,Tcontrol_t         ,1);
+
+      ALLOC1_INTERFACE_END(_param->_nb_context);
+    }
+
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
@@ -152,5 +163,6 @@
       }
 
-    ALLOC1(reg_NB_INST,uint32_t,_param->_nb_context);
+    ALLOC1(reg_NB_INST           ,uint32_t,_param->_nb_context);
+    ALLOC1(reg_NB_INST_EVENT     ,uint32_t,_param->_nb_context);
 
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp	(revision 123)
@@ -62,5 +62,7 @@
 	DELETE1_SIGNAL(out_DECOD_OUT_TYPE          ,_param->_nb_inst_decod,_param->_size_type                  );
 	DELETE1_SIGNAL(out_DECOD_OUT_OPERATION     ,_param->_nb_inst_decod,_param->_size_operation             );
-	DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod,1                                   );
+ 	DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod,1                                   );
+// 	DELETE1_SIGNAL(out_DECOD_OUT_HAVE_EVENT    ,_param->_nb_inst_decod,1                                   );
+	DELETE1_SIGNAL(out_DECOD_OUT_LAST_EVENT    ,_param->_nb_inst_decod,1                                   );
 	DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1                                   );
 #ifdef DEBUG
@@ -88,4 +90,6 @@
 
 	DELETE1_SIGNAL(out_NB_INST_ALL             ,_param->_nb_context,_param->_size_nb_inst_decod);
+
+        DELETE1_SIGNAL( in_CONTEXT_EVENT           ,_param->_nb_context,1);
 
         // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
@@ -117,5 +121,6 @@
           }
 
-        DELETE1(reg_NB_INST ,_param->_nb_context);
+        DELETE1(reg_NB_INST           ,_param->_nb_context);
+        DELETE1(reg_NB_INST_EVENT     ,_param->_nb_context);
         
         // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMealy_decod_out.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMealy_decod_out.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMealy_decod_out.cpp	(revision 123)
@@ -24,6 +24,16 @@
     log_begin(Decod_queue,FUNCTION);
     log_function(Decod_queue,FUNCTION,_name.c_str());
-    
-    Tcontrol_t val [_param->_nb_inst_decod];
+
+    if (PORT_READ(in_NRESET))
+      {
+    bool       context_val   [_param->_nb_context];
+    uint32_t   nb_inst_event [_param->_nb_context];
+    for (uint32_t i=0; i<_param->_nb_context; i++)
+      {
+        context_val   [i] = true;
+        nb_inst_event [i] = reg_NB_INST_EVENT [i];
+      }
+
+    Tcontrol_t val         [_param->_nb_inst_decod];
     for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
       {
@@ -44,57 +54,74 @@
             
             Tcontext_t context         = reg_QUEUE[num_bank].front()->_context_id    [0];
-            Tdepth_t   depth           = reg_QUEUE[num_bank].front()->_depth         [0];
-            Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
-            Tdepth_t   depth_max       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;
-            Tcontrol_t depth_full      = PORT_READ(in_DEPTH_FULL[context]);
 
-            // is a valid instruction ?
-            // If DEPTH_CURRENT :
-            // equal at     DEPTH_MIN            -> not speculative
-            // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
-            //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
-            
-            // All case
-            // ....... min ...X... max ....... OK
-            // ....... min ....... max ...X... KO
-            // ...X... min ....... max ....... KO
-            // ....... max ....... min ...X... OK
-            // ...X... max ....... min ....... OK
-            // ....... max ...X... min ....... KO
-            
-	    Tcontrol_t is_valid = true;
+            log_printf(TRACE,Decod_queue,FUNCTION,"      * context      : %d",context);
 
-//             Tcontrol_t   is_valid      = ((depth == depth_min) or
-//                                           depth_full or
-//                                           ((depth_min <= depth_max)?
-//                                            ((depth >= depth_min) and (depth <=depth_max)):
-//                                            ((depth >= depth_min) or  (depth <=depth_max))));
-            //Tcontrol_t is_valid        = ((depth == depth_min) or 
-            //                              ((depth_min < depth_max)?
-            //                               (depth<=depth_max):
-            //                               ((depth > depth_min) or (depth <= depth_max))));
-            //Tcontrol_t is_valid        = depth <= depth_max;
-            
-            log_printf(TRACE,Decod_queue,FUNCTION,"    * is_valid : %d",is_valid);
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * context      : %d",context);
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth        : %d",depth);
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_min    : %d",depth_min);
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_max    : %d",depth_max);
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_full   : %d",depth_full);
-#ifdef DEBUG
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * address      : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address     [0],reg_QUEUE[num_bank].front()->_address     [0]<<2);
-#endif
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * address_next : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address_next[0],reg_QUEUE[num_bank].front()->_address_next[0]<<2);
+            if (context_val [context])
+              {
 
-            internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
-            if (is_valid)
-              {
-                val                    [i] = 1;
-                internal_DECOD_OUT_ACK [i] = PORT_READ(in_DECOD_OUT_ACK [i]);
-              }
-            else
-              {
-                // Consume the instruction (to erase)
-                internal_DECOD_OUT_ACK [i] = 1;
+//                 Tdepth_t   depth           = reg_QUEUE[num_bank].front()->_depth         [0];
+//                 Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
+//                 Tdepth_t   depth_max       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;
+//                 Tcontrol_t depth_full      = PORT_READ(in_DEPTH_FULL[context]);
+                
+                    // is a valid instruction ?
+                // If DEPTH_CURRENT :
+                // equal at     DEPTH_MIN            -> not speculative
+                // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
+                //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
+                
+                // All case
+                // ....... min ...X... max ....... OK
+                // ....... min ....... max ...X... KO
+                // ...X... min ....... max ....... KO
+                // ....... max ....... min ...X... OK
+                // ...X... max ....... min ....... OK
+                // ....... max ...X... min ....... KO
+                
+                Tcontrol_t is_valid = (nb_inst_event [context] == 0);
+                
+//                 Tcontrol_t   is_valid      = ((depth == depth_min) or
+//                                               depth_full or
+//                                               ((depth_min <= depth_max)?
+//                                                ((depth >= depth_min) and (depth <=depth_max)):
+//                                                ((depth >= depth_min) or  (depth <=depth_max))));
+                
+                log_printf(TRACE,Decod_queue,FUNCTION,"    * is_valid : %d",is_valid);
+                log_printf(TRACE,Decod_queue,FUNCTION,"      * context_val  : %d",context_val   [context]);
+                log_printf(TRACE,Decod_queue,FUNCTION,"      * nb_inst_event: %d",nb_inst_event [context]);
+//              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth        : %d",depth);
+//              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_min    : %d",depth_min);
+//              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_max    : %d",depth_max);
+//              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_full   : %d",depth_full);
+#ifdef DEBUG    
+                log_printf(TRACE,Decod_queue,FUNCTION,"      * address      : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address     [0],reg_QUEUE[num_bank].front()->_address     [0]<<2);
+#endif          
+                log_printf(TRACE,Decod_queue,FUNCTION,"      * address_next : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address_next[0],reg_QUEUE[num_bank].front()->_address_next[0]<<2);
+                
+                internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
+                
+                if (is_valid)
+                  {
+                    val                    [i] = 1;
+                    internal_DECOD_OUT_ACK [i] = PORT_READ(in_DECOD_OUT_ACK [i]);
+                
+                  }
+                else
+                  {
+                    // Consume the instruction (to erase)
+                    internal_DECOD_OUT_ACK [i] = 1;
+
+                    // Have event ?
+                    if (nb_inst_event [context] > 0)
+                      {
+                        nb_inst_event [context] --;
+                        
+                        // Last event ?
+                        if (nb_inst_event [context] == 0)
+                          {
+                            context_val [context] = false;
+                          }
+                      }
+                  }
               }
           }
@@ -107,4 +134,15 @@
         
         PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]);
+      }
+      }
+    else
+      {
+        // Reset
+        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+          {
+            internal_DECOD_OUT_VAL [i] = 0;
+            internal_DECOD_OUT_ACK [i] = 0;
+            PORT_WRITE(out_DECOD_OUT_VAL [i],0);
+          }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMoore.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMoore.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Decod_queue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     //--------------------------------------------------------------------
     //-----[ DECOD_IN ]---------------------------------------------------
@@ -34,5 +36,4 @@
         {
 	  internal_DECOD_IN_ACK [i] = (reg_QUEUE[num_bank].size() < _param->_size_queue);
-	  PORT_WRITE(out_DECOD_IN_ACK [i],internal_DECOD_IN_ACK [i]);
 
           num_bank = (num_bank+1)%_param->_nb_bank;
@@ -57,4 +58,6 @@
 	        PORT_WRITE(out_DECOD_OUT_OPERATION     [i],reg_QUEUE[num_bank].front()->_operation     [0]);
 	        PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE[num_bank].front()->_no_execute    [0]);
+// 	        PORT_WRITE(out_DECOD_OUT_HAVE_EVENT    [i],0);
+	        PORT_WRITE(out_DECOD_OUT_LAST_EVENT    [i],0);
 	        PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE[num_bank].front()->_is_delay_slot [0]);
 #ifdef DEBUG
@@ -86,4 +89,22 @@
     for (uint32_t i=0; i<_param->_nb_context; i++)
       PORT_WRITE(out_NB_INST_ALL [i], reg_NB_INST [i]);
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+          {
+            internal_DECOD_IN_ACK [i] = 0;
+          }
+        for (uint32_t i=0; i<_param->_nb_context; i++)
+          PORT_WRITE(out_NB_INST_ALL [i], 0);
+      }
+
+
+    // Write output
+    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+      {
+        PORT_WRITE(out_DECOD_IN_ACK [i],internal_DECOD_IN_ACK [i]);
+      }
+
 
     log_end(Decod_queue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp	(revision 123)
@@ -35,5 +35,8 @@
 
 	for (uint32_t i=0; i<_param->_nb_context; i++)
-	  reg_NB_INST [i]=0;
+          {
+            reg_NB_INST       [i]=0;
+            reg_NB_INST_EVENT [i]=0;
+          }
 
         reg_NUM_BANK_HEAD = 0;
@@ -131,9 +134,19 @@
                 // Update pointer
                 reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank;
-		reg_NB_INST [context] --;
+                
+		reg_NB_INST       [context] --;
+                if (reg_NB_INST_EVENT [context] > 0)
+                reg_NB_INST_EVENT [context] --;
 	      }
         }
 
 	//--------------------------------------------------------------------
+	//-----[ CONTEXT_EVENT ]----------------------------------------------
+	//--------------------------------------------------------------------
+        for (uint32_t i=0; i<_param->_nb_context; i++)
+          if (PORT_READ(in_CONTEXT_EVENT [i]))
+            reg_NB_INST_EVENT [i] = reg_NB_INST [i];
+
+	//--------------------------------------------------------------------
 	//-----[ OTHERS ]-----------------------------------------------------
 	//--------------------------------------------------------------------
@@ -141,9 +154,11 @@
 #if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE)
     log_printf(TRACE,Decod_queue,FUNCTION,"  * Dump decod_queue");
-    log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_NUM_BANK_HEAD : %d",reg_NUM_BANK_HEAD);
-    log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_NUM_BANK_TAIL : %d",reg_NUM_BANK_TAIL);
+    log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_NUM_BANK_HEAD     : %d",reg_NUM_BANK_HEAD);
+    log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_NUM_BANK_TAIL     : %d",reg_NUM_BANK_TAIL);
     for (uint32_t i=0; i<_param->_nb_context; i++)
-      log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_NB_INST [%d] : %d",i,reg_NB_INST [i]);
-
+      {
+    log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_NB_INST       [%d] : %d",i,reg_NB_INST [i]);
+    log_printf(TRACE,Decod_queue,FUNCTION,"    * reg_NB_INST_EVENT [%d] : %d",i,reg_NB_INST_EVENT [i]);
+      }
     for (uint32_t i=0; i<_param->_nb_bank; ++i)
       {
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMealy_decod_out.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMealy_decod_out.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMealy_decod_out.cpp	(revision 123)
@@ -25,4 +25,14 @@
     log_function(Decod_queue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
+    bool       context_val   [_param->_nb_context];
+    uint32_t   nb_inst_event [_param->_nb_context];
+    for (uint32_t i=0; i<_param->_nb_context; i++)
+      {
+        context_val   [i] = true;
+        nb_inst_event [i] = reg_NB_INST_EVENT [i];
+      }
+
     Tcontrol_t val [_param->_nb_inst_decod];
     for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
@@ -47,55 +57,72 @@
               
               Tcontext_t context         = reg_QUEUE->front()->_context_id    [index];
-              Tdepth_t   depth           = reg_QUEUE->front()->_depth         [index];
-              Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
-              Tdepth_t   depth_max       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;
-              Tcontrol_t depth_full      = PORT_READ(in_DEPTH_FULL[context]);
 
-              // is a valid instruction ?
-              // If DEPTH_CURRENT :
-              // equal at     DEPTH_MIN            -> not speculative
-              // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
-              //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
-              
-              // All case
-              // ....... min ...X... max ....... OK
-              // ....... min ....... max ...X... KO
-              // ...X... min ....... max ....... KO
-              // ....... max ....... min ...X... OK
-              // ...X... max ....... min ....... OK
-              // ....... max ...X... min ....... KO
-              
-	      Tcontrol_t is_valid = true;
-//               Tcontrol_t   is_valid      = ((depth == depth_min) or
-//                                             depth_full or
-//                                             ((depth_min <= depth_max)?
-//                                              ((depth >= depth_min) and (depth <=depth_max)):
-//                                              ((depth >= depth_min) or  (depth <=depth_max))));
-              //Tcontrol_t is_valid        = ((depth == depth_min) or 
-              //                              ((depth_min < depth_max)?
-              //                               (depth<=depth_max):
-              //                               ((depth > depth_min) or (depth <= depth_max))));
-              //Tcontrol_t is_valid        = depth <= depth_max;
+              log_printf(TRACE,Decod_queue,FUNCTION,"      * context      : %d",context);
 
-              log_printf(TRACE,Decod_queue,FUNCTION,"    * is_valid : %d",is_valid);
-              log_printf(TRACE,Decod_queue,FUNCTION,"      * context      : %d",context);
-              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth        : %d",depth);
-              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_min    : %d",depth_min);
-              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_max    : %d",depth_max);
-              log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_full   : %d",depth_full);
-#ifdef DEBUG
-              log_printf(TRACE,Decod_queue,FUNCTION,"      * address      : 0x%x (0x%x)",reg_QUEUE->front()->_address     [index],reg_QUEUE->front()->_address     [index]<<2);
-#endif
-              log_printf(TRACE,Decod_queue,FUNCTION,"      * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[index],reg_QUEUE->front()->_address_next[index]<<2);
-              internal_DECOD_OUT_VAL [index] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
-              if (is_valid)
+              if (context_val [context])
                 {
-                  val                    [i]     = 1;
-                  internal_DECOD_OUT_ACK [index] = PORT_READ(in_DECOD_OUT_ACK [i]);
-                }
-              else
-                {
-                  // Consume the instruction (to erase)
-                  internal_DECOD_OUT_ACK [index] = 1;
+
+//               Tdepth_t   depth           = reg_QUEUE->front()->_depth         [index];
+//               Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
+//               Tdepth_t   depth_max       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;
+//               Tcontrol_t depth_full      = PORT_READ(in_DEPTH_FULL[context]);
+
+                  // is a valid instruction ?
+                  // If DEPTH_CURRENT :
+                  // equal at     DEPTH_MIN            -> not speculative
+                  // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
+                  //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
+                  
+                  // All case
+                  // ....... min ...X... max ....... OK
+                  // ....... min ....... max ...X... KO
+                  // ...X... min ....... max ....... KO
+                  // ....... max ....... min ...X... OK
+                  // ...X... max ....... min ....... OK
+                  // ....... max ...X... min ....... KO
+                  
+                  Tcontrol_t is_valid = (nb_inst_event [context] == 0);
+
+//                   Tcontrol_t   is_valid      = ((depth == depth_min) or
+//                                                 depth_full or
+//                                                 ((depth_min <= depth_max)?
+//                                                  ((depth >= depth_min) and (depth <=depth_max)):
+//                                                  ((depth >= depth_min) or  (depth <=depth_max))));
+                  
+                  log_printf(TRACE,Decod_queue,FUNCTION,"    * is_valid : %d",is_valid);
+                  log_printf(TRACE,Decod_queue,FUNCTION,"      * context_val  : %d",context_val   [context]);
+                  log_printf(TRACE,Decod_queue,FUNCTION,"      * nb_inst_event: %d",nb_inst_event [context]);
+//                   log_printf(TRACE,Decod_queue,FUNCTION,"      * depth        : %d",depth);
+//                   log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_min    : %d",depth_min);
+//                   log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_max    : %d",depth_max);
+//                   log_printf(TRACE,Decod_queue,FUNCTION,"      * depth_full   : %d",depth_full);
+#ifdef DEBUG      
+                  log_printf(TRACE,Decod_queue,FUNCTION,"      * address      : 0x%x (0x%x)",reg_QUEUE->front()->_address     [index],reg_QUEUE->front()->_address     [index]<<2);
+#endif            
+                  log_printf(TRACE,Decod_queue,FUNCTION,"      * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[index],reg_QUEUE->front()->_address_next[index]<<2);
+                  internal_DECOD_OUT_VAL [index] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
+                  
+                  if (is_valid)
+                    {
+                      val                    [i]     = 1;
+                      internal_DECOD_OUT_ACK [index] = PORT_READ(in_DECOD_OUT_ACK [i]);
+                    }
+                  else
+                    {
+                      // Consume the instruction (to erase)
+                      internal_DECOD_OUT_ACK [index] = 1;
+
+                      // Have event ?
+                      if (nb_inst_event [context] > 0)
+                        {
+                          nb_inst_event [context] --;
+                          
+                          // Last event ?
+                          if (nb_inst_event [context] == 0)
+                            {
+                              context_val [context] = false;
+                            }
+                        }
+                    }
                 }
             }
@@ -107,4 +134,15 @@
         
         PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]);
+      }
+      }
+    else
+      {
+        // Reset 
+        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+          {
+            internal_DECOD_OUT_VAL [i] = 0;
+            internal_DECOD_OUT_ACK [i] = 0;
+            PORT_WRITE(out_DECOD_OUT_VAL [i],0);
+          }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMoore.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMoore.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Decod_queue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     //--------------------------------------------------------------------
     //-----[ DECOD_IN ]---------------------------------------------------
@@ -34,5 +36,4 @@
 	{
 	  internal_DECOD_IN_ACK [i] = ack;
-	  PORT_WRITE(out_DECOD_IN_ACK [i],ack);
 	}
     }
@@ -57,4 +58,6 @@
 	  PORT_WRITE(out_DECOD_OUT_OPERATION     [i],reg_QUEUE->front()->_operation     [index]);
 	  PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [index]);
+// 	  PORT_WRITE(out_DECOD_OUT_HAVE_EVENT    [i],0);
+	  PORT_WRITE(out_DECOD_OUT_LAST_EVENT    [i],0);
 	  PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [index]);
 #ifdef DEBUG
@@ -83,4 +86,21 @@
     for (uint32_t i=0; i<_param->_nb_context; i++)
       PORT_WRITE(out_NB_INST_ALL [i], reg_NB_INST [i]);
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+          {
+            internal_DECOD_IN_ACK [i] = 0;
+          }
+        for (uint32_t i=0; i<_param->_nb_context; i++)
+          PORT_WRITE(out_NB_INST_ALL [i], 0);
+      }
+      
+    // Write output
+    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+      {
+        PORT_WRITE(out_DECOD_IN_ACK [i],internal_DECOD_IN_ACK [i]);
+      }
+
 
     log_end(Decod_queue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_transition.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_transition.cpp	(revision 123)
@@ -34,5 +34,8 @@
 
 	for (uint32_t i=0; i<_param->_nb_context; i++)
-	  reg_NB_INST [i]=0;
+          {
+            reg_NB_INST       [i]=0;
+            reg_NB_INST_EVENT [i]=0;
+          }
 
         reg_LAST_SLOT = 0;
@@ -130,5 +133,8 @@
 		    log_printf(TRACE,Decod_queue,FUNCTION,_("    * context : %d"),context);
 		    
-		    reg_NB_INST [context] --;
+                    reg_NB_INST       [context] --;
+                    if (reg_NB_INST_EVENT [context] > 0)
+                    reg_NB_INST_EVENT [context] --;
+
 		    log_printf(TRACE,Decod_queue,FUNCTION,_("    * nb_inst : %d"),reg_NB_INST [context]);
 		  }
@@ -149,4 +155,11 @@
 	      }
 	  }
+
+	//--------------------------------------------------------------------
+	//-----[ CONTEXT_EVENT ]----------------------------------------------
+	//--------------------------------------------------------------------
+        for (uint32_t i=0; i<_param->_nb_context; i++)
+          if (PORT_READ(in_CONTEXT_EVENT [i]))
+            reg_NB_INST_EVENT [i] = reg_NB_INST [i];
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp	(revision 123)
@@ -25,4 +25,5 @@
     log_function(Decod_queue,FUNCTION,_name.c_str());
 
+//     if (PORT_READ(in_NRESET))
     (this->*function_genMealy_decod_out) ();
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h	(revision 123)
@@ -86,4 +86,6 @@
   public    : SC_OUT(Toperation_t       )  ** out_DECOD_OPERATION                    ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
+//public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_HAVE_EVENT                   ;//[nb_inst_decod]
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_LAST_EVENT                   ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
 #ifdef DEBUG
@@ -130,4 +132,5 @@
     // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_DECOD_ENABLE               ;//[nb_context]
+  public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_EVENT                      ;//[nb_context]
   public    : SC_IN (Tcontrol_t         )  **  in_CONTEXT_DEPTH_VAL                  ;//[nb_context]
   public    : SC_IN (Tdepth_t           )  **  in_CONTEXT_DEPTH                      ;//[nb_context]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit.cpp	(revision 123)
@@ -39,9 +39,9 @@
     usage_environment(_usage);
 
-#if DEBUG_Decod_unit == true
-    log_printf(INFO,Decod_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Decod_unit == true
+//     log_printf(INFO,Decod_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Decod_unit,FUNCTION,_("Allocation"));
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp	(revision 123)
@@ -91,4 +91,6 @@
       ALLOC1_SIGNAL_OUT(out_DECOD_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation             );
       ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE   ,"no_execute"   ,Tcontrol_t        ,1                                   );
+//    ALLOC1_SIGNAL_OUT(out_DECOD_HAVE_EVENT   ,"have_event"   ,Tcontrol_t        ,1                                   );
+      ALLOC1_SIGNAL_OUT(out_DECOD_LAST_EVENT   ,"last_event"   ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t        ,1                                   );
 #ifdef DEBUG
@@ -159,4 +161,5 @@
 
       ALLOC1_SIGNAL_IN (in_CONTEXT_DECOD_ENABLE,"decod_enable",Tcontrol_t,1);
+      ALLOC1_SIGNAL_IN (in_CONTEXT_EVENT       ,"event"       ,Tcontrol_t,1);
       ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH_VAL   ,"depth_val"   ,Tcontrol_t,1);
       ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH       ,"depth"       ,Tdepth_t  ,_param->_size_depth);
@@ -499,4 +502,8 @@
 	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_NO_EXECUTE"   ,
 		              dest,"out_DECOD_"    +toString(i)+"_NO_EXECUTE"   );
+// 	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_HAVE_EVENT"   ,
+// 		              dest,"out_DECOD_"    +toString(i)+"_HAVE_EVENT"   );
+	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_LAST_EVENT"   ,
+		              dest,"out_DECOD_"    +toString(i)+"_LAST_EVENT"   );
 	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_IS_DELAY_SLOT",
 		              dest,"out_DECOD_"    +toString(i)+"_IS_DELAY_SLOT");
@@ -569,4 +576,20 @@
 		              dest,"out_NB_INST_"+toString(i)+"_DECOD_ALL");
 	}
+
+
+
+      for (uint32_t i=0; i<_param->_nb_context; i++)
+	{
+	  dest = _name;
+
+#ifdef POSITION
+	  _component->interface_map (src ,"context_"+toString(i),
+				     dest,"context_"+toString(i));
+#endif
+	  
+          PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_EVENT"       ,
+		              dest, "in_CONTEXT_"+toString(i)+"_EVENT"       );
+
+	}
     }
     // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp	(revision 123)
@@ -47,4 +47,6 @@
         DELETE1_SIGNAL(out_DECOD_OPERATION                    ,_param->_nb_inst_decod,_param->_size_operation             );
         DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod,1                                   );
+//      DELETE1_SIGNAL(out_DECOD_HAVE_EVENT                   ,_param->_nb_inst_decod,1                                   );
+        DELETE1_SIGNAL(out_DECOD_LAST_EVENT                   ,_param->_nb_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod,1                                   );
 #ifdef DEBUG
@@ -87,4 +89,5 @@
         
         DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE                ,_param->_nb_context,1);
+        DELETE1_SIGNAL(in_CONTEXT_EVENT                       ,_param->_nb_context,1);
         DELETE1_SIGNAL(in_CONTEXT_DEPTH                       ,_param->_nb_context,_param->_size_depth);
         
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp	(revision 123)
@@ -39,9 +39,9 @@
     usage_environment(_usage);
 
-#if DEBUG_Front_end_Glue == true
-    log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
-
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Front_end_Glue == true
+//     log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> : Allocation"),_name.c_str());
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_branch_complete.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_branch_complete.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_branch_complete.cpp	(revision 123)
@@ -22,4 +22,6 @@
     log_begin(Front_end_Glue,FUNCTION);
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
       {
@@ -36,4 +38,15 @@
         PORT_WRITE(out_BRANCH_COMPLETE_ACK [i],ack);      
       }
+      }
+    else
+      {
+        // RESET
+        for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
+          {
+            PORT_WRITE(out_BRANCH_COMPLETE_PREDICTION_UNIT_VAL [i],0);
+            PORT_WRITE(out_BRANCH_COMPLETE_CONTEXT_STATE_VAL   [i],0);
+            PORT_WRITE(out_BRANCH_COMPLETE_ACK                 [i],0);      
+          }
+      }
 
     log_end(Front_end_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_decod.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_decod.cpp	(revision 123)
@@ -24,7 +24,10 @@
     // Warning : this function is an sc_method if _have_port_context_id
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_decod_unit; ++i)
       for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j)
         PORT_WRITE(out_DECOD_CONTEXT_ID [i][j],_param->_translate_context_id_from_decod_unit[i][PORT_READ(in_DECOD_DECOD_UNIT_CONTEXT_ID [i][j])]);
+      }
 
     log_end(Front_end_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_depth.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_depth.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_depth.cpp	(revision 123)
@@ -22,4 +22,6 @@
     log_begin(Front_end_Glue,FUNCTION);
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_context; ++i)
       {
@@ -48,4 +50,5 @@
           PORT_WRITE(out_DEPTH_DECOD_UNIT_FULL        [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL    [num_context]));
         }
+      }
 
     log_end(Front_end_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_event.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_event.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_event.cpp	(revision 123)
@@ -23,4 +23,6 @@
     log_function(Front_end_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_context; ++i)
       {
@@ -124,4 +126,16 @@
 #endif
       }
+      }
+    else
+      {
+        // Reset
+        for (uint32_t i=0; i<_param->_nb_context; ++i)
+          {
+            PORT_WRITE(out_EVENT_VAL                 [i], 0);
+            PORT_WRITE(out_EVENT_IFETCH_UNIT_VAL     [i], 0);
+            PORT_WRITE(out_EVENT_PREDICTION_UNIT_VAL [i], 0);
+            PORT_WRITE(out_EVENT_CONTEXT_STATE_ACK   [i], 0);
+          }
+      }
 
     log_end(Front_end_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_nb_inst.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_nb_inst.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_nb_inst.cpp	(revision 123)
@@ -22,4 +22,6 @@
     log_begin(Front_end_Glue,FUNCTION);
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_context; ++i)
       {
@@ -28,4 +30,5 @@
         PORT_WRITE(out_NB_INST_DECOD_ALL               [i], nb_inst);
         PORT_WRITE(out_NB_INST_CONTEXT_STATE_DECOD_ALL [i], nb_inst);
+      }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management.cpp	(revision 123)
@@ -38,9 +38,9 @@
     log_printf(FUNC,Address_management,FUNCTION,"Begin");
 
-#if DEBUG_Address_management == true
-    log_printf(INFO,Address_management,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Address_management == true
+//     log_printf(INFO,Address_management,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Address_management,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_genMoore.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_genMoore.cpp	(revision 123)
@@ -24,4 +24,6 @@
     log_printf(FUNC,Address_management,FUNCTION,"Begin");
 
+    if (PORT_READ(in_NRESET))
+      {
     // =========================================
     // ===== ADDRESS ===========================
@@ -30,5 +32,4 @@
     internal_ADDRESS_VAL = reg_PC_ACCESS_VAL;
 
-    PORT_WRITE(out_ADDRESS_VAL                        ,internal_ADDRESS_VAL                     );
     // Align pc on instruction packet address.
     PORT_WRITE(out_ADDRESS_INSTRUCTION_ADDRESS        ,reg_PC_ACCESS - (reg_PC_ACCESS%_param->_nb_instruction));
@@ -48,9 +49,17 @@
     internal_PREDICT_VAL = not reg_PC_NEXT_NEXT_VAL;
 
-    PORT_WRITE(out_PREDICT_VAL                  ,internal_PREDICT_VAL);
     PORT_WRITE(out_PREDICT_PC_PREVIOUS          ,reg_PC_CURRENT        );
     PORT_WRITE(out_PREDICT_PC_CURRENT           ,reg_PC_NEXT           );
     PORT_WRITE(out_PREDICT_PC_CURRENT_IS_DS_TAKE,reg_PC_NEXT_IS_DS_TAKE);
-    
+      }
+    else
+      {
+    internal_ADDRESS_VAL = 0;
+    internal_PREDICT_VAL = 0;
+      }
+
+    PORT_WRITE(out_ADDRESS_VAL,internal_ADDRESS_VAL);
+    PORT_WRITE(out_PREDICT_VAL,internal_PREDICT_VAL);
+
     log_printf(FUNC,Address_management,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp	(revision 123)
@@ -222,5 +222,5 @@
       std::string instruction_enable;
       for (uint32_t i=0; i<_param->_nb_instruction; ++i)
-        instruction_enable += toString(reg_PC_ACCESS_INSTRUCTION_ENABLE [i])+ " ";
+        instruction_enable += ((reg_PC_ACCESS_VAL)?(toString(reg_PC_ACCESS_INSTRUCTION_ENABLE [i])):"X") + " ";
 
       log_printf(TRACE,Address_management,FUNCTION,"    * Access    : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s",
@@ -238,5 +238,5 @@
       std::string instruction_enable;
       for (uint32_t i=0; i<_param->_nb_instruction; ++i)
-        instruction_enable += toString(reg_PC_CURRENT_INSTRUCTION_ENABLE [i])+ " ";
+        instruction_enable += ((reg_PC_CURRENT_VAL)?(toString(reg_PC_CURRENT_INSTRUCTION_ENABLE [i])):"X") + " ";
 
       log_printf(TRACE,Address_management,FUNCTION,"    * Current   : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s",
@@ -254,5 +254,5 @@
       std::string instruction_enable;
       for (uint32_t i=0; i<_param->_nb_instruction; ++i)
-        instruction_enable += toString(reg_PC_NEXT_INSTRUCTION_ENABLE [i])+ " ";
+        instruction_enable += ((reg_PC_NEXT_VAL)?(toString(reg_PC_NEXT_INSTRUCTION_ENABLE [i])):"X") + " ";
 
       log_printf(TRACE,Address_management,FUNCTION,"    * Next      : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s",
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue.cpp	(revision 123)
@@ -38,9 +38,9 @@
     log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
 
-#if DEBUG_Ifetch_queue == true
-    log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Ifetch_queue == true
+//     log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_deallocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_deallocation.cpp	(revision 123)
@@ -36,9 +36,9 @@
         DELETE0_SIGNAL( in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth          );
         DELETE0_SIGNAL(out_ADDRESS_IFETCH_QUEUE_ID            ,_param->_size_ifetch_queue_ptr);
-        DELETE1_SIGNAL( in_ADDRESS_INSTRUCTION_ENABLE         ,1,_param->_nb_instruction);
+        DELETE1_SIGNAL( in_ADDRESS_INSTRUCTION_ENABLE         ,_param->_nb_instruction,1);
       
-        DELETE1_SIGNAL(out_DECOD_VAL                        ,1,_param->_nb_instruction);
-        DELETE1_SIGNAL( in_DECOD_ACK                        ,1,_param->_nb_instruction);
-        DELETE1_SIGNAL(out_DECOD_INSTRUCTION                ,_param->_size_instruction,_param->_nb_instruction);
+        DELETE1_SIGNAL(out_DECOD_VAL                        ,_param->_nb_instruction,1);
+        DELETE1_SIGNAL( in_DECOD_ACK                        ,_param->_nb_instruction,1);
+        DELETE1_SIGNAL(out_DECOD_INSTRUCTION                ,_param->_nb_instruction,_param->_size_instruction);
         DELETE0_SIGNAL(out_DECOD_ADDRESS                    ,_param->_size_instruction_address);
         DELETE0_SIGNAL(out_DECOD_INST_IFETCH_PTR            ,_param->_size_inst_ifetch_ptr );
@@ -51,5 +51,5 @@
         DELETE0_SIGNAL( in_ICACHE_RSP_PACKET_ID  ,_param->_size_ifetch_queue_ptr);
         DELETE0_SIGNAL( in_ICACHE_RSP_ERROR      ,_param->_size_icache_error);
-        DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_size_instruction,_param->_nb_instruction);
+        DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_nb_instruction,_param->_size_instruction);
 
         DELETE0_SIGNAL( in_EVENT_RESET_VAL,1);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_genMoore.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_genMoore.cpp	(revision 123)
@@ -23,4 +23,6 @@
     log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
 
+    if (PORT_READ(in_NRESET))
+      {
     // ==========================================================
     // =====[ ADDRESS ]==========================================
@@ -29,5 +31,4 @@
       internal_ADDRESS_ACK = (_queue[reg_PTR_WRITE]->_state == IFETCH_QUEUE_STATE_EMPTY);
       
-      PORT_WRITE(out_ADDRESS_ACK            , internal_ADDRESS_ACK);
       if (_param->_have_port_ifetch_queue_ptr)
       PORT_WRITE(out_ADDRESS_IFETCH_QUEUE_ID, reg_PTR_WRITE);
@@ -43,5 +44,4 @@
         {
           internal_DECOD_VAL [i] = ack and _queue[reg_PTR_READ]->_instruction_enable [i];
-          PORT_WRITE(out_DECOD_VAL         [i], internal_DECOD_VAL [i]);
           PORT_WRITE(out_DECOD_INSTRUCTION [i],         _queue[reg_PTR_READ]->_instruction        [i]);
         }
@@ -55,4 +55,18 @@
       PORT_WRITE(out_DECOD_EXCEPTION                  , _queue[reg_PTR_READ]->_exception                  );
     }
+      }
+    else
+      {
+        // Reset
+        internal_ADDRESS_ACK = 0;
+        for (uint32_t i=0; i<_param->_nb_instruction; i++)
+          internal_DECOD_VAL [i] = 0;
+        
+      }
+
+    // Write Output
+    PORT_WRITE(out_ADDRESS_ACK  , internal_ADDRESS_ACK);
+    for (uint32_t i=0; i<_param->_nb_instruction; i++)
+    PORT_WRITE(out_DECOD_VAL [i], internal_DECOD_VAL [i]);
 
     log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue.cpp	(revision 123)
@@ -38,9 +38,9 @@
     log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin");
 
-#if DEBUG_Ifetch_unit_Glue == true
-    log_printf(INFO,Ifetch_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Ifetch_unit_Glue == true
+//     log_printf(INFO,Ifetch_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Ifetch_unit_Glue,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_event.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_event.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_event.cpp	(revision 123)
@@ -24,4 +24,6 @@
     log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin");
 
+    if (PORT_READ(in_NRESET))
+      {
     Tcontrol_t address_ack = PORT_READ(in_EVENT_ADDRESS_ACK);
     Tcontrol_t queue_ack   = PORT_READ(in_EVENT_QUEUE_ACK  );
@@ -31,5 +33,12 @@
     PORT_WRITE(out_EVENT_ADDRESS_VAL, val         and queue_ack);
     PORT_WRITE(out_EVENT_QUEUE_VAL  , address_ack and val);
-    
+      }
+    else
+      {
+    PORT_WRITE(out_EVENT_ACK        , 0);
+    PORT_WRITE(out_EVENT_ADDRESS_VAL, 0);
+    PORT_WRITE(out_EVENT_QUEUE_VAL  , 0);
+      }
+
     log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_icache_req.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_icache_req.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_icache_req.cpp	(revision 123)
@@ -24,4 +24,6 @@
     log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin");
 
+    if (PORT_READ(in_NRESET))
+      {
     Tcontrol_t address_val = PORT_READ(in_ICACHE_REQ_ADDRESS_VAL);
     Tcontrol_t queue_ack   = PORT_READ(in_ICACHE_REQ_QUEUE_ACK  );
@@ -35,4 +37,12 @@
     PORT_WRITE(out_ICACHE_REQ_ADDRESS      ,address);
     PORT_WRITE(out_ICACHE_REQ_QUEUE_ADDRESS,address);
+      }
+    else
+      {
+        // RESET
+        PORT_WRITE(out_ICACHE_REQ_VAL        , 0);
+        PORT_WRITE(out_ICACHE_REQ_ADDRESS_ACK, 0);
+        PORT_WRITE(out_ICACHE_REQ_QUEUE_VAL  , 0);
+      }
     
     log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit.cpp	(revision 123)
@@ -37,9 +37,9 @@
     log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
 
-#if DEBUG_Ifetch_unit == true
-    log_printf(INFO,Ifetch_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Ifetch_unit == true
+//     log_printf(INFO,Ifetch_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp	(revision 123)
@@ -40,5 +40,5 @@
         DELETE0_SIGNAL( in_ICACHE_RSP_PACKET_ID  ,_param->_size_ifetch_queue_ptr   );
         DELETE0_SIGNAL( in_ICACHE_RSP_ERROR      ,_param->_size_icache_error);
-        DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_size_instruction,_param->_nb_instruction);
+        DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_nb_instruction, _param->_size_instruction);
 
         DELETE0_SIGNAL(out_PREDICT_VAL                        ,1);
@@ -52,5 +52,5 @@
         DELETE0_SIGNAL( in_PREDICT_BRANCH_STATE               ,_param->_size_branch_state);
         DELETE0_SIGNAL( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth);
-        DELETE1_SIGNAL( in_PREDICT_INSTRUCTION_ENABLE         ,1,_param->_nb_instruction);
+        DELETE1_SIGNAL( in_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_instruction,1);
 
     //  DELETE0_SIGNAL(out_DECOD_CONTEXT_ID                 ,_param->_size_context_id);
@@ -62,5 +62,5 @@
         DELETE1_SIGNAL(out_DECOD_VAL                        ,1,_param->_nb_instruction);
         DELETE1_SIGNAL( in_DECOD_ACK                        ,1,_param->_nb_instruction);
-        DELETE1_SIGNAL(out_DECOD_INSTRUCTION                ,_param->_size_instruction,_param->_nb_instruction);
+        DELETE1_SIGNAL(out_DECOD_INSTRUCTION                ,_param->_nb_instruction,_param->_size_instruction);
 
         DELETE0_SIGNAL( in_EVENT_VAL              ,1);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue.cpp	(revision 123)
@@ -39,9 +39,9 @@
     log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
 
-#if DEBUG_Branch_Target_Buffer_Glue == true
-    log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
-
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Branch_Target_Buffer_Glue == true
+//     log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
       {
@@ -62,4 +64,15 @@
 	  }
       }
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+          {
+            PORT_WRITE(out_DECOD_ACK            [i], 0);
+            PORT_WRITE(out_DECOD_REGISTER_VAL   [i], 0);
+            if (_param->_have_port_victim)
+            PORT_WRITE(out_DECOD_VICTIM_VAL     [i], 0);
+          }
+      }
 
     log_end(Branch_Target_Buffer_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
       {
@@ -83,4 +85,15 @@
 	  }
       }
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+          {
+            PORT_WRITE(out_PREDICT_ACK            [i], 0);
+            PORT_WRITE(out_PREDICT_REGISTER_VAL   [i], 0);
+            if (_param->_have_port_victim)
+            PORT_WRITE(out_PREDICT_VICTIM_VAL     [i], 0);
+          }
+      }
 
     log_end(Branch_Target_Buffer_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_update; i++)
       {
@@ -52,4 +54,15 @@
 	  }
       }
+      }
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_inst_update; i++)
+          {
+            PORT_WRITE(out_UPDATE_ACK            [i], 0);
+            PORT_WRITE(out_UPDATE_REGISTER_VAL   [i], 0);
+            if (_param->_have_port_victim)
+            PORT_WRITE(out_UPDATE_VICTIM_VAL     [i], 0);
+          }
+      }
 
     log_end(Branch_Target_Buffer_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp	(revision 123)
@@ -38,9 +38,9 @@
     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
 
-#if DEBUG_Branch_Target_Buffer_Register == true
-    log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,_("<%s> Parameters"),_name.c_str());
-
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Branch_Target_Buffer_Register == true
+//     log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
       {
@@ -55,5 +57,12 @@
 	  }
       }
-
+      }
+    else
+      {
+// 	internal_DECOD_HIT       [i] = hit      ;
+// 	internal_DECOD_NUM_BANK  [i] = num_bank ;
+// 	internal_DECOD_NUM_ENTRY [i] = num_entry;
+      }
+    
     log_end(Branch_Target_Buffer_Register,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_predict.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str());
     
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
       {
@@ -64,4 +66,8 @@
 	  }
       }
+      }
+//     else
+//       {
+//       }
 
     log_end(Branch_Target_Buffer_Register,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_update; i++)
       {
@@ -55,4 +57,11 @@
 	  }
       }
+      }
+//     else
+//       {
+// 	internal_UPDATE_HIT       [i] = hit      ;
+// 	internal_UPDATE_NUM_BANK  [i] = num_bank ;
+// 	internal_UPDATE_NUM_ENTRY [i] = num_entry;
+//       }
 
     log_end(Branch_Target_Buffer_Register,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer.cpp	(revision 123)
@@ -40,9 +40,9 @@
     log_printf(INFO,Branch_Target_Buffer,FUNCTION,"Allocation");
 
-#if DEBUG_Branch_Target_Buffer == true
-    log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Branch_Target_Buffer == true
+//     log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     allocation (
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp	(revision 123)
@@ -40,9 +40,9 @@
 
 
-#if DEBUG_Direction_Glue == true
-    log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
-
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Direction_Glue == true
+//     log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Direction_Glue,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_predict.cpp	(revision 123)
@@ -26,4 +26,13 @@
     log_function(Direction_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
+//         std::cout << "Kane (before) " << std::endl;
+//         std::cout << _param << std::endl;
+//         std::cout << _param->_nb_inst_update << std::endl;
+//         std::cout << _param->_nb_inst_predict<< std::endl;
+//         std::cout << "Kane (end) " << std::endl;
+
+
     // constant direction : never / always 
     for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
@@ -31,5 +40,5 @@
         log_printf(TRACE,Direction_Glue,FUNCTION,"  * PREDICT [%d]",i);
 
-        Tcontrol_t direction;
+        Tcontrol_t direction = false;
 
         switch (_param->_predictor_scheme)
@@ -86,4 +95,17 @@
         PORT_WRITE(out_PREDICT_DIRECTION   [i], direction);
       }
+      }
+    else
+      {
+        //RESET
+        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+          {
+            if (_param->_have_component_meta_predictor)
+              {
+            PORT_WRITE(out_PREDICT_PREDICTOR_VAL [i], 0);
+            PORT_WRITE(out_PREDICT_ACK           [i], 0);
+              }
+          }
+      }
 
     log_end(Direction_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_update.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_update.cpp	(revision 123)
@@ -26,4 +26,6 @@
     log_function(Direction_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_update; i++)
       {
@@ -35,5 +37,15 @@
 	PORT_WRITE(out_UPDATE_PREDICTOR_PREDICTION_IFETCH [i], PORT_READ(in_UPDATE_PREDICTION_IFETCH [i]));
       }
-    
+      }
+    else
+      {
+        // RESET
+        for (uint32_t i=0; i<_param->_nb_inst_update; i++)
+          {
+            PORT_WRITE(out_UPDATE_PREDICTOR_VAL [i], 0);
+            PORT_WRITE(out_UPDATE_ACK           [i], 0);
+          }
+      }
+
     log_end(Direction_Glue,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict.cpp	(revision 123)
@@ -27,4 +27,6 @@
     log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_predict; ++i)
       {
@@ -89,4 +91,8 @@
         PORT_WRITE(out_PREDICT_DIRECTION [i],direction);
       }
+      }
+//     else
+//       {
+//       }
 
     log_end(Meta_Predictor_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_valack.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_valack.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_valack.cpp	(revision 123)
@@ -27,4 +27,6 @@
     log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_predict; ++i)
       {
@@ -40,4 +42,15 @@
 
         PORT_WRITE(out_PREDICT_ACK [i],ack);
+      }
+      }
+    else
+      {
+        // Reset
+        for (uint32_t i=0; i<_param->_nb_inst_predict; ++i)
+          {
+            for (uint32_t j=0; j<_param->_nb_predictor; ++j)
+              PORT_WRITE(out_PREDICT_PREDICTOR_VAL [j][i],0);
+            PORT_WRITE(out_PREDICT_ACK [i],0);
+          }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update.cpp	(revision 123)
@@ -27,4 +27,6 @@
     log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_update; ++i)
       {
@@ -112,4 +114,9 @@
           }
       }
+      }
+//     else
+//       {
+//         // RESET
+//       }
 
     log_end(Meta_Predictor_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update_valack.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update_valack.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update_valack.cpp	(revision 123)
@@ -27,4 +27,6 @@
     log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_update; ++i)
       {
@@ -40,4 +42,15 @@
 
         PORT_WRITE(out_UPDATE_ACK [i],ack);
+      }
+      }
+    else
+      {
+        // RESET
+        for (uint32_t i=0; i<_param->_nb_inst_update; ++i)
+          {
+            for (uint32_t j=0; j<_param->_nb_predictor; ++j)
+              PORT_WRITE(out_UPDATE_PREDICTOR_VAL [j][i],0);
+            PORT_WRITE(out_UPDATE_ACK [i],0);
+          }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp	(revision 123)
@@ -29,4 +29,6 @@
     log_function(Two_Level_Branch_Predictor,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     // ===================================================================
     // =====[ PREDICT ]===================================================
@@ -95,4 +97,5 @@
           PORT_WRITE(out_PREDICT_HISTORY   [i],history  );
         }
+      }
 
     log_end(Two_Level_Branch_Predictor,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp	(revision 123)
@@ -38,9 +38,9 @@
     log_printf(FUNC,Direction,FUNCTION,"Begin");
 
-#if DEBUG_Direction == true
-    log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Direction == true
+//     log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif
+//     std::cout << *param << std::endl;
+// #endif
 
     log_printf(INFO,Direction,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp	(revision 123)
@@ -40,9 +40,9 @@
     usage_environment(_usage);
 
-#if DEBUG_Prediction_unit_Glue == true
-    log_printf(INFO,Prediction_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
-
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Prediction_unit_Glue == true
+//     log_printf(INFO,Prediction_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp	(revision 123)
@@ -290,4 +290,18 @@
 	  PORT_WRITE(out_DECOD_ACK [i][j], ack[j]);
       }
+    else
+      {
+        // Reset
+        for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+          {
+            PORT_WRITE(out_DECOD_BTB_VAL [i], 0);
+            PORT_WRITE(out_DECOD_RAS_VAL [i], 0);
+            PORT_WRITE(out_DECOD_UPT_VAL [i], 0);
+          }
+        
+        for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+          for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+            PORT_WRITE(out_DECOD_ACK [i][j], 0);
+      }
     log_end(Prediction_unit_Glue,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp	(revision 123)
@@ -420,4 +420,17 @@
       PORT_WRITE(out_PREDICT_ACK[i],ack[i]);
       }
+    else
+      {
+        // RESET
+        for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
+          {
+            PORT_WRITE(out_PREDICT_BTB_VAL [i], 0);
+            PORT_WRITE(out_PREDICT_DIR_VAL [i], 0);
+            PORT_WRITE(out_PREDICT_RAS_VAL [i], 0);
+            PORT_WRITE(out_PREDICT_UPT_VAL [i], 0);
+          }
+        for (uint32_t i=0; i<_param->_nb_context; i++)
+          PORT_WRITE(out_PREDICT_ACK[i],0);
+      }
 
     log_end(Prediction_unit_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp	(revision 123)
@@ -25,4 +25,6 @@
     log_function(Prediction_unit_Glue,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
       {
@@ -88,4 +90,16 @@
         PORT_WRITE(out_UPDATE_UPT_ACK [i], upt_ack);
       }
+      }
+    else
+      {
+        // RESET
+        for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+          {
+            PORT_WRITE(out_UPDATE_BTB_VAL [i], 0);
+            PORT_WRITE(out_UPDATE_DIR_VAL [i], 0);
+            PORT_WRITE(out_UPDATE_RAS_VAL [i], 0);
+            PORT_WRITE(out_UPDATE_UPT_ACK [i], 0);
+          }
+      }
 
     log_end(Prediction_unit_Glue,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp	(revision 123)
@@ -38,9 +38,9 @@
     log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
 
-#if DEBUG_Return_Address_Stac == true
-    log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Return_Address_Stac == true
+//     log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Return_Address_Stack,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_decod.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_decod.cpp	(revision 123)
@@ -66,4 +66,9 @@
       }
       }
+    else
+      {
+// 	internal_DECOD_HIT [i] = (push or (reg_NB_ELT[context]>0));
+      }
+
     log_end(Return_Address_Stack,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_predict.cpp	(revision 123)
@@ -25,5 +25,5 @@
     log_function(Return_Address_Stack,FUNCTION,_name.c_str());
 
-    if (PORT_READ(in_NRESET) == 1)
+    if (PORT_READ(in_NRESET))
       {
 #ifdef DEBUG_TEST
@@ -69,4 +69,10 @@
       }
       }
+    else
+      {
+//     for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+// 	internal_PREDICT_HIT [i] = (push or (reg_PREDICT_NB_ELT[context]>0));
+
+      }
 
     log_end(Return_Address_Stack,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h	(revision 123)
@@ -54,5 +54,6 @@
       UPT_EVENT_STATE_KO_DECODE_WAIT_END_EVENT        , // prediction unit is ok, wait the end of event (send by Context State)
       UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT        , // prediction unit is update, send signal to context manager
-      UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT          // prediction unit is ok, wait the end of event (send by Context State)
+      UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT        , // prediction unit is ok, wait the end of event (send by Context State)
+      UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE         // prediction unit is ok, wait the end of event (send by Context State)
     } upt_event_state_t;
 
@@ -226,4 +227,5 @@
       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT  : return "UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT"  ; break;
       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT  : return "UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT"  ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE : return "UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE" ; break;
       default    : return ""; break; 
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp	(revision 123)
@@ -40,9 +40,9 @@
     usage_environment(_usage);
 
-#if DEBUG_Update_Prediction_Table == true
-    log_printf(INFO,Update_Prediction_Table,FUNCTION,_("<%s> Parameters"),_name.c_str());
-
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Update_Prediction_Table == true
+//     log_printf(INFO,Update_Prediction_Table,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Update_Prediction_Table,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp	(revision 123)
@@ -24,5 +24,7 @@
     log_begin(Update_Prediction_Table,FUNCTION);
     log_function(Update_Prediction_Table,FUNCTION,_name.c_str());
-    
+
+    if (PORT_READ(in_NRESET))
+      {
     for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
 #ifdef DEBUG_TEST
@@ -129,5 +131,5 @@
 // 	PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_DEST    [i], internal_BRANCH_COMPLETE_ADDRESS_DEST    [i]);
       }
-
+      }
     log_end(Update_Prediction_Table,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp	(revision 123)
@@ -68,4 +68,11 @@
       }
       }
+    else
+      {
+        // RESET
+        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+          PORT_WRITE(out_DECOD_ACK          [i], 0);
+      }
+
     log_end(Update_Prediction_Table,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_predict.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_predict.cpp	(revision 123)
@@ -57,5 +57,4 @@
  	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * ACK         : %d",internal_PREDICT_ACK [i]);
 
-	PORT_WRITE(out_PREDICT_ACK                  [i], internal_PREDICT_ACK                  [i]);
         if (_param->_have_port_depth)
         PORT_WRITE(out_PREDICT_UPDATE_PREDICTION_ID [i], internal_PREDICT_UPDATE_PREDICTION_ID [i]);
@@ -63,4 +62,15 @@
 
       }//don't reset
+    else
+      {
+        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+          {
+            internal_PREDICT_ACK [i] = 0;
+//          internal_PREDICT_UPDATE_PREDICTION_ID [i] = top;
+          }
+      }
+
+    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+      PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]);
 
     log_end(Update_Prediction_Table,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 123)
@@ -248,5 +248,4 @@
         internal_UPDATE_CONTEXT_ID      [i] = context;
 
-	PORT_WRITE(out_UPDATE_VAL                   [i],internal_UPDATE_VAL [i]);
         if (val)
           {
@@ -282,5 +281,4 @@
 	Tcontrol_t val = ((reg_UPT_EVENT_STATE [i] == UPT_EVENT_STATE_KO_DECODE_UPDATE_CONTEXT) or
                           (reg_UPT_EVENT_STATE [i] == UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT));
-        PORT_WRITE(out_BRANCH_EVENT_VAL              [i],val);
         if (_param->_have_port_depth)
         PORT_WRITE(out_BRANCH_EVENT_DEPTH            [i],reg_EVENT_DEPTH            [i]);
@@ -301,4 +299,6 @@
             internal_UPDATE_VAL             [i] = 0;
             internal_UPDATE_VAL_WITHOUT_ACK [i] = 0;
+            internal_UPDATE_CONTEXT_ID      [i] = 0;
+        
           }
         for (uint32_t i=0; i<_param->_nb_context; i++)
@@ -308,4 +308,9 @@
       }
 
+    // Write output
+    for (uint32_t i=0; i<_param->_nb_inst_update; i++)
+      PORT_WRITE(out_UPDATE_VAL       [i],internal_UPDATE_VAL [i]);
+    for (uint32_t i=0; i<_param->_nb_context; i++)
+      PORT_WRITE(out_BRANCH_EVENT_VAL [i],internal_BRANCH_EVENT_VAL [i]);
 
     log_end(Update_Prediction_Table,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 123)
@@ -545,4 +545,8 @@
                         }
                       
+                      // Test if freeing the branch with no accurate ?
+                      if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko)
+                        reg_IS_ACCURATE [context] = true;
+
                       // Update pointer
                       //  * if update RAS : update pointer is decreaste until it equal at top pointer
@@ -577,5 +581,4 @@
                                 }
                               
-                              reg_UPT_EVENT_STATE [context] = upt_event_state;
                             }
                           else
@@ -593,7 +596,16 @@
                         }
                       
-                      // Test if freeing the branch with no accurate ?
-                      if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko)
-                        reg_IS_ACCURATE [context] = true;
+                      // special case :
+                      if ((upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) and
+                          (reg_UPT_UPDATE [context] == reg_EVENT_UPT_PTR [context]))
+                        {
+                          reg_UPT_TOP     [context] = reg_UPT_TOP_EVENT [context];
+                          reg_UPT_UPDATE  [context] = reg_UPT_TOP_EVENT [context];
+                          reg_IS_ACCURATE [context] = true;
+
+                          upt_event_state = UPT_EVENT_STATE_OK;
+                        }
+
+                      reg_UPT_EVENT_STATE [context] = upt_event_state;
 
                       log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_UPDATE (after ) : %d",reg_UPT_UPDATE[context]);
@@ -654,8 +666,8 @@
                         
                         Taddress_t        address_src         = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;
-                        upt_state_t       event_top           = reg_UPDATE_PREDICTION_TABLE [context][top]._state;
+                        upt_state_t       top_state           = reg_UPDATE_PREDICTION_TABLE [context][top]._state;
                         
                         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * upt_event_state     : %s",toString(upt_event_state).c_str());
-                        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * event_top           : %s",toString(event_top).c_str());
+                        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top_state           : %s",toString(top_state).c_str());
                         
                         bool              previous_ufpt_event = (reg_UFPT_EVENT_STATE [i] == UFPT_EVENT_STATE_KO_FLUSH);
@@ -667,6 +679,7 @@
                                                                  or (upt_event_state == UPT_EVENT_STATE_KO_EVENT_WAIT_UFPT)
                                                                  or (upt_event_state == UPT_EVENT_STATE_KO_EVENT_FLUSH_UPT)
-                                                                 or (event_top       == UPDATE_PREDICTION_STATE_END_KO    )
-                                                                 or (event_top       == UPDATE_PREDICTION_STATE_KO        )
+                                                                 or (upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE)
+                                                                 or (top_state       == UPDATE_PREDICTION_STATE_END_KO    )
+                                                                 or (top_state       == UPDATE_PREDICTION_STATE_KO        )
                                                                  );
                         
@@ -706,7 +719,8 @@
                                 reg_UPDATE_PREDICTION_TABLE [context][top]._retire_ok = false;
                                 
-                                switch (event_top)
+                                switch (top_state)
                                   {
                                   case UPDATE_PREDICTION_STATE_END_KO : 
+                                  case UPDATE_PREDICTION_STATE_END    : 
                                     {
                                       // Have already update predictor
@@ -867,5 +881,6 @@
                       case UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT :
                         {
-                          Tdepth_t depth = reg_EVENT_UPT_PTR [i];
+                          Tdepth_t depth  = reg_EVENT_UPT_PTR [i];
+                          Tdepth_t update = reg_UPT_UPDATE    [i];
                           
                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth : %d",depth);
@@ -878,8 +893,17 @@
                             }
 
-                            reg_UPT_TOP    [i] = reg_UPT_TOP_EVENT [i];
-                            reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i];
-
-                          // break; continue
+                          // Special case : branch_complete a speculative branch and the context_state signal the end of this event before the complete of previous branch
+                          if (depth != update)
+                            {
+                              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_COMMIT_WAIT_END_UPDATE (event)",i);
+                              upt_event_state = UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE;
+
+                              break; // stop here
+                             }
+
+                          reg_UPT_TOP    [i] = reg_UPT_TOP_EVENT [i];
+                          reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i];
+
+//                             break; continue
                         }
                       case UPT_EVENT_STATE_KO_DECODE_WAIT_END_EVENT :
@@ -906,4 +930,13 @@
                     // Flush UPFT
                     flush_UFPT [i] = true;
+
+                    if (upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE)
+                      {
+                        reg_UPT_TOP     [i] = reg_UPT_TOP_EVENT [i];
+                        reg_UPT_UPDATE  [i] = reg_UPT_TOP_EVENT [i];
+                        reg_IS_ACCURATE [i] = true;
+                        
+                        upt_event_state = UPT_EVENT_STATE_OK;
+                      }
                     
                     // Flush UPT
@@ -978,5 +1011,7 @@
                     reg_EVENT_UPT_PTR         [i] = top;
                     reg_EVENT_UPT_FULL        [i] = (not empty and (bottom == reg_UPT_TOP [i]));
+//                  reg_EVENT_DEPTH           [i] = PORT_READ(in_EVENT_DEPTH [i]);//(top+1)%_param->_size_upt_queue[i];
                     reg_EVENT_DEPTH           [i] = top;
+
 //                  reg_EVENT_ADDRESS_SRC     [i] = address_src; // delay_slot is compute in I_State
 //                  reg_EVENT_ADDRESS_DEST_VAL[i] = good_take;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp	(revision 123)
@@ -37,9 +37,9 @@
     log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
 
-#if DEBUG_Prediction_unit == true
-    log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Prediction_unit == true
+//     log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Prediction_unit,FUNCTION,"Allocation");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h	(revision 123)
@@ -93,4 +93,6 @@
   public    : SC_OUT(Toperation_t         ) ** out_DECOD_OPERATION                 ;//[sum_inst_decod]
   public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_NO_EXECUTE                ;//[sum_inst_decod]
+//public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_HAVE_EVENT                ;//[sum_inst_decod]
+  public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_LAST_EVENT                ;//[sum_inst_decod]
   public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_IS_DELAY_SLOT             ;//[sum_inst_decod]
 #ifdef DEBUG
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end.cpp	(revision 123)
@@ -38,9 +38,9 @@
     usage_environment(_usage);
 
-#if DEBUG_Core == true
-    log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Core == true
+//     log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Front_end,FUNCTION,_("<%s> : Allocation"),_name.c_str());
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp	(revision 123)
@@ -101,4 +101,6 @@
       ALLOC1_SIGNAL_OUT (out_DECOD_OPERATION                  ,"OPERATION"        ,Toperation_t         ,_param->_size_operation             );
       ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE                 ,"NO_EXECUTE"       ,Tcontrol_t           ,1                                   );
+//    ALLOC1_SIGNAL_OUT (out_DECOD_HAVE_EVENT                 ,"HAVE_EVENT"       ,Tcontrol_t           ,1                                   );
+      ALLOC1_SIGNAL_OUT (out_DECOD_LAST_EVENT                 ,"LAST_EVENT"       ,Tcontrol_t           ,1                                   );
       ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT              ,"IS_DELAY_SLOT"    ,Tcontrol_t           ,1                                   );
 #ifdef DEBUG
@@ -726,4 +728,8 @@
           PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NO_EXECUTE"   ,
                               dest,"out_DECOD_"+toString(x)+"_NO_EXECUTE"   );
+//           PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAVE_EVENT"   ,
+//                               dest,"out_DECOD_"+toString(x)+"_HAVE_EVENT"   );
+          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_LAST_EVENT"   ,
+                              dest,"out_DECOD_"+toString(x)+"_LAST_EVENT"   );
           PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT",
                               dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT");
@@ -865,4 +871,6 @@
           COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_DECOD_ENABLE",
                                    dest,"out_CONTEXT_"+toString(y)+"_DECOD_ENABLE");
+          COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_EVENT",
+                                   dest,"out_CONTEXT_"+toString(y)+"_EVENT");
 
           dest = _name+"_glue";
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp	(revision 123)
@@ -47,5 +47,7 @@
         DELETE1_SIGNAL(out_DECOD_TYPE                       ,_param->_sum_inst_decod,_param->_size_type                  );
         DELETE1_SIGNAL(out_DECOD_OPERATION                  ,_param->_sum_inst_decod,_param->_size_operation             );
-        DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                 ,_param->_sum_inst_decod,1                                   );
+	DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                 ,_param->_sum_inst_decod,1                                   );
+//      DELETE1_SIGNAL(out_DECOD_HAVE_EVENT                 ,_param->_sum_inst_decod,1                                   );
+        DELETE1_SIGNAL(out_DECOD_LAST_EVENT                 ,_param->_sum_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT              ,_param->_sum_inst_decod,1                                   );
 #ifdef DEBUG
