Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/test.cpp	(revision 105)
@@ -72,4 +72,5 @@
   ALLOC1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT      ,"out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT      ",Tcontrol_t        ,_param->_nb_front_end);
   ALLOC1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS            ,"out_COMMIT_EVENT_FRONT_END_ADDRESS            ",Taddress_t        ,_param->_nb_front_end);
+  ALLOC1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL   ,"out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL   ",Tcontrol_t        ,_param->_nb_front_end);
   ALLOC1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR       ,"out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR       ",Taddress_t        ,_param->_nb_front_end);
   ALLOC1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ,"out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ",Tcontrol_t        ,_param->_nb_front_end);
@@ -83,4 +84,5 @@
   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT     ," in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT     ",Tcontrol_t        ,_param->_nb_ooo_engine);
   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS           ," in_COMMIT_EVENT_OOO_ENGINE_ADDRESS           ",Taddress_t        ,_param->_nb_ooo_engine);
+  ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL  ," in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL  ",Tcontrol_t        ,_param->_nb_ooo_engine);
   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR      ," in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR      ",Taddress_t        ,_param->_nb_ooo_engine);
   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ," in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ",Tcontrol_t        ,_param->_nb_ooo_engine);
@@ -208,4 +210,5 @@
   INSTANCE1_SC_SIGNAL(_Core_Glue,out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT      ,_param->_nb_front_end);
   INSTANCE1_SC_SIGNAL(_Core_Glue,out_COMMIT_EVENT_FRONT_END_ADDRESS            ,_param->_nb_front_end);
+  INSTANCE1_SC_SIGNAL(_Core_Glue,out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL   ,_param->_nb_front_end);
   INSTANCE1_SC_SIGNAL(_Core_Glue,out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR       ,_param->_nb_front_end);
   INSTANCE1_SC_SIGNAL(_Core_Glue,out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ,_param->_nb_front_end);
@@ -222,4 +225,5 @@
   INSTANCE1_SC_SIGNAL(_Core_Glue, in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT     ,_param->_nb_ooo_engine);
   INSTANCE1_SC_SIGNAL(_Core_Glue, in_COMMIT_EVENT_OOO_ENGINE_ADDRESS           ,_param->_nb_ooo_engine);
+  INSTANCE1_SC_SIGNAL(_Core_Glue, in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL  ,_param->_nb_ooo_engine);
   INSTANCE1_SC_SIGNAL(_Core_Glue, in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR      ,_param->_nb_ooo_engine);
   INSTANCE1_SC_SIGNAL(_Core_Glue, in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ,_param->_nb_ooo_engine);
@@ -421,4 +425,5 @@
           in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT   [i]->write(rand()%2);
           in_COMMIT_EVENT_OOO_ENGINE_ADDRESS         [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
+          in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL[i]->write(rand()%2);
           in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR    [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
           in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL[i]->write(rand()%2);
@@ -549,4 +554,6 @@
             TEST(Taddress_t   ,out_COMMIT_EVENT_FRONT_END_ADDRESS          [x]->read(),
                                 in_COMMIT_EVENT_OOO_ENGINE_ADDRESS         [i]->read());
+            TEST(Tcontrol_t   ,out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL [x]->read(),
+                                in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL[i]->read());
             TEST(Taddress_t   ,out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR     [x]->read(),
                                 in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR    [i]->read());
@@ -691,4 +698,5 @@
   DELETE1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT      ,_param->_nb_front_end);
   DELETE1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS            ,_param->_nb_front_end);
+  DELETE1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL   ,_param->_nb_front_end);
   DELETE1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR       ,_param->_nb_front_end);
   DELETE1_SC_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ,_param->_nb_front_end);
@@ -702,4 +710,5 @@
   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT     ,_param->_nb_ooo_engine);
   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS           ,_param->_nb_ooo_engine);
+  DELETE1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL  ,_param->_nb_ooo_engine);
   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR      ,_param->_nb_ooo_engine);
   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ,_param->_nb_ooo_engine);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/include/Core_Glue.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/include/Core_Glue.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/include/Core_Glue.h	(revision 105)
@@ -93,4 +93,5 @@
   public    : SC_OUT(Tcontrol_t        )   ** out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT      ;//[nb_front_end]
   public    : SC_OUT(Taddress_t        )   ** out_COMMIT_EVENT_FRONT_END_ADDRESS            ;//[nb_front_end]
+  public    : SC_OUT(Tcontrol_t        )   ** out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL   ;//[nb_front_end]
   public    : SC_OUT(Taddress_t        )   ** out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR       ;//[nb_front_end]
   public    : SC_OUT(Tcontrol_t        )   ** out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ;//[nb_front_end]
@@ -105,4 +106,5 @@
   public    : SC_IN (Tcontrol_t        )   **  in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT     ;//[nb_ooo_engine]
   public    : SC_IN (Taddress_t        )   **  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS           ;//[nb_ooo_engine]
+  public    : SC_IN (Tcontrol_t        )   **  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL  ;//[nb_ooo_engine]
   public    : SC_IN (Taddress_t        )   **  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR      ;//[nb_ooo_engine]
   public    : SC_IN (Tcontrol_t        )   **  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ;//[nb_ooo_engine]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue.cpp	(revision 105)
@@ -138,4 +138,5 @@
                       << (*(in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT    [i]))
                       << (*(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS          [i]))
+                      << (*(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL [i]))
                       << (*(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR     [i]))
                       << (*(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL [i]))
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_allocation.cpp	(revision 105)
@@ -97,4 +97,5 @@
       ALLOC1_SIGNAL_OUT(out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT      ,"IS_DELAY_SLOT"        ,Tcontrol_t        ,1);
       ALLOC1_SIGNAL_OUT(out_COMMIT_EVENT_FRONT_END_ADDRESS            ,"ADDRESS"              ,Taddress_t        ,_param->_size_instruction_address);
+      ALLOC1_SIGNAL_OUT(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL   ,"ADDRESS_EPCR_VAL"     ,Tcontrol_t        ,1);
       ALLOC1_SIGNAL_OUT(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR       ,"ADDRESS_EPCR"         ,Taddress_t        ,_param->_size_instruction_address);
       ALLOC1_SIGNAL_OUT(out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ,"ADDRESS_EEAR_VAL"     ,Tcontrol_t        ,1);
@@ -113,4 +114,5 @@
       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT     ,"IS_DELAY_SLOT"        ,Tcontrol_t        ,1);
       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS           ,"ADDRESS"              ,Taddress_t        ,_param->_size_instruction_address);
+      ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL  ,"ADDRESS_EPCR_VAL"     ,Tcontrol_t        ,1);
       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR      ,"ADDRESS_EPCR"         ,Taddress_t        ,_param->_size_instruction_address);
       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ,"ADDRESS_EEAR_VAL"     ,Tcontrol_t        ,1);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_deallocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_deallocation.cpp	(revision 105)
@@ -52,4 +52,5 @@
         DELETE1_SIGNAL(out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT      ,_param->_nb_front_end,1);
         DELETE1_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS            ,_param->_nb_front_end,_param->_size_instruction_address);
+        DELETE1_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL   ,_param->_nb_front_end,1);
         DELETE1_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR       ,_param->_nb_front_end,_param->_size_spr);
         DELETE1_SIGNAL(out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL   ,_param->_nb_front_end,1);
@@ -64,4 +65,5 @@
         DELETE1_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT     ,_param->_nb_ooo_engine,1);
         DELETE1_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS           ,_param->_nb_ooo_engine,_param->_size_instruction_address);
+        DELETE1_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL  ,_param->_nb_ooo_engine,1);
         DELETE1_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR      ,_param->_nb_ooo_engine,_param->_size_spr);
         DELETE1_SIGNAL( in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL  ,_param->_nb_ooo_engine,1);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_genMealy_commit_event.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_genMealy_commit_event.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_genMealy_commit_event.cpp	(revision 105)
@@ -51,4 +51,5 @@
          PORT_WRITE(out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT    [num_front_end], PORT_READ(in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT    [i]));
          PORT_WRITE(out_COMMIT_EVENT_FRONT_END_ADDRESS          [num_front_end], PORT_READ(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS          [i]));
+         PORT_WRITE(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL [num_front_end], PORT_READ(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL [i]));
          PORT_WRITE(out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR     [num_front_end], PORT_READ(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR     [i]));
          PORT_WRITE(out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL [num_front_end], PORT_READ(in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL [i]));
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl.cpp	(revision 105)
@@ -33,5 +33,7 @@
       (_param->_size_queue,
        _param->_size_internal_queue,
-       _param->_nb_bypass_write
+       _param->_nb_bypass_write,
+       false,
+       false
        );
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp	(revision 105)
@@ -73,4 +73,5 @@
   ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT     ," in_COMMIT_EVENT_IS_DELAY_SLOT     ",Tcontrol_t   );
   ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS           ," in_COMMIT_EVENT_ADDRESS           ",Taddress_t   );
+  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ," in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ",Tcontrol_t   );
   ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR      ," in_COMMIT_EVENT_ADDRESS_EPCR      ",Taddress_t   );
   ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ," in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ",Tcontrol_t   );
@@ -155,4 +156,5 @@
   INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_IS_DELAY_SLOT     );
   INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS           );
+  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
   INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EPCR      );
   INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
@@ -214,5 +216,5 @@
 
   const bool test1  = true;
-  const bool test2  = true;
+  const bool test2  = false;
   const bool test3  = true;
   const bool test4  = true;
@@ -925,4 +927,5 @@
 	  in_COMMIT_EVENT_ADDRESS          ->write(0xa00);
 	  in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xb00);
+	  in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(0);
 	  in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xc00);
 	  in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(0);
@@ -1019,4 +1022,5 @@
 	  in_COMMIT_EVENT_ADDRESS          ->write(0xd00);
 	  in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xe00);
+	  in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(0);
 	  in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xf00);
 	  in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(0);
@@ -1113,4 +1117,5 @@
 	  in_COMMIT_EVENT_ADDRESS          ->write(0xa00);
 	  in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xb00);
+	  in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(1);
 	  in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xc00);
 	  in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(1);
@@ -1207,4 +1212,5 @@
 	  in_COMMIT_EVENT_ADDRESS          ->write(0xd00);
 	  in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xe00);
+	  in_COMMIT_EVENT_ADDRESS_EPCR_VAL ->write(1);
 	  in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xf00);
 	  in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(1);
@@ -1325,4 +1331,5 @@
   DELETE_SC_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT     );
   DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS           );
+  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
   DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR      );
   DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h	(revision 105)
@@ -91,4 +91,5 @@
   public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_IS_DELAY_SLOT         ;
   public    : SC_IN (Taddress_t         )   *  in_COMMIT_EVENT_ADDRESS               ;
+  public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ;
   public    : SC_IN (Taddress_t         )   *  in_COMMIT_EVENT_ADDRESS_EPCR          ;
   public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h	(revision 105)
@@ -25,22 +25,24 @@
   typedef enum
     {
-      CONTEXT_STATE_OK              , // none event
-      CONTEXT_STATE_KO_EXCEP        , // wait end of event (exception)
-      CONTEXT_STATE_KO_EXCEP_ADDR   , // update address manager
-      CONTEXT_STATE_KO_EXCEP_SPR    , // update spr (epc, esr, sr[DSX])
-      CONTEXT_STATE_KO_MISS_ADDR    , // update address manager
-      CONTEXT_STATE_KO_MISS_WAITEND , // wait end of event (miss (branch, load))
-//    CONTEXT_STATE_KO_MSYNC        , // wait completion of all memory operation
-//    CONTEXT_STATE_KO_MSYNC_ISSUE  , // issue msync operation
-      CONTEXT_STATE_KO_MSYNC_EXEC   , // wait completion of     msync  operation
-//    CONTEXT_STATE_KO_PSYNC        , // wait completion of all        operation and after flush pipeline
-      CONTEXT_STATE_KO_PSYNC_FLUSH  , // wait completion of all 
-      CONTEXT_STATE_KO_PSYNC_ADDR   , // wait completion of all 
-//    CONTEXT_STATE_KO_CSYNC        , // wait completion of all        operation and after flush pipeline and flush ALL units (MMU, cache ...)
-      CONTEXT_STATE_KO_CSYNC_FLUSH  ,
-      CONTEXT_STATE_KO_CSYNC_ADDR   ,
-//    CONTEXT_STATE_KO_SPR          , // wait completion of all        operation
-//    CONTEXT_STATE_KO_SPR_ISSUE    , // issue spr's access
-      CONTEXT_STATE_KO_SPR_EXEC       // wait completion of all        operation (spr access)
+      CONTEXT_STATE_OK                    , // none event
+      CONTEXT_STATE_KO_EXCEP              , // wait end of event (exception)
+      CONTEXT_STATE_KO_EXCEP_ADDR         , // update address manager
+      CONTEXT_STATE_KO_EXCEP_SPR          , // update spr (epc, esr, sr[DSX])
+      CONTEXT_STATE_KO_MISS_BRANCH_ADDR   , // update address manager
+      CONTEXT_STATE_KO_MISS_BRANCH_WAITEND, // wait end of event (miss branch)
+      CONTEXT_STATE_KO_MISS_LOAD_ADDR     , // update address manager
+      CONTEXT_STATE_KO_MISS_LOAD_WAITEND  , // wait end of event (miss load))
+//    CONTEXT_STATE_KO_MSYNC              , // wait completion of all memory operation
+//    CONTEXT_STATE_KO_MSYNC_ISSUE        , // issue msync operation
+      CONTEXT_STATE_KO_MSYNC_EXEC         , // wait completion of     msync  operation
+//    CONTEXT_STATE_KO_PSYNC              , // wait completion of all        operation and after flush pipeline
+      CONTEXT_STATE_KO_PSYNC_FLUSH        , // wait completion of all 
+      CONTEXT_STATE_KO_PSYNC_ADDR         , // wait completion of all 
+//    CONTEXT_STATE_KO_CSYNC              , // wait completion of all        operation and after flush pipeline and flush ALL units (MMU, cache ...)
+      CONTEXT_STATE_KO_CSYNC_FLUSH        ,
+      CONTEXT_STATE_KO_CSYNC_ADDR         ,
+//    CONTEXT_STATE_KO_SPR                , // wait completion of all        operation
+//    CONTEXT_STATE_KO_SPR_ISSUE          , // issue spr's access
+      CONTEXT_STATE_KO_SPR_EXEC             // wait completion of all        operation (spr access)
     } context_state_t;
 
@@ -56,22 +58,24 @@
     switch (x)
       {
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_OK              : return "context_state_ok"             ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP        : return "context_state_ko_excep"       ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR   : return "context_state_ko_excep_addr"  ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_SPR    : return "context_state_ko_excep_spr"   ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_ADDR    : return "context_state_ko_miss_addr"   ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_WAITEND : return "context_state_ko_miss_waitend"; break;
-//       case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC        : return "context_state_ko_msync"       ; break;
-//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE  : return "context_state_ko_msync_issue" ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_EXEC   : return "context_state_ko_msync_exec"  ; break;
-//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC        : return "context_state_ko_psync"       ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH  : return "context_state_ko_psync_flush" ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_ADDR   : return "context_state_ko_psync_addr"  ; break;
-//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC        : return "context_state_ko_csync"       ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH  : return "context_state_ko_csync_flush" ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_ADDR   : return "context_state_ko_csync_addr"  ; break;
-//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR          : return "context_state_ko_spr"         ; break;
-//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_ISSUE    : return "context_state_ko_spr_issue"   ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC     : return "context_state_ko_spr_exec"    ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_OK                     : return "context_state_ok"                    ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP               : return "context_state_ko_excep"              ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_ADDR          : return "context_state_ko_excep_addr"         ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_EXCEP_SPR           : return "context_state_ko_excep_spr"          ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_ADDR    : return "context_state_ko_miss_branch_addr"   ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : return "context_state_ko_miss_branch_waitend"; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_ADDR      : return "context_state_ko_miss_load_addr"     ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MISS_LOAD_WAITEND   : return "context_state_ko_miss_load_waitend"  ; break;
+//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC               : return "context_state_ko_msync"              ; break;
+//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_ISSUE         : return "context_state_ko_msync_issue"        ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_MSYNC_EXEC          : return "context_state_ko_msync_exec"         ; break;
+//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC               : return "context_state_ko_psync"              ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_FLUSH         : return "context_state_ko_psync_flush"        ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_PSYNC_ADDR          : return "context_state_ko_psync_addr"         ; break;
+//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC               : return "context_state_ko_csync"              ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_FLUSH         : return "context_state_ko_csync_flush"        ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_CSYNC_ADDR          : return "context_state_ko_csync_addr"         ; break;
+//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR                 : return "context_state_ko_spr"                ; break;
+//    case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_ISSUE           : return "context_state_ko_spr_issue"          ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::context_state::CONTEXT_STATE_KO_SPR_EXEC            : return "context_state_ko_spr_exec"           ; break;
       default    : return ""      ; break;
       }
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp	(revision 105)
@@ -95,4 +95,5 @@
       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
+      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,"address_epcr_val",Tcontrol_t         ,1);
       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp	(revision 105)
@@ -53,4 +53,5 @@
         DELETE_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,1);
         DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS               ,_param->_size_instruction_address);
+	DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,_param->_size_instruction_address);
         DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR          ,_param->_size_instruction_address);
 	DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,_param->_size_instruction_address);
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp	(revision 105)
@@ -31,7 +31,8 @@
 	context_state_t state = reg_STATE [i];
 
-        Tcontrol_t val              = ((state == CONTEXT_STATE_KO_EXCEP_ADDR) or
-                                       (state == CONTEXT_STATE_KO_MISS_ADDR ) or
-                                       (state == CONTEXT_STATE_KO_PSYNC_ADDR) or 
+        Tcontrol_t val              = ((state == CONTEXT_STATE_KO_EXCEP_ADDR      ) or
+                                       (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or
+                                       (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR  ) or
+                                       (state == CONTEXT_STATE_KO_PSYNC_ADDR      ) or 
                                        (state == CONTEXT_STATE_KO_CSYNC_ADDR));
         
@@ -40,6 +41,6 @@
         Taddress_t    address          = reg_EVENT_ADDRESS [i] | (((state == CONTEXT_STATE_KO_EXCEP_ADDR) and PORT_READ(in_SPR_SR_EPH [i]))?(0xF000000>>2):0);
         Taddress_t    address_next     = reg_EVENT_ADDRESS_EPCR [i];
-        Tcontrol_t    address_next_val = (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_ADDRESS_EPCR_VAL [i]);
-        Tcontrol_t    is_ds_take       = (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_IS_DS_TAKE       [i]);
+        Tcontrol_t    address_next_val = (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) and (reg_EVENT_ADDRESS_EPCR_VAL [i]);
+        Tcontrol_t    is_ds_take       = (state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) and (reg_EVENT_IS_DS_TAKE       [i]);
 	// excep : address exception
 	// miss  : address delay_slot, and address dest
@@ -51,9 +52,10 @@
         switch (state)
           {
-          case CONTEXT_STATE_KO_EXCEP_ADDR : (type = EVENT_TYPE_EXCEPTION         ); break;
-          case CONTEXT_STATE_KO_MISS_ADDR  : (type = EVENT_TYPE_MISS_SPECULATION  ); break;
-          case CONTEXT_STATE_KO_PSYNC_ADDR : (type = EVENT_TYPE_PSYNC             ); break; 
-          case CONTEXT_STATE_KO_CSYNC_ADDR : (type = EVENT_TYPE_CSYNC             ); break;
-          default                          : (type = EVENT_TYPE_NONE              ); break;
+          case CONTEXT_STATE_KO_EXCEP_ADDR      : (type = EVENT_TYPE_EXCEPTION              ); break;
+          case CONTEXT_STATE_KO_MISS_BRANCH_ADDR: (type = EVENT_TYPE_BRANCH_MISS_SPECULATION); break;
+          case CONTEXT_STATE_KO_MISS_LOAD_ADDR  : (type = EVENT_TYPE_LOAD_MISS_SPECULATION  ); break;
+          case CONTEXT_STATE_KO_PSYNC_ADDR      : (type = EVENT_TYPE_PSYNC                  ); break; 
+          case CONTEXT_STATE_KO_CSYNC_ADDR      : (type = EVENT_TYPE_CSYNC                  ); break;
+          default                               : (type = EVENT_TYPE_NONE                   ); break;
           }
 //      (type = EVENT_TYPE_SPR_ACCESS        );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp	(revision 105)
@@ -65,5 +65,5 @@
                   break;
                 }
-              case CONTEXT_STATE_KO_MISS_WAITEND :
+              case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND :
                 {
                   // Wait end of all instruction
@@ -71,5 +71,13 @@
                     
 //                  state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod)
-                    state = CONTEXT_STATE_KO_MISS_ADDR;
+                    state = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
+                  break;
+                }
+              case CONTEXT_STATE_KO_MISS_LOAD_WAITEND :
+                {
+                  // Wait end of all instruction
+                  if (inst_all == 0)
+                    state = CONTEXT_STATE_KO_MISS_LOAD_ADDR;
+
                   break;
                 }
@@ -79,5 +87,10 @@
                   break;
                 }
-              case CONTEXT_STATE_KO_MISS_ADDR    :
+              case CONTEXT_STATE_KO_MISS_BRANCH_ADDR    :
+                {
+                  // nothing, wait the update of internal register (pc)
+                  break;
+                }
+              case CONTEXT_STATE_KO_MISS_LOAD_ADDR    :
                 {
                   // nothing, wait the update of internal register (pc)
@@ -198,5 +211,5 @@
 
               // priority : miss > excep > spr/sync
-              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
+              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
               uint8_t    priority1  = 2; // miss
 
@@ -212,6 +225,6 @@
                 {
                   Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]);
-//                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_ADDR;
-                  reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)
+//                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
+                  reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_WAITEND; //@@@ TODO : make MISS fast (miss decod)
                   reg_EVENT_ADDRESS          [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC  [i])+1; // address delay slot
                   reg_EVENT_ADDRESS_EPCR     [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]);   // address_next
@@ -249,5 +262,5 @@
               
               // miss > excep > spr/sync
-              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
+              uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
               uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:0;
 
@@ -258,5 +271,5 @@
               bool       is_valid   = ((state == CONTEXT_STATE_OK) or
                                        (depth1< depth0) or
-                                       ((depth1==depth0) and (priority1>priority0)));
+                                       ((depth1==depth0) and (priority1>=priority0)));
 
               if (is_valid)
@@ -325,6 +338,7 @@
                       }               
                     case EVENT_TYPE_NONE               :
-                    case EVENT_TYPE_MISS_SPECULATION   :
-                    case EVENT_TYPE_BRANCH_NO_ACCURATE :
+                    case EVENT_TYPE_BRANCH_MISS_SPECULATION   :
+                    case EVENT_TYPE_LOAD_MISS_SPECULATION   :
+//                     case EVENT_TYPE_BRANCH_NO_ACCURATE :
                     default :
                       {
@@ -359,6 +373,6 @@
             Tdepth_t   depth_max  = _param->_array_size_depth [context];
             
-//             Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
-//             Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
+//          Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
+//          Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
             Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
             Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
@@ -368,6 +382,6 @@
             
             // miss > excep > spr/sync
-            uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
-            uint8_t    priority1  = 1; // exception
+            uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
+            uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:2; // else load_miss_speculation (EVENT_TYPE_MISS_SPECULATION)
 
             // is_valid = can modify local information
@@ -377,5 +391,5 @@
             bool       is_valid   = ((state == CONTEXT_STATE_OK) or
                                      (depth1< depth0) or
-                                     ((depth1==depth0) and (priority1>priority0)));
+                                     ((depth1==depth0) and (priority1>=priority0)));
 
             if (is_valid)
@@ -386,12 +400,13 @@
                 switch (type)
                   {
-                  case EVENT_TYPE_EXCEPTION          : {state_next = CONTEXT_STATE_KO_EXCEP; break;}
-                  case EVENT_TYPE_SPR_ACCESS         :
-                  case EVENT_TYPE_MSYNC              :
-                  case EVENT_TYPE_PSYNC              :
-                  case EVENT_TYPE_CSYNC              :
-                  case EVENT_TYPE_NONE               :
-                  case EVENT_TYPE_MISS_SPECULATION   :
-                  case EVENT_TYPE_BRANCH_NO_ACCURATE :
+                  case EVENT_TYPE_EXCEPTION               : {state_next = CONTEXT_STATE_KO_EXCEP;             break;}
+                  case EVENT_TYPE_LOAD_MISS_SPECULATION   : {state_next = CONTEXT_STATE_KO_MISS_LOAD_WAITEND; break;}
+                  case EVENT_TYPE_BRANCH_MISS_SPECULATION :
+                  case EVENT_TYPE_SPR_ACCESS              :
+                  case EVENT_TYPE_MSYNC                   :
+                  case EVENT_TYPE_PSYNC                   :
+                  case EVENT_TYPE_CSYNC                   :
+                  case EVENT_TYPE_NONE                    :
+//                case EVENT_TYPE_BRANCH_NO_ACCURATE      :
                   default :
                     {
@@ -402,9 +417,9 @@
                 reg_EVENT_ADDRESS          [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS          );
                 reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EPCR     ); 
-                reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
+                reg_EVENT_ADDRESS_EPCR_VAL [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EPCR_VAL );
                 reg_EVENT_ADDRESS_EEAR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR     ); 
                 reg_EVENT_ADDRESS_EEAR_VAL [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR_VAL );
                 reg_EVENT_IS_DELAY_SLOT    [context] = PORT_READ(in_COMMIT_EVENT_IS_DELAY_SLOT    );
-              //reg_EVENT_IS_DS_TAKE       [context] = 0;
+                reg_EVENT_IS_DS_TAKE       [context] = 0;
                 reg_EVENT_DEPTH            [context] = depth;
               }
@@ -435,5 +450,5 @@
                   
 //                   // miss > excep > spr/sync
-//                   uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_ADDR) or (state == CONTEXT_STATE_KO_MISS_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
+//                   uint8_t    priority0  = ((state == CONTEXT_STATE_KO_MISS_BRANCH_ADDR) or (state == CONTEXT_STATE_KO_MISS_LOAD_ADDR) or (state == CONTEXT_STATE_KO_MISS_BRANCH_WAITEND) or (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND))?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
 //                   uint8_t    priority1  = 2; // miss
                   
@@ -444,5 +459,5 @@
 //                   bool       is_valid   = ((state == CONTEXT_STATE_OK) or
 //                                            (depth1< depth0) or
-//                                            ((depth1==depth0) and (priority1>priority0)));
+//                                            ((depth1==depth0) and (priority1>=priority0)));
                   
 //                   if (is_valid)
@@ -480,9 +495,10 @@
                     break;
                   }
-                case CONTEXT_STATE_KO_MISS_ADDR  :
+                case CONTEXT_STATE_KO_MISS_BRANCH_ADDR:
 //                   {
 //                     reg_STATE [i] = CONTEXT_STATE_KO_MISS_WAITEND; //@@@ TODO : make MISS fast (miss decod)
 //                     break;
 //                   }
+                case CONTEXT_STATE_KO_MISS_LOAD_ADDR  :
                 case CONTEXT_STATE_KO_PSYNC_ADDR :
                 case CONTEXT_STATE_KO_CSYNC_ADDR :
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp	(revision 105)
@@ -71,5 +71,5 @@
   ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,"out_DECOD_NO_EXECUTE                   ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,"out_DECOD_IS_DELAY_SLOT                ",Tcontrol_t         ,_param->_nb_inst_decod);
-  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,"out_DECOD_ADDRESS_NEXT                 ",Tgeneral_data_t    ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,"out_DECOD_HAS_IMMEDIAT                 ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_IMMEDIAT                     ,"out_DECOD_IMMEDIAT                     ",Tgeneral_data_t    ,_param->_nb_inst_decod);
@@ -148,5 +148,5 @@
   INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
-  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod);
@@ -336,5 +336,5 @@
 		TEST(Tcontrol_t        ,  out_DECOD_IS_DELAY_SLOT [i]->read(), request [context].front()._is_delay_slot);
 		TEST(Tcontrol_t        , delay_slot_current [context]        , request [context].front()._is_delay_slot);
-		TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS       [i]->read(), request [context].front()._address      );
+// 		TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS_NEXT  [i]->read(), request [context].front()._address_next );
 		TEST(Tcontrol_t        ,  out_DECOD_HAS_IMMEDIAT  [i]->read(), request [context].front()._has_immediat );
 		if (request [context].front()._has_immediat)
@@ -450,5 +450,5 @@
   delete [] out_DECOD_NO_EXECUTE                   ;
   delete [] out_DECOD_IS_DELAY_SLOT                ;
-  delete [] out_DECOD_ADDRESS                      ;
+  delete [] out_DECOD_ADDRESS_NEXT                 ;
   delete [] out_DECOD_HAS_IMMEDIAT                 ;
   delete [] out_DECOD_IMMEDIAT                     ;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h	(revision 105)
@@ -88,5 +88,5 @@
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
-  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
+  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
   public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_IMMEDIAT                     ;//[nb_inst_decod]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp	(revision 105)
@@ -89,5 +89,5 @@
       ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE   ,"no_execute"   ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address   );
+      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t   ,_param->_size_instruction_address   );
       ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_IMMEDIAT     ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp	(revision 105)
@@ -49,5 +49,5 @@
         DELETE1_SIGNAL(out_DECOD_NO_EXECUTE   ,_param->_nb_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT,_param->_nb_inst_decod,1                                   );
-        DELETE1_SIGNAL(out_DECOD_ADDRESS      ,_param->_nb_inst_decod,_param->_size_instruction_address          );
+        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_nb_inst_decod,_param->_size_instruction_address   );
         DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IMMEDIAT     ,_param->_nb_inst_decod,_param->_size_general_data          );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp	(revision 105)
@@ -126,6 +126,6 @@
                   }
 
-		Ttype_t  type  = _decod_instruction->_type;
-                Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; // DEPTH_CURRENT
+		Ttype_t      type      = _decod_instruction->_type;
+                Tdepth_t     depth     = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; // DEPTH_CURRENT
 
 		if (_param->_have_port_context_id)
@@ -137,5 +137,11 @@
  		PORT_WRITE(out_DECOD_NO_EXECUTE    [i], _decod_instruction->_no_execute    );
 		PORT_WRITE(out_DECOD_IS_DELAY_SLOT [i], _decod_instruction->_is_delay_slot );
-		PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
+// 		PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
+//                 if ((type == TYPE_BRANCH) and
+//                     ((_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_SET) or
+//                      (_decod_instruction->_branch_condition = BRANCH_CONDITION_FLAG_UNSET)))
+//                 PORT_WRITE(out_DECOD_ADDRESS_NEXT  [i], _decod_instruction->_address+2);
+//                 else
+                PORT_WRITE(out_DECOD_ADDRESS_NEXT  [i], _decod_instruction->_address_next  );
 		PORT_WRITE(out_DECOD_HAS_IMMEDIAT  [i], _decod_instruction->_has_immediat  );
 		PORT_WRITE(out_DECOD_IMMEDIAT      [i], _decod_instruction->_immediat      );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp	(revision 105)
@@ -60,5 +60,5 @@
   ALLOC1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE     ," in_DECOD_IN_NO_EXECUTE    ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ," in_DECOD_IN_IS_DELAY_SLOT ",Tcontrol_t         ,_param->_nb_inst_decod);
-  ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ," in_DECOD_IN_ADDRESS       ",Tgeneral_data_t    ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ," in_DECOD_IN_ADDRESS_NEXT  ",Tgeneral_data_t    ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ," in_DECOD_IN_HAS_IMMEDIAT  ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_DECOD_IN_IMMEDIAT       ," in_DECOD_IN_IMMEDIAT      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
@@ -84,5 +84,5 @@
   ALLOC1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,"out_DECOD_OUT_NO_EXECUTE   ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,"out_DECOD_OUT_IS_DELAY_SLOT",Tcontrol_t         ,_param->_nb_inst_decod);
-  ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,"out_DECOD_OUT_ADDRESS      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,"out_DECOD_OUT_ADDRESS_NEXT ",Tgeneral_data_t    ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,"out_DECOD_OUT_HAS_IMMEDIAT ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_OUT_IMMEDIAT      ,"out_DECOD_OUT_IMMEDIAT     ",Tgeneral_data_t    ,_param->_nb_inst_decod);
@@ -125,5 +125,5 @@
   INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
-  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_IMMEDIAT       ,_param->_nb_inst_decod);
@@ -151,5 +151,5 @@
   INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
-  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_IMMEDIAT      ,_param->_nb_inst_decod);
@@ -227,8 +227,8 @@
 	    Tcontext_t context = rand()%_param->_nb_context;
 
-	    in_DECOD_IN_VAL        [i]->write(i<=x);
-	    in_DECOD_IN_CONTEXT_ID [i]->write(context);
-	    in_DECOD_IN_DEPTH      [i]->write(depth [context]);
-	    in_DECOD_IN_ADDRESS    [i]->write(address_tmp [context]);
+	    in_DECOD_IN_VAL          [i]->write(i<=x);
+	    in_DECOD_IN_CONTEXT_ID   [i]->write(context);
+	    in_DECOD_IN_DEPTH        [i]->write(depth [context]);
+	    in_DECOD_IN_ADDRESS_NEXT [i]->write(address_tmp [context]);
 
 	    address_tmp [context] ++;
@@ -270,6 +270,6 @@
 	      LABEL("  * context  : %d",context);
 	      
-	      TEST(Tdepth_t  ,out_DECOD_OUT_DEPTH   [i]->read(),depth        [context]);
-	      TEST(Taddress_t,out_DECOD_OUT_ADDRESS [i]->read(),address_dest [context]);
+	      TEST(Tdepth_t  ,out_DECOD_OUT_DEPTH        [i]->read(),depth        [context]);
+	      TEST(Taddress_t,out_DECOD_OUT_ADDRESS_NEXT [i]->read(),address_dest [context]);
 	      
 	      nb_inst      [context] --;
@@ -304,5 +304,5 @@
   DELETE1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
-  DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL( in_DECOD_IN_IMMEDIAT       ,_param->_nb_inst_decod);
@@ -328,5 +328,5 @@
   DELETE1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
-  DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_OUT_IMMEDIAT      ,_param->_nb_inst_decod);
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h	(revision 105)
@@ -75,5 +75,5 @@
   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_NO_EXECUTE     ;//[nb_inst_decod]
   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_IS_DELAY_SLOT  ;//[nb_inst_decod]
-  public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_ADDRESS        ;//[nb_inst_decod]
+  public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_ADDRESS_NEXT   ;//[nb_inst_decod]
   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_HAS_IMMEDIAT   ;//[nb_inst_decod]
   public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_IMMEDIAT       ;//[nb_inst_decod]
@@ -100,5 +100,5 @@
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_NO_EXECUTE    ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod]
-  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_ADDRESS       ;//[nb_inst_decod]
+  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_ADDRESS_NEXT  ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_HAS_IMMEDIAT  ;//[nb_inst_decod]
   public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_IMMEDIAT      ;//[nb_inst_decod]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h	(revision 105)
@@ -30,5 +30,5 @@
   public : Tcontrol_t         * _no_execute     ;
   public : Tcontrol_t         * _is_delay_slot  ;
-  public : Tgeneral_data_t    * _address        ;
+  public : Tgeneral_data_t    * _address_next   ;
   public : Tcontrol_t         * _has_immediat   ;
   public : Tgeneral_data_t    * _immediat       ;
@@ -56,5 +56,5 @@
       _no_execute     = new Tcontrol_t         [_nb_inst];
       _is_delay_slot  = new Tcontrol_t         [_nb_inst];
-      _address        = new Tgeneral_data_t    [_nb_inst];
+      _address_next   = new Tgeneral_data_t    [_nb_inst];
       _has_immediat   = new Tcontrol_t         [_nb_inst];
       _immediat       = new Tgeneral_data_t    [_nb_inst];
@@ -85,5 +85,5 @@
       delete [] _no_execute     ;
       delete [] _is_delay_slot  ;
-      delete [] _address        ;
+      delete [] _address_next   ;
       delete [] _has_immediat   ;
       delete [] _immediat       ;
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp	(revision 105)
@@ -67,5 +67,5 @@
       ALLOC1_SIGNAL_IN ( in_DECOD_IN_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
       ALLOC1_SIGNAL_IN ( in_DECOD_IN_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
-      ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_instruction_address   );
+      ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS_NEXT   ,"address_next" ,Tgeneral_data_t    ,_param->_size_instruction_address   );
       ALLOC1_SIGNAL_IN ( in_DECOD_IN_HAS_IMMEDIAT   ,"has_immediat" ,Tcontrol_t         ,1                                   );
       ALLOC1_SIGNAL_IN ( in_DECOD_IN_IMMEDIAT       ,"immediat"     ,Tgeneral_data_t    ,_param->_size_general_data          );
@@ -96,5 +96,5 @@
       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
-      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_instruction_address   );
+      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS_NEXT   ,"address_next" ,Tgeneral_data_t    ,_param->_size_instruction_address   );
       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_HAS_IMMEDIAT   ,"has_immediat" ,Tcontrol_t         ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IMMEDIAT       ,"immediat"     ,Tgeneral_data_t    ,_param->_size_general_data          );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp	(revision 105)
@@ -37,5 +37,5 @@
 	DELETE1_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod,1                                   );
 	DELETE1_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod,1                                   );
-	DELETE1_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod,_param->_size_general_data          );
+	DELETE1_SIGNAL( in_DECOD_IN_ADDRESS_NEXT   ,_param->_nb_inst_decod,_param->_size_instruction_address   );
 	DELETE1_SIGNAL( in_DECOD_IN_HAS_IMMEDIAT   ,_param->_nb_inst_decod,1                                   );
 	DELETE1_SIGNAL( in_DECOD_IN_IMMEDIAT       ,_param->_nb_inst_decod,_param->_size_general_data          );
@@ -61,5 +61,5 @@
 	DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod,1                                   );
 	DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1                                   );
-	DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod,_param->_size_general_data          );
+	DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS_NEXT  ,_param->_nb_inst_decod,_param->_size_instruction_address   );
 	DELETE1_SIGNAL(out_DECOD_OUT_HAS_IMMEDIAT  ,_param->_nb_inst_decod,1                                   );
 	DELETE1_SIGNAL(out_DECOD_OUT_IMMEDIAT      ,_param->_nb_inst_decod,_param->_size_general_data          );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp	(revision 105)
@@ -71,10 +71,10 @@
 
 	    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);
-            log_printf(TRACE,Decod_queue,FUNCTION,"      * address   : 0x%x (0x%x)",reg_QUEUE->front()->_address[i],reg_QUEUE->front()->_address[i]<<2);
+	    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);
+            log_printf(TRACE,Decod_queue,FUNCTION,"      * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[i],reg_QUEUE->front()->_address_next[i]<<2);
 	    internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
 	    if (is_valid)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp	(revision 105)
@@ -52,5 +52,5 @@
 	  PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [i]);
 	  PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]);
-	  PORT_WRITE(out_DECOD_OUT_ADDRESS       [i],reg_QUEUE->front()->_address       [i]);
+	  PORT_WRITE(out_DECOD_OUT_ADDRESS_NEXT  [i],reg_QUEUE->front()->_address_next  [i]);
 	  PORT_WRITE(out_DECOD_OUT_HAS_IMMEDIAT  [i],reg_QUEUE->front()->_has_immediat  [i]);
 	  PORT_WRITE(out_DECOD_OUT_IMMEDIAT      [i],reg_QUEUE->front()->_immediat      [i]);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp	(revision 105)
@@ -62,5 +62,5 @@
 		entry->_no_execute    [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE    [i]);
 		entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]);
-		entry->_address       [i] = PORT_READ(in_DECOD_IN_ADDRESS       [i]);
+		entry->_address_next  [i] = PORT_READ(in_DECOD_IN_ADDRESS_NEXT  [i]);
 		entry->_has_immediat  [i] = PORT_READ(in_DECOD_IN_HAS_IMMEDIAT  [i]);
 		entry->_immediat      [i] = PORT_READ(in_DECOD_IN_IMMEDIAT      [i]);
@@ -144,6 +144,6 @@
 			 ,(*it)->_no_execute    [i]
 			 ,(*it)->_is_delay_slot [i]
-			 ,(*it)->_address       [i]
-			 ,(*it)->_address       [i]<<2
+			 ,(*it)->_address_next  [i]
+			 ,(*it)->_address_next  [i]<<2
 			 ,(*it)->_has_immediat  [i]
 			 ,(*it)->_immediat      [i]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp	(revision 105)
@@ -73,5 +73,5 @@
   ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,"out_DECOD_NO_EXECUTE                   ",Tcontrol_t         ,_param->_nb_inst_decod); 
   ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,"out_DECOD_IS_DELAY_SLOT                ",Tcontrol_t         ,_param->_nb_inst_decod);
-  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,"out_DECOD_ADDRESS_NEXT                 ",Tgeneral_data_t    ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,"out_DECOD_HAS_IMMEDIAT                 ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_IMMEDIAT                     ,"out_DECOD_IMMEDIAT                     ",Tgeneral_data_t    ,_param->_nb_inst_decod);
@@ -159,5 +159,5 @@
   INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
-  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod);
@@ -421,5 +421,5 @@
 // 		TEST(Tcontrol_t        ,  out_DECOD_NO_EXECUTE    [i]->read(), respons [context].front()._no_execute   );
 		TEST(Tcontrol_t        ,  out_DECOD_IS_DELAY_SLOT [i]->read(), respons [context].front()._is_delay_slot);
-		TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS       [i]->read(), respons [context].front()._address      );
+// 		TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS_NEXT  [i]->read(), respons [context].front()._address_next );
 		TEST(Tcontrol_t        ,  out_DECOD_HAS_IMMEDIAT  [i]->read(), respons [context].front()._has_immediat );
 		if (respons [context].front()._has_immediat)
@@ -490,5 +490,5 @@
   DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
-  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod);
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h	(revision 105)
@@ -87,5 +87,5 @@
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
-  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
+  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
   public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_IMMEDIAT                     ;//[nb_inst_decod]
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp	(revision 105)
@@ -89,5 +89,5 @@
       ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE   ,"no_execute"   ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address          );
+      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_NEXT ,"address_next" ,Tgeneral_data_t   ,_param->_size_instruction_address   );
       ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_DECOD_IMMEDIAT     ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          );
@@ -293,6 +293,6 @@
 	  COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_IS_DELAY_SLOT",
 			           dest, "in_DECOD_IN_"+toString(i)+"_IS_DELAY_SLOT");
-	  COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_ADDRESS"      ,
-			           dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS"      );
+	  COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_ADDRESS_NEXT" ,
+			           dest, "in_DECOD_IN_"+toString(i)+"_ADDRESS_NEXT" );
 	  COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_HAS_IMMEDIAT" ,
 			           dest, "in_DECOD_IN_"+toString(i)+"_HAS_IMMEDIAT" );
@@ -435,5 +435,5 @@
       // in_DECOD_IN_NO_EXECUTE     - component decod
       // in_DECOD_IN_IS_DELAY_SLOT  - component decod
-      // in_DECOD_IN_ADDRESS        - component decod
+      // in_DECOD_IN_ADDRESS_NEXT   - component decod
       // in_DECOD_IN_HAS_IMMEDIAT   - component decod
       // in_DECOD_IN_IMMEDIAT       - component decod
@@ -478,6 +478,6 @@
 	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_IS_DELAY_SLOT",
 		              dest,"out_DECOD_"    +toString(i)+"_IS_DELAY_SLOT");
-	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS"      ,
-		              dest,"out_DECOD_"    +toString(i)+"_ADDRESS"      );
+	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_ADDRESS_NEXT" ,
+		              dest,"out_DECOD_"    +toString(i)+"_ADDRESS_NEXT" );
 	  PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_HAS_IMMEDIAT" ,
 		              dest,"out_DECOD_"    +toString(i)+"_HAS_IMMEDIAT" );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp	(revision 105)
@@ -33,6 +33,6 @@
         
         DELETE1_SIGNAL(in_IFETCH_CONTEXT_ID                   ,_param->_nb_context,_param->_size_context_id      );
-        DELETE1_SIGNAL(in_IFETCH_ADDRESS                      ,_param->_nb_context,_param->_size_general_data    );
-//      DELETE1_SIGNAL(in_IFETCH_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_general_data    );
+        DELETE1_SIGNAL(in_IFETCH_ADDRESS                      ,_param->_nb_context,_param->_size_instruction_address);
+//      DELETE1_SIGNAL(in_IFETCH_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_instruction_address);
         DELETE1_SIGNAL(in_IFETCH_INST_IFETCH_PTR              ,_param->_nb_context,_param->_size_inst_ifetch_ptr );
         DELETE1_SIGNAL(in_IFETCH_BRANCH_STATE                 ,_param->_nb_context,_param->_size_branch_state    );
@@ -48,5 +48,5 @@
         DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod,1                                   );
-        DELETE1_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod,_param->_size_general_data          );
+        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT                 ,_param->_nb_inst_decod,_param->_size_instruction_address   );
         DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT                 ,_param->_nb_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IMMEDIAT                     ,_param->_nb_inst_decod,_param->_size_general_data          );
@@ -73,6 +73,6 @@
 //      DELETE1_SIGNAL(out_PREDICT_BRANCH_STACK_WRITE         ,_param->_nb_inst_decod,1                             );
         DELETE1_SIGNAL(out_PREDICT_BRANCH_DIRECTION           ,_param->_nb_inst_decod,1                             );
-        DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_decod,_param->_size_general_data    );
-        DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST               ,_param->_nb_inst_decod,_param->_size_general_data    );
+        DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_decod,_param->_size_instruction_address);
+        DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST               ,_param->_nb_inst_decod,_param->_size_instruction_address);
 //      DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod,1                             );
         
@@ -92,6 +92,6 @@
         DELETE_SIGNAL(out_CONTEXT_EVENT_TYPE                  ,_param->_size_event_type  );
         DELETE_SIGNAL(out_CONTEXT_EVENT_IS_DELAY_SLOT         ,1                         );
-        DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS               ,_param->_size_general_data);
-        DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS_EPCR          ,_param->_size_general_data);
+        DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS               ,_param->_size_instruction_address);
+        DELETE_SIGNAL(out_CONTEXT_EVENT_ADDRESS_EPCR          ,_param->_size_instruction_address);
       }
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile	(revision 105)
@@ -0,0 +1,24 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= .
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ Library ]------------------------------------------
+LIBRARY				= $(DIR_LIB)/libMeta_Predictor.a
+
+
+#-----[ include ]------------------------------------------
+
+all				:
+				@$(MAKE) all_component
+
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Component
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile.defs
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile.defs	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile.defs	(revision 105)
@@ -0,0 +1,11 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT_MORPHEO		= ../../../../../../..
+DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile.deps
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile.deps	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Makefile.deps	(revision 105)
@@ -0,0 +1,47 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+# DIR_MORPHEO must be defined
+
+Meta_Predictor			= yes
+
+ifndef Behavioural
+include $(DIR_MORPHEO)/Behavioural/Makefile.deps
+endif
+ifndef Two_Level_Branch_Predictor
+include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Makefile.deps
+endif
+ifndef Meta_Predictor_Glue
+include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/Makefile.deps
+endif
+
+#-----[ Library ]------------------------------------------
+Meta_Predictor_LIBRARY		= 	-lMeta_Predictor			\
+					$(Meta_Predictor_Glue_LIBRARY)		\
+					$(Two_Level_Branch_Predictor_LIBRARY)	\
+					$(Behavioural_LIBRARY)	
+
+Meta_Predictor_DIR_LIBRARY	=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/lib	\
+					$(Meta_Predictor_Glue_DIR_LIBRARY)						\
+					$(Two_Level_Branch_Predictor_DIR_LIBRARY)					\
+					$(Behavioural_DIR_LIBRARY)
+
+#-----[ Rules ]--------------------------------------------
+
+Meta_Predictor_library		: 
+				@\
+				$(MAKE) Behavioural_library;\
+				$(MAKE) Meta_Predictor_Glue_library;\
+				$(MAKE) Two_Level_Branch_Predictor_library;\
+				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor --makefile=Makefile;
+	
+Meta_Predictor_library_clean	: 
+				@\
+				$(MAKE) Behavioural_library_clean;\
+				$(MAKE) Meta_Predictor_Glue_library_clean;\
+				$(MAKE) Two_Level_Branch_Predictor_library_clean;\
+				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor --makefile=Makefile clean;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile	(revision 105)
@@ -0,0 +1,24 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= .
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ Library ]------------------------------------------
+LIBRARY				= $(DIR_LIB)/libMeta_Predictor_Glue.a
+
+
+#-----[ include ]------------------------------------------
+
+all				:
+				@$(MAKE) all_component
+
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Component
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile.defs
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile.defs	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile.defs	(revision 105)
@@ -0,0 +1,11 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT_MORPHEO		= ../../../../../../../..
+DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile.deps
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile.deps	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/Makefile.deps	(revision 105)
@@ -0,0 +1,33 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+# DIR_MORPHEO must be defined
+
+Meta_Predictor_Glue			= yes
+
+ifndef Behavioural
+include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
+endif
+
+#-----[ Library ]------------------------------------------
+Meta_Predictor_Glue_LIBRARY		= 	-lMeta_Predictor_Glue	\
+					$(Behavioural_LIBRARY)	
+
+Meta_Predictor_Glue_DIR_LIBRARY		=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/lib	\
+					$(Behavioural_DIR_LIBRARY)
+
+#-----[ Rules ]--------------------------------------------
+
+Meta_Predictor_Glue_library		: 
+				@\
+				$(MAKE) Behavioural_library;\
+				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue --makefile=Makefile ;
+	
+Meta_Predictor_Glue_library_clean	: 
+				@\
+				$(MAKE) Behavioural_library_clean;\
+				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue --makefile=Makefile clean;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/Makefile	(revision 105)
@@ -0,0 +1,29 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_MORPHEO			= ../../../../../../../../..
+
+LIBRARY				= $(Meta_Predictor_Glue_LIBRARY)
+
+DIR_LIBRARY			= $(Meta_Predictor_Glue_DIR_LIBRARY)
+
+#-----[ include ]------------------------------------------
+
+all				:
+				@$(MAKE) all_selftest
+
+library				: Meta_Predictor_Glue_library
+
+library_clean			: Meta_Predictor_Glue_library_clean
+
+include                         ../Makefile.deps
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Selftest
+include 			$(DIR_MORPHEO)/Behavioural/Makefile.Synthesis
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/config0.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/config0.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/config0.cfg	(revision 105)
@@ -0,0 +1,16 @@
+Meta_Predictor_Glue
+0	1	+1	# have_meta_predictor               
+0	1	+1	# predictor_0_have_bht              
+4	4	+1	# predictor_0_bht_size_shifter      
+1	1	+1	# predictor_0_have_pht              
+2	2	+1	# predictor_0_pht_size_counter      
+1	1	+1	# predictor_1_have_bht              
+3	3	+1	# predictor_1_bht_size_shifter      
+0	1	+1	# predictor_1_have_pht              
+4	4	+1	# predictor_1_pht_size_counter      
+1	1	+1	# predictor_2_have_bht              
+2	2	+1	# predictor_2_bht_size_shifter      
+0	1	+1	# predictor_2_have_pht              
+4	4	+1	# predictor_2_pht_size_counter      
+2	2	+1	# nb_prediction                     
+2	2	+1	# nb_branch_complete                
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/config1.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/config1.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/config1.cfg	(revision 105)
@@ -0,0 +1,16 @@
+Meta_Predictor_Glue
+0	1	+1	# have_meta_predictor               
+1	1	+1	# predictor_0_have_bht              
+4	4	+1	# predictor_0_bht_size_shifter      
+0	1	+1	# predictor_0_have_pht              
+2	2	+1	# predictor_0_pht_size_counter      
+0	1	+1	# predictor_1_have_bht              
+3	3	+1	# predictor_1_bht_size_shifter      
+1	1	+1	# predictor_1_have_pht              
+4	4	+1	# predictor_1_pht_size_counter      
+0	1	+1	# predictor_2_have_bht              
+2	2	+1	# predictor_2_bht_size_shifter      
+1	1	+1	# predictor_2_have_pht              
+4	4	+1	# predictor_2_pht_size_counter      
+2	2	+1	# nb_prediction                     
+2	2	+1	# nb_branch_complete                
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/configuration.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/configuration.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/configuration.cfg	(revision 105)
@@ -0,0 +1,16 @@
+Meta_Predictor_Glue
+0	1	+1	# have_meta_predictor               
+0	1	+1	# predictor_0_have_bht              
+4	4	+1	# predictor_0_bht_size_shifter      
+1	1	+1	# predictor_0_have_pht              
+2	2	+1	# predictor_0_pht_size_counter      
+1	1	+1	# predictor_1_have_bht              
+3	3	+1	# predictor_1_bht_size_shifter      
+0	1	+1	# predictor_1_have_pht              
+4	4	+1	# predictor_1_pht_size_counter      
+1	1	+1	# predictor_2_have_bht              
+2	2	+1	# predictor_2_bht_size_shifter      
+0	1	+1	# predictor_2_have_pht              
+4	4	+1	# predictor_2_pht_size_counter      
+1	1	+1	# nb_prediction                     
+1	1	+1	# nb_branch_complete                
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/include/test.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/include/test.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/include/test.h	(revision 105)
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "RegisterFile"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <string>
+#include <iostream>
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue;
+
+void test    (string name,
+	      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters param);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/src/main.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/src/main.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/src/main.cpp	(revision 105)
@@ -0,0 +1,104 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/include/test.h"
+
+#define NB_PARAMS 15
+
+void usage (string exec)
+{
+  cerr << "<Usage> " << exec << " name_instance list_params" << endl
+       << "list_params is :" << endl
+       << " - have_meta_predictor                (bool    )" << endl
+       << " - predictor_0_have_bht               (bool    )" << endl
+       << " - predictor_0_bht_size_shifter       (uint32_t)" << endl
+       << " - predictor_0_have_pht               (bool    )" << endl
+       << " - predictor_0_pht_size_counter       (uint32_t)" << endl
+       << " - predictor_1_have_bht               (bool    )" << endl
+       << " - predictor_1_bht_size_shifter       (uint32_t)" << endl
+       << " - predictor_1_have_pht               (bool    )" << endl
+       << " - predictor_1_pht_size_counter       (uint32_t)" << endl
+       << " - predictor_2_have_bht               (bool    )" << endl
+       << " - predictor_2_bht_size_shifter       (uint32_t)" << endl
+       << " - predictor_2_have_pht               (bool    )" << endl
+       << " - predictor_2_pht_size_counter       (uint32_t)" << endl
+       << " - nb_prediction                      (uint32_t)" << endl
+       << " - nb_branch_complete                 (uint32_t)" << endl;
+
+  exit (1);
+}
+
+#ifndef SYSTEMC
+int main    (int argc, char * argv[])
+#else
+int sc_main (int argc, char * argv[])
+#endif
+{
+  if (argc != 2+NB_PARAMS)
+    usage (argv[0]);
+
+  const string   name      = argv[1];
+
+  const bool     have_meta_predictor               = atoi(argv[ 2]);
+
+  const bool     predictor_0_have_bht              = atoi(argv[ 3]);
+  const uint32_t predictor_0_bht_size_shifter      = atoi(argv[ 4]);
+  const bool     predictor_0_have_pht              = atoi(argv[ 5]);
+  const uint32_t predictor_0_pht_size_counter      = atoi(argv[ 6]);
+
+  const bool     predictor_1_have_bht              = atoi(argv[ 7]);
+  const uint32_t predictor_1_bht_size_shifter      = atoi(argv[ 8]);
+  const bool     predictor_1_have_pht              = atoi(argv[ 9]);
+  const uint32_t predictor_1_pht_size_counter      = atoi(argv[10]);
+
+  const bool     predictor_2_have_bht              = atoi(argv[11]);
+  const uint32_t predictor_2_bht_size_shifter      = atoi(argv[12]);
+  const bool     predictor_2_have_pht              = atoi(argv[13]);
+  const uint32_t predictor_2_pht_size_counter      = atoi(argv[14]);
+
+  const uint32_t nb_prediction                     = atoi(argv[15]);
+  const uint32_t nb_branch_complete                = atoi(argv[16]);
+
+  try 
+    {
+      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters param (have_meta_predictor               ,
+													      predictor_0_have_bht              ,
+													      predictor_0_bht_size_shifter      ,
+													      predictor_0_have_pht              ,
+													      predictor_0_pht_size_counter      ,
+													      
+													      predictor_1_have_bht              ,
+													      predictor_1_bht_size_shifter      ,
+													      predictor_1_have_pht              ,
+													      predictor_1_pht_size_counter      ,
+													      
+													      predictor_2_have_bht              ,
+													      predictor_2_bht_size_shifter      ,
+													      predictor_2_have_pht              ,
+													      predictor_2_pht_size_counter      ,
+													      
+													      nb_prediction                     ,
+													      nb_branch_complete                );
+      
+      cout << param.print(1);
+      
+      test (name,param);
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      cout << "<" << name << "> : " <<  error.what ();
+      exit (EXIT_FAILURE);
+    }
+  catch (...)
+    {
+      cerr << "<" << name << "> : This test must generate a error" << endl;
+      exit (EXIT_FAILURE);
+    }
+
+  return (EXIT_SUCCESS);
+}
+
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/src/test.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/SelfTest/src/test.cpp	(revision 105)
@@ -0,0 +1,486 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#define NB_ITERATION 1024
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/include/test.h"
+#include "Common/include/Test.h"
+
+void test (string name,
+	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters _param)
+{
+  cout << "<" << name << "> : Simulation SystemC" << endl;
+
+  Meta_Predictor_Glue * _Meta_Predictor_Glue = new Meta_Predictor_Glue (name.c_str(),
+#ifdef STATISTICS
+									morpheo::behavioural::Parameters_Statistics(5,50),
+#endif
+									_param);
+  
+#ifdef SYSTEMC
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  sc_clock                         * CLOCK;
+  sc_signal<Tcontrol_t>            * NRESET;
+
+    // Interface Predict
+  sc_signal<Tcontrol_t>           ** PREDICT_PREDICTOR_0_ACK                ;
+  sc_signal<Tcontrol_t>           ** PREDICT_PREDICTOR_1_ACK                ;
+  sc_signal<Tcontrol_t>           ** PREDICT_PREDICTOR_2_ACK                ;
+  sc_signal<Tcontrol_t>           ** PREDICT_ACK                            ;
+
+  sc_signal<Tbht_history_t>       ** PREDICT_PREDICTOR_0_BHT_HISTORY        ;
+  sc_signal<Tpht_history_t>       ** PREDICT_PREDICTOR_0_PHT_HISTORY        ;
+  sc_signal<Tbht_history_t>       ** PREDICT_PREDICTOR_1_BHT_HISTORY        ;
+  sc_signal<Tpht_history_t>       ** PREDICT_PREDICTOR_1_PHT_HISTORY        ;
+  sc_signal<Tbht_history_t>       ** PREDICT_PREDICTOR_2_BHT_HISTORY        ;
+  sc_signal<Tpht_history_t>       ** PREDICT_PREDICTOR_2_PHT_HISTORY        ;
+  sc_signal<Thistory_t>           ** PREDICT_HISTORY                        ;
+  sc_signal<Tcontrol_t>           ** PREDICT_DIRECTION                      ;
+
+    // Interface Branch_complete
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_VAL                    ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_PREDICTOR_2_VAL        ;
+
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_PREDICTOR_0_ACK        ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_PREDICTOR_1_ACK        ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_PREDICTOR_2_ACK        ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_ACK                    ;
+
+  sc_signal<Tbht_history_t>       ** BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY;
+  sc_signal<Tpht_history_t>       ** BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY;
+  sc_signal<Tbht_history_t>       ** BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY;
+  sc_signal<Tpht_history_t>       ** BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY;
+  sc_signal<Tbht_history_t>       ** BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY;
+  sc_signal<Tpht_history_t>       ** BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY;
+  sc_signal<Thistory_t>           ** BRANCH_COMPLETE_HISTORY                ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_DIRECTION              ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_PREDICTOR_2_DIRECTION  ;
+  string rename;
+
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+  CLOCK                             = new sc_clock ("clock", 1.0, 0.5);
+  NRESET                            = new sc_signal<Tcontrol_t> ("nreset");
+#endif  
+
+    // Interface Predict
+
+    PREDICT_PREDICTOR_0_ACK         = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_1_ACK         = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_2_ACK         = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+    PREDICT_ACK                     = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_0_BHT_HISTORY = new sc_signal<Tbht_history_t> * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_0_PHT_HISTORY = new sc_signal<Tpht_history_t> * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_1_BHT_HISTORY = new sc_signal<Tbht_history_t> * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_1_PHT_HISTORY = new sc_signal<Tpht_history_t> * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_2_BHT_HISTORY = new sc_signal<Tbht_history_t> * [_param._nb_prediction     ];
+    PREDICT_PREDICTOR_2_PHT_HISTORY = new sc_signal<Tpht_history_t> * [_param._nb_prediction     ];
+    PREDICT_HISTORY                 = new sc_signal<Thistory_t>     * [_param._nb_prediction     ];
+    PREDICT_DIRECTION               = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	rename = "PREDICT_PREDICTOR_0_ACK_"          +toString(i);
+	PREDICT_PREDICTOR_0_ACK                   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "PREDICT_PREDICTOR_1_ACK_"          +toString(i);
+	PREDICT_PREDICTOR_1_ACK                   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "PREDICT_PREDICTOR_2_ACK_"          +toString(i);
+	PREDICT_PREDICTOR_2_ACK                   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "PREDICT_ACK_"                    +toString(i);
+	PREDICT_ACK                               [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i);
+	PREDICT_PREDICTOR_0_BHT_HISTORY           [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+	rename = "PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i);
+	PREDICT_PREDICTOR_0_PHT_HISTORY           [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+	rename = "PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i);
+	PREDICT_PREDICTOR_1_BHT_HISTORY           [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+	rename = "PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i);
+	PREDICT_PREDICTOR_1_PHT_HISTORY           [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+	rename = "PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i);
+	PREDICT_PREDICTOR_2_BHT_HISTORY           [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+	rename = "PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i);
+	PREDICT_PREDICTOR_2_PHT_HISTORY           [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+	rename = "PREDICT_HISTORY_"                +toString(i);
+	PREDICT_HISTORY                           [i] = new sc_signal<Thistory_t>     (rename.c_str());
+    	rename = "PREDICT_DIRECTION_"              +toString(i);
+	PREDICT_DIRECTION                         [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      }
+
+    // Interface Branch_complete
+    BRANCH_COMPLETE_VAL                     = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_2_VAL         = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_0_ACK         = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_1_ACK         = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_2_ACK         = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_ACK                     = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY = new sc_signal<Tbht_history_t> * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY = new sc_signal<Tpht_history_t> * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY = new sc_signal<Tbht_history_t> * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY = new sc_signal<Tpht_history_t> * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY = new sc_signal<Tbht_history_t> * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY = new sc_signal<Tpht_history_t> * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_HISTORY                 = new sc_signal<Thistory_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_DIRECTION               = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+    BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete     ];
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	rename = "BRANCH_COMPLETE_VAL_"                      +toString(i);
+	BRANCH_COMPLETE_VAL                               [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_2_VAL_"          +toString(i);
+	BRANCH_COMPLETE_PREDICTOR_2_VAL                   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_0_ACK_"          +toString(i);
+	BRANCH_COMPLETE_PREDICTOR_0_ACK                   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_1_ACK_"          +toString(i);
+	BRANCH_COMPLETE_PREDICTOR_1_ACK                   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_2_ACK_"          +toString(i);
+	BRANCH_COMPLETE_PREDICTOR_2_ACK                   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_ACK_"                    +toString(i);
+	BRANCH_COMPLETE_ACK                               [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i);
+	BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY           [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i);
+	BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY           [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i);
+	BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY           [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i);
+	BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY           [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i);
+	BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY           [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i);
+	BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY           [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+	rename = "BRANCH_COMPLETE_HISTORY_"                +toString(i);
+	BRANCH_COMPLETE_HISTORY                           [i] = new sc_signal<Thistory_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_DIRECTION_"              +toString(i);
+	BRANCH_COMPLETE_DIRECTION                         [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+	rename = "BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"  +toString(i);
+	BRANCH_COMPLETE_PREDICTOR_2_DIRECTION             [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      }
+
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  cout << "<" << name << "> Instanciation of _Meta_Predictor_Glue" << endl;
+  
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+  (*(_Meta_Predictor_Glue->in_CLOCK))        (*(CLOCK));
+  (*(_Meta_Predictor_Glue->in_NRESET))        (*(NRESET));
+#endif
+
+    // Interface Predict
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._have_meta_predictor)
+	  {
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_ACK                 [i])) (*(PREDICT_PREDICTOR_0_ACK                 [i]));
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_ACK                 [i])) (*(PREDICT_PREDICTOR_1_ACK                 [i]));
+	  }									      					      
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_ACK                 [i])) (*(PREDICT_PREDICTOR_2_ACK                 [i]));
+	(*(_Meta_Predictor_Glue->out_PREDICT_ACK                             [i])) (*(PREDICT_ACK                             [i]));
+	if (_param._have_meta_predictor)
+	  {									      					      
+	if (_param._predictor_0_have_bht)
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_BHT_HISTORY         [i])) (*(PREDICT_PREDICTOR_0_BHT_HISTORY         [i]));
+	if (_param._predictor_0_have_pht)
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_0_PHT_HISTORY         [i])) (*(PREDICT_PREDICTOR_0_PHT_HISTORY         [i]));
+	if (_param._predictor_1_have_bht)
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_BHT_HISTORY         [i])) (*(PREDICT_PREDICTOR_1_BHT_HISTORY         [i]));
+	if (_param._predictor_1_have_pht)
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_1_PHT_HISTORY         [i])) (*(PREDICT_PREDICTOR_1_PHT_HISTORY         [i]));
+	  }									      					      
+	if (_param._predictor_2_have_bht)
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_BHT_HISTORY         [i])) (*(PREDICT_PREDICTOR_2_BHT_HISTORY         [i]));
+	if (_param._predictor_2_have_pht)
+	(*(_Meta_Predictor_Glue-> in_PREDICT_PREDICTOR_2_PHT_HISTORY         [i])) (*(PREDICT_PREDICTOR_2_PHT_HISTORY         [i]));
+	(*(_Meta_Predictor_Glue->out_PREDICT_HISTORY                         [i])) (*(PREDICT_HISTORY                         [i]));
+	(*(_Meta_Predictor_Glue->out_PREDICT_DIRECTION                       [i])) (*(PREDICT_DIRECTION                       [i]));
+      }
+
+    // Interface Branch_complete
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	if (_param._have_meta_predictor)
+	  {
+	(*(_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_VAL                     [i])) (*(BRANCH_COMPLETE_VAL                     [i]));
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_VAL         [i])) (*(BRANCH_COMPLETE_PREDICTOR_2_VAL         [i]));
+
+	(*(_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_0_ACK         [i])) (*(BRANCH_COMPLETE_PREDICTOR_0_ACK         [i]));
+	(*(_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_1_ACK         [i])) (*(BRANCH_COMPLETE_PREDICTOR_1_ACK         [i]));
+	  }					
+	(*(_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_PREDICTOR_2_ACK         [i])) (*(BRANCH_COMPLETE_PREDICTOR_2_ACK         [i]));
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_ACK                     [i])) (*(BRANCH_COMPLETE_ACK                     [i]));
+						
+	if (_param._have_meta_predictor)	
+	  {					
+	if (_param._predictor_0_have_bht)
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i])) (*(BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]));
+	if (_param._predictor_0_have_pht)
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i])) (*(BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]));
+	if (_param._predictor_1_have_bht)
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i])) (*(BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]));
+	if (_param._predictor_1_have_pht)
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i])) (*(BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i]));
+	  }					
+	if (_param._predictor_2_have_bht)
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i])) (*(BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]));
+	if (_param._predictor_2_have_pht)
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i])) (*(BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]));
+	(*(_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_HISTORY                 [i])) (*(BRANCH_COMPLETE_HISTORY                 [i]));
+	if (_param._have_meta_predictor)	
+	  {
+	(*(_Meta_Predictor_Glue-> in_BRANCH_COMPLETE_DIRECTION               [i])) (*(BRANCH_COMPLETE_DIRECTION               [i]));
+	(*(_Meta_Predictor_Glue->out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i])) (*(BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i]));
+	  }
+      }
+
+  /********************************************************
+   * Simulation - Begin
+   ********************************************************/
+
+  cout << "<" << name << "> Start Simulation ............" << endl;
+  // Initialisation
+
+  const uint32_t seed = 0;
+//const uint32_t seed = static_cast<uint32_t>(time(NULL));
+
+  srand(seed);
+
+  sc_start(0);
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
+
+  NRESET->write(0);
+  sc_start(5);
+  NRESET->write(1);
+  // No need initialisation
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
+  
+  Tcontrol_t     predict_ack                             [_param._nb_prediction];
+  Thistory_t     predict_history                         [_param._nb_prediction];
+  Tcontrol_t     predict_direction                       [_param._nb_prediction];
+	        
+  Tcontrol_t     branch_complete_predictor_2_val         [_param._nb_branch_complete];
+  Tcontrol_t     branch_complete_ack                     [_param._nb_branch_complete];
+  Tbht_history_t branch_complete_predictor_0_bht_history [_param._nb_branch_complete];
+  Tpht_history_t branch_complete_predictor_0_pht_history [_param._nb_branch_complete];
+  Tbht_history_t branch_complete_predictor_1_bht_history [_param._nb_branch_complete];
+  Tpht_history_t branch_complete_predictor_1_pht_history [_param._nb_branch_complete];
+  Tbht_history_t branch_complete_predictor_2_bht_history [_param._nb_branch_complete];
+  Tpht_history_t branch_complete_predictor_2_pht_history [_param._nb_branch_complete];
+  Tcontrol_t     branch_complete_predictor_2_direction   [_param._nb_branch_complete];
+
+  uint32_t shift_0 = 0;
+  uint32_t shift_1 = shift_0 + _param._predictor_0_bht_size_shifter;
+  uint32_t shift_2 = shift_1 + _param._predictor_0_pht_size_counter;
+  uint32_t shift_3 = shift_2 + _param._predictor_1_bht_size_shifter;
+  uint32_t shift_4 = shift_3 + _param._predictor_1_pht_size_counter;
+  uint32_t shift_5 = shift_4 + _param._predictor_2_bht_size_shifter;
+//uint32_t shift_6 = shift_5 + _param._predictor_2_pht_size_counter;
+
+  cout << "shift_0 : " << shift_0 << endl;
+  cout << "shift_1 : " << shift_1 << endl;
+  cout << "shift_2 : " << shift_2 << endl;
+  cout << "shift_3 : " << shift_3 << endl;
+  cout << "shift_4 : " << shift_4 << endl;
+  cout << "shift_5 : " << shift_5 << endl;
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+
+      for (uint32_t i=0; i<_param._nb_prediction; i++)
+	{
+	  Tcontrol_t     predictor_0_ack        , predictor_1_ack        , predictor_2_ack        ;
+	  Tpht_history_t predictor_0_pht_history, predictor_1_pht_history, predictor_2_pht_history;
+	  Tbht_history_t predictor_0_bht_history, predictor_1_bht_history, predictor_2_bht_history;
+
+	  predictor_0_ack             = not _param._have_meta_predictor or ((rand()%2) != 0);
+	  predictor_1_ack             = not _param._have_meta_predictor or ((rand()%2) != 0);
+	  predictor_2_ack             =                                    ((rand()%2) != 0);
+	  predict_ack             [i] = predictor_0_ack and predictor_1_ack and predictor_2_ack;
+
+	  PREDICT_PREDICTOR_0_ACK [i] ->write (predictor_0_ack);
+	  PREDICT_PREDICTOR_1_ACK [i] ->write (predictor_1_ack);
+	  PREDICT_PREDICTOR_2_ACK [i] ->write (predictor_2_ack);
+				      
+	  predictor_0_bht_history     = rand() % (_param._predictor_0_bht_size_shifter+1);
+	  predictor_0_pht_history     = rand() % (_param._predictor_0_pht_size_counter+1);
+	  predictor_1_bht_history     = rand() % (_param._predictor_1_bht_size_shifter+1);
+	  predictor_1_pht_history     = rand() % (_param._predictor_1_pht_size_counter+1);
+	  predictor_2_bht_history     = rand() % (_param._predictor_2_bht_size_shifter+1);
+	  predictor_2_pht_history     = rand() % (_param._predictor_2_pht_size_counter+1);
+				      
+	  predict_history         [i] = ( (predictor_0_bht_history << shift_0) |
+					  (predictor_0_pht_history << shift_1) |
+					  (predictor_1_bht_history << shift_2) |
+					  (predictor_1_pht_history << shift_3) |
+					  (predictor_2_bht_history << shift_4) |
+					  (predictor_2_pht_history << shift_5) );
+	  
+	  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} predict         [" << i << "]" << endl
+	       << "       _2_ " << predictor_2_bht_history << " - " << predictor_2_pht_history << endl
+	       << "     _/    " << endl
+	       << "    | |-1- " << predictor_1_bht_history << " - " << predictor_1_pht_history << endl
+	       << "  --| |    " << endl
+	       << "    |_|-0- " << predictor_0_bht_history << " - " << predictor_0_pht_history << endl;
+
+
+	  Tcontrol_t predict_direction_predictor_2;
+	  
+	  if (_param._predictor_2_have_pht)
+	    predict_direction_predictor_2 = (predictor_2_pht_history & (1<<(_param._predictor_2_pht_size_counter-1))) != 0;
+	  else
+	    predict_direction_predictor_2 = (predictor_2_bht_history & (1<<(_param._predictor_2_bht_size_shifter-1))) != 0;
+
+	  if (_param._have_meta_predictor == false)
+	    predict_direction       [i] = predict_direction_predictor_2;
+	  else
+	    if (predict_direction_predictor_2 == false)
+	      if (_param._predictor_0_have_pht)
+		predict_direction       [i] = (predictor_0_pht_history & (1<<(_param._predictor_0_pht_size_counter-1))) != 0;
+	      else
+		predict_direction       [i] = (predictor_0_bht_history & (1<<(_param._predictor_0_bht_size_shifter-1))) != 0;
+	    else
+	      if (_param._predictor_1_have_pht)
+		predict_direction       [i] = (predictor_1_pht_history & (1<<(_param._predictor_1_pht_size_counter-1))) != 0;
+	      else
+		predict_direction       [i] = (predictor_1_bht_history & (1<<(_param._predictor_1_bht_size_shifter-1))) != 0;
+
+	  PREDICT_PREDICTOR_0_BHT_HISTORY [i]->write(predictor_0_bht_history);
+	  PREDICT_PREDICTOR_0_PHT_HISTORY [i]->write(predictor_0_pht_history);
+	  PREDICT_PREDICTOR_1_BHT_HISTORY [i]->write(predictor_1_bht_history);
+	  PREDICT_PREDICTOR_1_PHT_HISTORY [i]->write(predictor_1_pht_history);
+	  PREDICT_PREDICTOR_2_BHT_HISTORY [i]->write(predictor_2_bht_history);
+	  PREDICT_PREDICTOR_2_PHT_HISTORY [i]->write(predictor_2_pht_history);
+	}
+
+      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	{
+	  Tcontrol_t     predictor_0_ack        , predictor_1_ack        , predictor_2_ack        ;
+
+	  predictor_0_ack                             = not _param._have_meta_predictor or ((rand()%2) != 0);
+	  predictor_1_ack                             = not _param._have_meta_predictor or ((rand()%2) != 0);
+	  predictor_2_ack                             =                                    ((rand()%2) != 0);
+	  branch_complete_ack                     [i] = predictor_0_ack and predictor_1_ack and predictor_2_ack;
+
+	  BRANCH_COMPLETE_PREDICTOR_0_ACK         [i] ->write (predictor_0_ack);
+	  BRANCH_COMPLETE_PREDICTOR_1_ACK         [i] ->write (predictor_1_ack);
+	  BRANCH_COMPLETE_PREDICTOR_2_ACK         [i] ->write (predictor_2_ack);
+
+	  branch_complete_predictor_0_bht_history [i] = rand() % (1<<_param._predictor_0_bht_size_shifter);
+	  branch_complete_predictor_0_pht_history [i] = rand() % (1<<_param._predictor_0_pht_size_counter);
+	  branch_complete_predictor_1_bht_history [i] = rand() % (1<<_param._predictor_1_bht_size_shifter);
+	  branch_complete_predictor_1_pht_history [i] = rand() % (1<<_param._predictor_1_pht_size_counter);
+	  branch_complete_predictor_2_bht_history [i] = rand() % (1<<_param._predictor_2_bht_size_shifter);
+	  branch_complete_predictor_2_pht_history [i] = rand() % (1<<_param._predictor_2_pht_size_counter);
+		
+	  Thistory_t history = ((branch_complete_predictor_0_bht_history [i] << shift_0) |
+				(branch_complete_predictor_0_pht_history [i] << shift_1) |
+				(branch_complete_predictor_1_bht_history [i] << shift_2) |
+				(branch_complete_predictor_1_pht_history [i] << shift_3) |
+				(branch_complete_predictor_2_bht_history [i] << shift_4) |
+				(branch_complete_predictor_2_pht_history [i] << shift_5) );
+
+	  BRANCH_COMPLETE_HISTORY                 [i]->write (history);
+
+	  cout << "<test> [" << i << "] : " << endl
+	     << hex 
+	     << " *   " << history << endl
+	     << "   - " << branch_complete_predictor_0_bht_history [i] << endl
+	     << "   - " << branch_complete_predictor_0_pht_history [i] << endl
+	     << "   - " << branch_complete_predictor_1_bht_history [i] << endl
+	     << "   - " << branch_complete_predictor_1_pht_history [i] << endl
+	     << "   - " << branch_complete_predictor_2_bht_history [i] << endl
+	     << "   - " << branch_complete_predictor_2_pht_history [i] << endl
+	     << dec;
+
+	  Tcontrol_t direction_0 = ((_param._predictor_0_have_pht)?(branch_complete_predictor_0_pht_history [i] >> (_param._predictor_0_pht_size_counter-1)):(branch_complete_predictor_0_bht_history [i] >> (_param._predictor_0_bht_size_shifter-1)))&1;
+	  Tcontrol_t direction_1 = ((_param._predictor_1_have_pht)?(branch_complete_predictor_1_pht_history [i] >> (_param._predictor_1_pht_size_counter-1)):(branch_complete_predictor_1_bht_history [i] >> (_param._predictor_1_bht_size_shifter-1)))&1;
+	  Tcontrol_t direction_2 = ((_param._predictor_2_have_pht)?(branch_complete_predictor_2_pht_history [i] >> (_param._predictor_2_pht_size_counter-1)):(branch_complete_predictor_2_bht_history [i] >> (_param._predictor_2_bht_size_shifter-1)))&1;
+
+	  Tcontrol_t direction   = ((rand()%2) != 0);
+	  Tcontrol_t val         = ((rand()%2) != 0);
+
+	  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << endl 
+	       << "  * val             : " << val << endl
+	       << "  * direction_good  : " << direction << endl
+	       << "    * direction_0   : " << direction_0 << endl
+	       << "    * direction_1   : " << direction_1 << endl
+	       << "    * direction_2   : " << direction_2 << endl;
+	  
+	  BRANCH_COMPLETE_VAL       [i] ->write (val);
+	  BRANCH_COMPLETE_DIRECTION [i] ->write (direction);
+	  
+	  if (val == 0)
+	    {
+	      branch_complete_predictor_2_val [i] = val;
+	    }
+	  else
+	    {
+	      branch_complete_predictor_2_val [i] = (direction_0 xor direction_1);
+	      if (direction_2 == 0)
+		if (direction_0 == direction)
+		  branch_complete_predictor_2_direction [i] = 0;
+		else
+		  branch_complete_predictor_2_direction [i] = 1;
+	      else
+		if (direction_1 == direction)
+		  branch_complete_predictor_2_direction [i] = 1;
+		else
+		  branch_complete_predictor_2_direction [i] = 0;
+	    }
+	}
+
+      sc_start(1);
+
+      for (uint32_t i=0; i<_param._nb_prediction; i++)
+	{
+	  TEST(Tcontrol_t    , PREDICT_ACK                             [i]->read(), predict_ack                             [i]);
+	  TEST(Tcontrol_t    , PREDICT_HISTORY                         [i]->read(), predict_history                         [i]);
+	  TEST(Tcontrol_t    , PREDICT_DIRECTION                       [i]->read(), predict_direction                       [i]);
+	}
+
+      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	{
+	  TEST(Tcontrol_t    , BRANCH_COMPLETE_ACK                     [i]->read(), branch_complete_ack                     [i]);
+
+	if (_param._have_meta_predictor)	
+	  {					
+	  TEST(Tcontrol_t    , BRANCH_COMPLETE_PREDICTOR_2_VAL         [i]->read(), branch_complete_predictor_2_val         [i]);
+
+	  if (branch_complete_predictor_2_val         [i])
+	  TEST(Tcontrol_t    , BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   [i]->read(), branch_complete_predictor_2_direction   [i]);  
+
+	if (_param._predictor_0_have_bht)
+	  TEST(Tbht_history_t, BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i]->read(), branch_complete_predictor_0_bht_history [i]);
+	if (_param._predictor_0_have_pht)
+	  TEST(Tpht_history_t, BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i]->read(), branch_complete_predictor_0_pht_history [i]);
+	if (_param._predictor_1_have_bht)
+	  TEST(Tbht_history_t, BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i]->read(), branch_complete_predictor_1_bht_history [i]);
+	if (_param._predictor_1_have_pht)
+	  TEST(Tpht_history_t, BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i]->read(), branch_complete_predictor_1_pht_history [i]);
+	  }					
+	if (_param._predictor_2_have_bht)
+	  TEST(Tbht_history_t, BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i]->read(), branch_complete_predictor_2_bht_history [i]);
+	if (_param._predictor_2_have_pht)
+	  TEST(Tpht_history_t, BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i]->read(), branch_complete_predictor_2_pht_history [i]);
+	}
+    }
+
+  /********************************************************
+   * Simulation - End
+   ********************************************************/
+
+  cout << "<" << name << "> ............ Stop Simulation" << endl;
+
+#endif
+
+  delete _Meta_Predictor_Glue;
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/Makefile	(revision 105)
@@ -0,0 +1,19 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= ..
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ include ]------------------------------------------
+
+all				:
+				$(MAKE) all_documentation
+
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Documentation
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/Meta_Predictor_Glue.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/Meta_Predictor_Glue.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/Meta_Predictor_Glue.tex	(revision 105)
@@ -0,0 +1,38 @@
+\documentclass[10pt,a4paper,twocolumn]{article}
+
+\def\dirdoc{tex}
+\def\dirschema{eps}
+
+% Package de variables d'environnement : Titre, command etc ...
+\usepackage{../../../../../../Behavioural/doc/sty/doc-style}
+\usepackage{sty/header}
+
+
+%------------------------------------------------------------------------------
+% Début document
+%------------------------------------------------------------------------------
+
+\pagestyle{empty}
+
+\begin{document}
+
+% Créez une page de titre
+\maketitle
+\thispagestyle{empty}
+
+%Table des matières et des figures
+%\tableofcontents
+%\newpage
+%\listoffigures
+
+%------------------------------------------------------------------------------
+% Ajout du corps du documents
+%------------------------------------------------------------------------------
+
+\input{tex/root}
+
+%------------------------------------------------------------------------------
+% Fin d'ajout du corps du document
+%------------------------------------------------------------------------------
+
+\end{document}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/sty/header.sty
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/sty/header.sty	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/sty/header.sty	(revision 105)
@@ -0,0 +1,12 @@
+\def\review{YYYY/MM/DD}
+%\def\review{\number\day/\number\month/\number\year\xspace}
+
+\title{Meta\_Predictor\_Glue}
+ 
+\author{}
+
+\affiliation{}
+
+\email{}
+
+\date{\review}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/01_introduction.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/01_introduction.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/01_introduction.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Introduction}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/02_features.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/02_features.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/02_features.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Features}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/03_description.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/03_description.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/03_description.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Functional Description}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/04_pinout.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/04_pinout.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/04_pinout.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Pin out}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/05_parameters.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/05_parameters.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/05_parameters.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Parameters}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/06_performance.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/06_performance.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/06_performance.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Performance}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/07_details.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/07_details.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/07_details.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Details}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/08_history.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/08_history.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/08_history.tex	(revision 105)
@@ -0,0 +1,10 @@
+\Section{Revision History}
+
+\begin{tabular}{|c|c|c|}
+\hline
+Revision Date & By  & Modifications\\
+\hline
+\hline
+yyyy/mm/dd    & xxx & Initial document \\
+\hline
+\end{tabular}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/root.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/root.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/doc/tex/root.tex	(revision 105)
@@ -0,0 +1,8 @@
+\input{\dirdoc/01_introduction}
+\input{\dirdoc/02_features}
+\input{\dirdoc/03_description}
+\input{\dirdoc/04_pinout}
+\input{\dirdoc/05_parameters}
+\input{\dirdoc/06_performance}
+\input{\dirdoc/07_details}
+\input{\dirdoc/08_history}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h	(revision 105)
@@ -0,0 +1,171 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Meta_Predictor_Glue_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Meta_Predictor_Glue_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <iostream>
+#include "Common/include/ToString.h"
+#include "Common/include/Debug.h"
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Types.h"
+#ifdef STATISTICS
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Statistics.h"
+#endif
+#ifdef VHDL
+#include "Behavioural/include/Vhdl.h"
+#endif
+#include "Behavioural/include/Component.h"
+
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  class Meta_Predictor_Glue 
+#if SYSTEMC
+    : public sc_module
+#endif
+  {
+    // -----[ fields ]----------------------------------------------------
+    // Parameters
+  protected : const string     _name;
+
+  protected : const Parameters _param;
+//#ifdef STATISTICS
+//  protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
+//#endif
+
+#ifdef STATISTICS
+  private   : Statistics                     * _stat;
+#endif
+
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
+
+#ifdef SYSTEMC
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Interface
+  public    : SC_CLOCK                      *  in_CLOCK                                  ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET                                 ;
+
+    // Interface Predict
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PREDICTOR_0_ACK                ;
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PREDICTOR_1_ACK                ;
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PREDICTOR_2_ACK                ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                            ;
+
+  public    : SC_IN (Tbht_history_t)       **  in_PREDICT_PREDICTOR_0_BHT_HISTORY        ;
+  public    : SC_IN (Tpht_history_t)       **  in_PREDICT_PREDICTOR_0_PHT_HISTORY        ;
+  public    : SC_IN (Tbht_history_t)       **  in_PREDICT_PREDICTOR_1_BHT_HISTORY        ;
+  public    : SC_IN (Tpht_history_t)       **  in_PREDICT_PREDICTOR_1_PHT_HISTORY        ;
+  public    : SC_IN (Tbht_history_t)       **  in_PREDICT_PREDICTOR_2_BHT_HISTORY        ;
+  public    : SC_IN (Tpht_history_t)       **  in_PREDICT_PREDICTOR_2_PHT_HISTORY        ;
+  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY                        ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_DIRECTION                      ;
+
+    // Interface Branch_complete
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL                    ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_PREDICTOR_2_VAL        ;
+
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_PREDICTOR_0_ACK        ;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_PREDICTOR_1_ACK        ;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_PREDICTOR_2_ACK        ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK                    ;
+
+  public    : SC_OUT(Tbht_history_t)       ** out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY;
+  public    : SC_OUT(Tpht_history_t)       ** out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY;
+  public    : SC_OUT(Tbht_history_t)       ** out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY;
+  public    : SC_OUT(Tpht_history_t)       ** out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY;
+  public    : SC_OUT(Tbht_history_t)       ** out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY;
+  public    : SC_OUT(Tpht_history_t)       ** out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY;
+  public    : SC_IN (Thistory_t)           **  in_BRANCH_COMPLETE_HISTORY                ;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION              ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION  ;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#endif
+
+    // -----[ methods ]---------------------------------------------------
+
+#ifdef SYSTEMC
+    SC_HAS_PROCESS (Meta_Predictor_Glue);
+#endif
+  public  :          Meta_Predictor_Glue              (
+#ifdef SYSTEMC
+					      sc_module_name                              name,
+#else					       
+					      string                                      name,
+#endif					       
+#ifdef STATISTICS
+					      morpheo::behavioural::Parameters_Statistics param_statistics,
+#endif
+					      Parameters                                  param );
+					       
+  public  :          Meta_Predictor_Glue              (Parameters param );
+  public  :          ~Meta_Predictor_Glue             (void);
+					       
+#ifdef SYSTEMC				       
+  private : void     allocation                (void);
+  private : void     deallocation              (void);
+				
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+  public  : void     transition                       (void);
+#endif
+  public  : void     genMealy_predict_ack             (void);
+  public  : void     genMealy_predict_history         (void);
+  public  : void     genMealy_branch_complete_val     (void);
+  public  : void     genMealy_branch_complete_ack     (void);
+  public  : void     genMealy_branch_complete_history (void);
+
+#endif					       
+#ifdef STATISTICS
+  public  : string   statistics                (uint32_t depth);
+#endif
+					       
+#if VHDL				       
+  public  : void     vhdl                      (void);
+  private : void     vhdl_declaration          (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
+#endif					       
+#ifdef VHDL_TESTBENCH			       
+  private : void     vhdl_testbench_transition (void);
+#endif
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Parameters.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Parameters.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Parameters.h	(revision 105)
@@ -0,0 +1,99 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Parameters_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Parameters_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Parameters.h"
+#include <math.h>
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  class Parameters : public morpheo::behavioural::Parameters
+  {
+    //-----[ fields ]------------------------------------------------------------
+  public : const bool     _have_meta_predictor               ;
+
+  public : const bool     _predictor_0_have_bht              ;
+  public : const uint32_t _predictor_0_bht_size_shifter      ;
+  public : const bool     _predictor_0_have_pht              ;
+  public : const uint32_t _predictor_0_pht_size_counter      ;
+
+  public : const bool     _predictor_1_have_bht              ;
+  public : const uint32_t _predictor_1_bht_size_shifter      ;
+  public : const bool     _predictor_1_have_pht              ;
+  public : const uint32_t _predictor_1_pht_size_counter      ;
+
+  public : const bool     _predictor_2_have_bht              ;
+  public : const uint32_t _predictor_2_bht_size_shifter      ;
+  public : const bool     _predictor_2_have_pht              ;
+  public : const uint32_t _predictor_2_pht_size_counter      ;
+
+  public : const uint32_t _nb_prediction                     ;
+  public : const uint32_t _nb_branch_complete                ;
+
+  public : const uint32_t _size_history                      ;
+
+  public : const uint32_t _shift_0;
+  public : const uint32_t _shift_1;
+  public : const uint32_t _shift_2;
+  public : const uint32_t _shift_3;
+  public : const uint32_t _shift_4;
+  public : const uint32_t _shift_5;
+  public : const uint32_t _shift_6;
+
+    //-----[ methods ]-----------------------------------------------------------
+  public : Parameters  (bool     have_meta_predictor               ,
+			bool     predictor_0_have_bht              ,
+			uint32_t predictor_0_bht_size_shifter      ,
+			bool     predictor_0_have_pht              ,
+			uint32_t predictor_0_pht_size_counter      ,
+			bool     predictor_1_have_bht              ,
+			uint32_t predictor_1_bht_size_shifter      ,
+			bool     predictor_1_have_pht              ,
+			uint32_t predictor_1_pht_size_counter      ,
+			bool     predictor_2_have_bht              ,
+			uint32_t predictor_2_bht_size_shifter      ,
+			bool     predictor_2_have_pht              ,
+			uint32_t predictor_2_pht_size_counter      ,
+			uint32_t nb_prediction                     ,
+			uint32_t nb_branch_complete                );
+  public : Parameters  (Parameters & param) ;
+  public : ~Parameters () ;
+
+  public : string msg_error (void);
+
+  public :        string   print      (uint32_t depth);
+  public : friend ostream& operator<< (ostream& output_stream,
+				       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters & x);
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Statistics.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Statistics.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Statistics.h	(revision 105)
@@ -0,0 +1,68 @@
+#ifdef STATISTICS
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Statistics_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Statistics_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Statistics.h"
+#include "Behavioural/include/Parameters_Statistics.h"
+//#include "Behavioural/Generic/Group/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
+
+//using namespace morpheo::behavioural::generic::group;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  class Statistics : public morpheo::behavioural::Statistics
+  {
+    // -----[ fields ]----------------------------------------------------
+  private  : const Parameters                                   _parameters;
+
+    // -----[ methods ]---------------------------------------------------
+  public   : Statistics  (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  );
+//public   : Statistics  (Statistics & stat);
+  public   : ~Statistics () ;
+    
+  public   : string   print_body (uint32_t depth);
+  public   : string   print      (uint32_t depth);
+  public   : void     add        ();
+
+  public   : friend ostream& operator<< (ostream& output_stream,
+					 const Statistics & x);
+
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Types.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/include/Types.h	(revision 105)
@@ -0,0 +1,43 @@
+#ifdef SYSTEMC
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Type_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_meta_predictor_glue_Type_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Types.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+  typedef uint32_t Thistory_t;
+  typedef uint32_t Tbht_history_t;
+  typedef uint32_t Tpht_history_t;
+  
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue.cpp	(revision 105)
@@ -0,0 +1,280 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+#ifdef SYSTEMC
+  Meta_Predictor_Glue::Meta_Predictor_Glue (sc_module_name name,
+#else
+  Meta_Predictor_Glue::Meta_Predictor_Glue (string name,
+#endif
+#ifdef STATISTICS
+			      morpheo::behavioural::Parameters_Statistics             param_statistics,
+#endif
+			      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters param ):
+			      _name              (name)
+			      ,_param            (param)
+// #ifdef STATISTICS
+// 			      ,_param_statistics (param_statistics)
+// #endif
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"Meta_Predictor_Glue","Begin");
+
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","Allocation");
+    allocation ();
+
+#ifdef STATISTICS
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","Allocation of statistics");
+
+    // Allocation of statistics
+    _stat = new Statistics (static_cast<string>(_name),
+			    param_statistics          ,
+			    param);
+#endif
+
+#ifdef VHDL
+    // generate the vhdl
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","VHDL's generation");
+    vhdl();
+#endif
+
+#ifdef SYSTEMC
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","method - transition");
+
+    SC_METHOD (transition);
+    dont_initialize ();
+    sensitive_pos << *(in_CLOCK);
+#endif
+
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","method - genMealy_predict_ack");
+    SC_METHOD (genMealy_predict_ack);
+    dont_initialize ();
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	sensitive << *(in_PREDICT_PREDICTOR_2_ACK [i]);
+	
+	if (_param._have_meta_predictor)
+	  {
+	    sensitive << *(in_PREDICT_PREDICTOR_0_ACK [i])
+		      << *(in_PREDICT_PREDICTOR_1_ACK [i]);
+	  }			           
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	(*(out_PREDICT_ACK [i])) (*(in_PREDICT_PREDICTOR_2_ACK [i]));
+	
+	if (_param._have_meta_predictor)
+	  {
+	(*(out_PREDICT_ACK [i])) (*(in_PREDICT_PREDICTOR_0_ACK [i]));
+	(*(out_PREDICT_ACK [i])) (*(in_PREDICT_PREDICTOR_1_ACK [i]));
+	  }			           
+      }
+#endif    
+
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","method - genMealy_predict_history");
+    SC_METHOD (genMealy_predict_history);
+    dont_initialize ();
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._predictor_2_have_bht)
+	sensitive << *(in_PREDICT_PREDICTOR_2_BHT_HISTORY [i]);
+	if (_param._predictor_2_have_pht)
+	sensitive << *(in_PREDICT_PREDICTOR_2_PHT_HISTORY [i]);
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_1_have_bht)
+	sensitive << *(in_PREDICT_PREDICTOR_1_BHT_HISTORY [i]);
+	if (_param._predictor_1_have_pht)
+	sensitive << *(in_PREDICT_PREDICTOR_1_PHT_HISTORY [i]);
+
+	if (_param._predictor_0_have_bht)
+	sensitive << *(in_PREDICT_PREDICTOR_0_BHT_HISTORY [i]);
+	if (_param._predictor_0_have_pht)
+	sensitive << *(in_PREDICT_PREDICTOR_0_PHT_HISTORY [i]);
+	  }			           
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._predictor_2_have_bht)
+	(*(out_PREDICT_HISTORY    [i])) (*(in_PREDICT_PREDICTOR_2_BHT_HISTORY [i]));
+	if (_param._predictor_2_have_pht)
+	(*(out_PREDICT_HISTORY    [i])) (*(in_PREDICT_PREDICTOR_2_PHT_HISTORY [i]));
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_1_have_bht)
+	(*(out_PREDICT_HISTORY    [i])) (*(in_PREDICT_PREDICTOR_1_BHT_HISTORY [i]));
+	if (_param._predictor_1_have_pht)
+	(*(out_PREDICT_HISTORY    [i])) (*(in_PREDICT_PREDICTOR_1_PHT_HISTORY [i]));
+
+	if (_param._predictor_0_have_bht)
+	(*(out_PREDICT_HISTORY    [i])) (*(in_PREDICT_PREDICTOR_0_BHT_HISTORY [i]));
+	if (_param._predictor_0_have_pht)
+	(*(out_PREDICT_HISTORY    [i])) (*(in_PREDICT_PREDICTOR_0_PHT_HISTORY [i]));
+	  }			           
+
+	if (_param._predictor_2_have_bht)
+	(*(out_PREDICT_DIRECTION  [i])) (*(in_PREDICT_PREDICTOR_2_BHT_HISTORY [i]));
+	if (_param._predictor_2_have_pht)
+	(*(out_PREDICT_DIRECTION  [i])) (*(in_PREDICT_PREDICTOR_2_PHT_HISTORY [i]));
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_1_have_bht)
+	(*(out_PREDICT_DIRECTION  [i])) (*(in_PREDICT_PREDICTOR_1_BHT_HISTORY [i]));
+	if (_param._predictor_1_have_pht)
+	(*(out_PREDICT_DIRECTION  [i])) (*(in_PREDICT_PREDICTOR_1_PHT_HISTORY [i]));
+
+	if (_param._predictor_0_have_bht)
+	(*(out_PREDICT_DIRECTION  [i])) (*(in_PREDICT_PREDICTOR_0_BHT_HISTORY [i]));
+	if (_param._predictor_0_have_pht)
+	(*(out_PREDICT_DIRECTION  [i])) (*(in_PREDICT_PREDICTOR_0_PHT_HISTORY [i]));
+	  }			           
+      }
+#endif    
+
+    if (_param._have_meta_predictor)
+      {
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","method - genMealy_branch_complete_val");
+    SC_METHOD (genMealy_branch_complete_val);
+    dont_initialize ();
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	sensitive << *(in_BRANCH_COMPLETE_VAL       [i])
+		  << *(in_BRANCH_COMPLETE_HISTORY   [i])
+		  << *(in_BRANCH_COMPLETE_DIRECTION [i]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	(*(out_BRANCH_COMPLETE_PREDICTOR_2_VAL       [i])) (*(in_BRANCH_COMPLETE_VAL       [i]));
+	(*(out_BRANCH_COMPLETE_PREDICTOR_2_VAL       [i])) (*(in_BRANCH_COMPLETE_HISTORY   [i]));
+	(*(out_BRANCH_COMPLETE_PREDICTOR_2_VAL       [i])) (*(in_BRANCH_COMPLETE_DIRECTION [i]));
+
+	(*(out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i])) (*(in_BRANCH_COMPLETE_VAL       [i]));
+	(*(out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i])) (*(in_BRANCH_COMPLETE_HISTORY   [i]));
+	(*(out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i])) (*(in_BRANCH_COMPLETE_DIRECTION [i]));
+      }
+#endif    
+      }
+
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","method - genMealy_branch_complete_ack");
+    SC_METHOD (genMealy_branch_complete_ack);
+    dont_initialize ();
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	sensitive << *(in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i]);
+	
+	if (_param._have_meta_predictor)
+	  {
+	    sensitive << *(in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i])
+		      << *(in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i]);
+	  }			           
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	(*(out_BRANCH_COMPLETE_ACK [i])) (*(in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i]));
+	
+	if (_param._have_meta_predictor)
+	  {
+	(*(out_BRANCH_COMPLETE_ACK [i])) (*(in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i]));
+	(*(out_BRANCH_COMPLETE_ACK [i])) (*(in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i]));
+	  }			           
+      }
+#endif    
+
+    log_printf(INFO,Meta_Predictor_Glue,"Meta_Predictor_Glue","method - genMealy_branch_complete_history");
+    SC_METHOD (genMealy_branch_complete_history);
+    dont_initialize ();
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	sensitive << *(in_BRANCH_COMPLETE_HISTORY [i]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	if (_param._predictor_2_have_bht)
+	 (*(out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_HISTORY    [i]));
+	if (_param._predictor_2_have_pht)
+	 (*(out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_HISTORY    [i]));
+		
+	if (_param._have_meta_predictor)
+	  {
+	    if (_param._predictor_1_have_bht)
+	 (*(out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_HISTORY    [i]));
+	    if (_param._predictor_1_have_pht)
+	 (*(out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_HISTORY    [i]));
+													   
+	    if (_param._predictor_0_have_bht)
+	 (*(out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_HISTORY    [i]));
+	    if (_param._predictor_0_have_pht)
+	 (*(out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i])) (*( in_BRANCH_COMPLETE_HISTORY    [i]));
+	  }			           
+      }
+#endif    
+
+#endif
+    log_printf(FUNC,Meta_Predictor_Glue,"Meta_Predictor_Glue","End");
+  };
+  
+  Meta_Predictor_Glue::~Meta_Predictor_Glue (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"~Meta_Predictor_Glue","Begin");
+
+#ifdef STATISTICS
+    log_printf(INFO,Meta_Predictor_Glue,"~Meta_Predictor_Glue","Generate Statistics");
+    _stat->generate_file(statistics(0));
+    
+    delete _stat;
+#endif
+
+#ifdef SYSTEMC
+    log_printf(INFO,Meta_Predictor_Glue,"~Meta_Predictor_Glue","Dealocation");
+    deallocation ();
+#endif
+
+    log_printf(FUNC,Meta_Predictor_Glue,"~Meta_Predictor_Glue","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_allocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_allocation.cpp	(revision 105)
@@ -0,0 +1,215 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::allocation (void)
+  {
+    string rename;
+
+    log_printf(FUNC,Meta_Predictor_Glue,"allocation","Begin");
+
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Two_Level_Branch_Predictor_Glue"
+#ifdef POSITION
+					     ,COMBINATORY
+#endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      Interface * interface = _interfaces->set_interface(""
+#ifdef POSITION
+							 , IN  
+							 , SOUTH
+							 , "Generalist interface"
+#endif
+							 );
+      
+      in_CLOCK              = interface->set_signal_clk              ("clock" ,1,CLOCK_VHDL_NO);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_NO);
+    }
+
+
+    // ~~~~~[ Interface : "Predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    if (_param._have_meta_predictor)
+      {
+     in_PREDICT_PREDICTOR_0_ACK         = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
+     in_PREDICT_PREDICTOR_1_ACK         = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
+      }			           
+     in_PREDICT_PREDICTOR_2_ACK         = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
+    out_PREDICT_ACK                     = new SC_OUT(Tcontrol_t)     * [_param._nb_prediction     ];
+    if (_param._have_meta_predictor)
+      {
+    if (_param._predictor_0_have_bht)
+     in_PREDICT_PREDICTOR_0_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_prediction     ];
+    if (_param._predictor_0_have_pht)
+     in_PREDICT_PREDICTOR_0_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_prediction     ];
+    if (_param._predictor_1_have_bht)
+     in_PREDICT_PREDICTOR_1_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_prediction     ];
+    if (_param._predictor_1_have_pht)
+     in_PREDICT_PREDICTOR_1_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_prediction     ];
+      }
+    if (_param._predictor_2_have_bht)
+     in_PREDICT_PREDICTOR_2_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_prediction     ];
+    if (_param._predictor_2_have_pht)
+     in_PREDICT_PREDICTOR_2_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_prediction     ];
+    out_PREDICT_HISTORY                 = new SC_OUT(Thistory_t)     * [_param._nb_prediction     ];
+    out_PREDICT_DIRECTION               = new SC_OUT(Tcontrol_t)     * [_param._nb_prediction     ];
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+								);
+
+	if (_param._have_meta_predictor)
+	  {
+	 in_PREDICT_PREDICTOR_0_ACK                   [i] = interface->set_signal_in  <Tcontrol_t>     ("predictor_0_ack"        , 1);
+	 in_PREDICT_PREDICTOR_1_ACK                   [i] = interface->set_signal_in  <Tcontrol_t>     ("predictor_1_ack"        , 1);
+	  }
+	 in_PREDICT_PREDICTOR_2_ACK                   [i] = interface->set_signal_in  <Tcontrol_t>     ("predictor_2_ack"        , 1);
+	
+	out_PREDICT_ACK                               [i] = interface->set_signal_out <Tcontrol_t>     ("ack"                    , 1);
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_bht)
+	 in_PREDICT_PREDICTOR_0_BHT_HISTORY           [i] = interface->set_signal_in  <Tbht_history_t> ("predictor_0_bht_history", _param._predictor_0_bht_size_shifter);
+	if (_param._predictor_0_have_pht)
+	 in_PREDICT_PREDICTOR_0_PHT_HISTORY           [i] = interface->set_signal_in  <Tpht_history_t> ("predictor_0_pht_history", _param._predictor_0_pht_size_counter);
+	if (_param._predictor_1_have_bht)
+	 in_PREDICT_PREDICTOR_1_BHT_HISTORY           [i] = interface->set_signal_in  <Tbht_history_t> ("predictor_1_bht_history", _param._predictor_1_bht_size_shifter);
+	if (_param._predictor_1_have_pht)
+	 in_PREDICT_PREDICTOR_1_PHT_HISTORY           [i] = interface->set_signal_in  <Tpht_history_t> ("predictor_1_pht_history", _param._predictor_1_pht_size_counter);
+	  }
+	if (_param._predictor_2_have_bht)
+	 in_PREDICT_PREDICTOR_2_BHT_HISTORY           [i] = interface->set_signal_in  <Tbht_history_t> ("predictor_2_bht_history", _param._predictor_2_bht_size_shifter);
+	if (_param._predictor_2_have_pht)
+	 in_PREDICT_PREDICTOR_2_PHT_HISTORY           [i] = interface->set_signal_in  <Tpht_history_t> ("predictor_2_pht_history", _param._predictor_2_pht_size_counter);
+	out_PREDICT_HISTORY                           [i] = interface->set_signal_out <Thistory_t>     ("history"                , _param._size_history);
+	out_PREDICT_DIRECTION                         [i] = interface->set_signal_out <Tcontrol_t>     ("direction"              , 1);
+      }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+    if (_param._have_meta_predictor)
+      {
+     in_BRANCH_COMPLETE_VAL                     = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete     ];
+    out_BRANCH_COMPLETE_PREDICTOR_2_VAL         = new SC_OUT(Tcontrol_t)     * [_param._nb_branch_complete     ];
+
+     in_BRANCH_COMPLETE_PREDICTOR_0_ACK         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete     ];
+     in_BRANCH_COMPLETE_PREDICTOR_1_ACK         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete     ];
+      }			           
+     in_BRANCH_COMPLETE_PREDICTOR_2_ACK         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete     ];
+    out_BRANCH_COMPLETE_ACK                     = new SC_OUT(Tcontrol_t)     * [_param._nb_branch_complete     ];
+    if (_param._have_meta_predictor)
+      {
+    if (_param._predictor_0_have_bht)
+    out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY = new SC_OUT(Tbht_history_t) * [_param._nb_branch_complete     ];
+    if (_param._predictor_0_have_pht)
+    out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY = new SC_OUT(Tpht_history_t) * [_param._nb_branch_complete     ];
+    if (_param._predictor_1_have_bht)
+    out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY = new SC_OUT(Tbht_history_t) * [_param._nb_branch_complete     ];
+    if (_param._predictor_1_have_pht)
+    out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY = new SC_OUT(Tpht_history_t) * [_param._nb_branch_complete     ];
+      }
+    if (_param._predictor_2_have_bht)
+    out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY = new SC_OUT(Tbht_history_t) * [_param._nb_branch_complete     ];
+    if (_param._predictor_2_have_pht)
+    out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY = new SC_OUT(Tpht_history_t) * [_param._nb_branch_complete     ];
+     in_BRANCH_COMPLETE_HISTORY                 = new SC_IN (Thistory_t)     * [_param._nb_branch_complete     ];
+    if (_param._have_meta_predictor)
+      {
+     in_BRANCH_COMPLETE_DIRECTION               = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete     ];
+    out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   = new SC_OUT(Tcontrol_t)     * [_param._nb_branch_complete     ];
+      }
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, EAST
+								, "Interface branch complete"
+#endif
+								);
+
+	if (_param._have_meta_predictor)
+	  {
+	 in_BRANCH_COMPLETE_VAL                      [i] = interface->set_signal_in  <Tcontrol_t>     ("val"            , 1);
+	out_BRANCH_COMPLETE_PREDICTOR_2_VAL          [i] = interface->set_signal_out <Tcontrol_t>     ("predictor_2_val", 1);
+	 in_BRANCH_COMPLETE_PREDICTOR_0_ACK          [i] = interface->set_signal_in  <Tcontrol_t>     ("predictor_0_ack", 1);
+	 in_BRANCH_COMPLETE_PREDICTOR_1_ACK          [i] = interface->set_signal_in  <Tcontrol_t>     ("predictor_1_ack", 1);
+	  }
+	 in_BRANCH_COMPLETE_PREDICTOR_2_ACK          [i] = interface->set_signal_in  <Tcontrol_t>     ("predictor_2_ack" , 1);
+	out_BRANCH_COMPLETE_ACK                      [i] = interface->set_signal_out <Tcontrol_t>     ("ack"             , 1);
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_bht)
+	out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY  [i] = interface->set_signal_out <Tbht_history_t> ("predictor_0_bht_history" , _param._predictor_0_bht_size_shifter );
+	if (_param._predictor_0_have_pht)
+	out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY  [i] = interface->set_signal_out <Tpht_history_t> ("predictor_0_pht_history" , _param._predictor_0_pht_size_counter);
+	if (_param._predictor_1_have_bht)
+	out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY  [i] = interface->set_signal_out <Tbht_history_t> ("predictor_1_bht_history" , _param._predictor_1_bht_size_shifter );
+	if (_param._predictor_1_have_pht)
+	out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY  [i] = interface->set_signal_out <Tpht_history_t> ("predictor_1_pht_history" , _param._predictor_1_pht_size_counter );
+	  }
+	if (_param._predictor_2_have_bht)
+	out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY  [i] = interface->set_signal_out <Tbht_history_t> ("predictor_2_bht_history" , _param._predictor_2_bht_size_shifter);
+	if (_param._predictor_2_have_pht)
+	out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY  [i] = interface->set_signal_out <Tpht_history_t> ("predictor_2_pht_history" , _param._predictor_2_pht_size_counter);
+	 in_BRANCH_COMPLETE_HISTORY                  [i] = interface->set_signal_in  <Thistory_t>     ("history"                 , _param._size_history);
+	if (_param._have_meta_predictor)
+	  {
+	 in_BRANCH_COMPLETE_DIRECTION                [i] = interface->set_signal_in  <Tcontrol_t>     ("direction"             , 1);
+	out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION    [i] = interface->set_signal_out <Tcontrol_t>     ("predictor_2_direction" , 1);
+	  }
+      }
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+#ifdef POSITION
+    _component->generate_file();
+#endif
+
+    log_printf(FUNC,Meta_Predictor_Glue,"allocation","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_deallocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_deallocation.cpp	(revision 105)
@@ -0,0 +1,104 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::deallocation (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"deallocation","Begin");
+
+    delete     in_CLOCK;
+    delete     in_NRESET;
+
+    if (_param._have_meta_predictor)
+    {
+    delete []   in_PREDICT_PREDICTOR_0_ACK;
+    delete []   in_PREDICT_PREDICTOR_1_ACK;
+    }			           
+    delete []   in_PREDICT_PREDICTOR_2_ACK;
+    delete []  out_PREDICT_ACK            ;
+    if (_param._have_meta_predictor)
+    {
+    if (_param._predictor_0_have_bht)
+    delete []   in_PREDICT_PREDICTOR_0_BHT_HISTORY;
+    if (_param._predictor_0_have_pht)
+    delete []   in_PREDICT_PREDICTOR_0_PHT_HISTORY;
+    if (_param._predictor_1_have_bht)
+    delete []   in_PREDICT_PREDICTOR_1_BHT_HISTORY;
+    if (_param._predictor_1_have_pht)
+    delete []   in_PREDICT_PREDICTOR_1_PHT_HISTORY ;
+    }
+    if (_param._predictor_2_have_bht)
+    delete []   in_PREDICT_PREDICTOR_2_BHT_HISTORY ;
+    if (_param._predictor_2_have_pht)
+    delete []   in_PREDICT_PREDICTOR_2_PHT_HISTORY ;
+    delete []  out_PREDICT_HISTORY                 ;
+    delete []  out_PREDICT_DIRECTION               ;
+
+    if (_param._have_meta_predictor)
+    {
+    delete []   in_BRANCH_COMPLETE_VAL                     ;
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_VAL         ;
+
+    delete []   in_BRANCH_COMPLETE_PREDICTOR_0_ACK         ;
+    delete []   in_BRANCH_COMPLETE_PREDICTOR_1_ACK         ;
+    }			           
+    delete []   in_BRANCH_COMPLETE_PREDICTOR_2_ACK         ;
+    delete []  out_BRANCH_COMPLETE_ACK                     ;
+    if (_param._have_meta_predictor)
+    {
+    if (_param._predictor_0_have_bht)
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY ;
+    if (_param._predictor_0_have_pht)
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY ;
+    if (_param._predictor_1_have_bht)
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY ;
+    if (_param._predictor_1_have_pht)
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY ;
+    }
+    if (_param._predictor_2_have_bht)
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY ;
+    if (_param._predictor_2_have_pht)
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY ;
+    delete []   in_BRANCH_COMPLETE_HISTORY                 ;
+    if (_param._have_meta_predictor)
+      {
+    delete []   in_BRANCH_COMPLETE_DIRECTION               ;
+    delete []  out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION   ;
+      }
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    delete _component;
+
+    log_printf(FUNC,Meta_Predictor_Glue,"deallocation","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_ack.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_ack.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_ack.cpp	(revision 105)
@@ -0,0 +1,49 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+  void Meta_Predictor_Glue::genMealy_branch_complete_ack (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_ack","Begin");
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Tcontrol_t predictor_0_ack =  not _param._have_meta_predictor or PORT_READ(in_BRANCH_COMPLETE_PREDICTOR_0_ACK [i]);
+	Tcontrol_t predictor_1_ack =  not _param._have_meta_predictor or PORT_READ(in_BRANCH_COMPLETE_PREDICTOR_1_ACK [i]);
+	Tcontrol_t predictor_2_ack =                                     PORT_READ(in_BRANCH_COMPLETE_PREDICTOR_2_ACK [i]);
+
+	PORT_WRITE(out_BRANCH_COMPLETE_ACK [i], predictor_0_ack and predictor_1_ack and predictor_2_ack);
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_ack","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_history.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_history.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_history.cpp	(revision 105)
@@ -0,0 +1,64 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+#include "Common/include/BitManipulation.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+  void Meta_Predictor_Glue::genMealy_branch_complete_history (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_history","Begin");
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Thistory_t     history = PORT_READ(in_BRANCH_COMPLETE_HISTORY [i]);
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_bht) 
+	PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY [i], (history >> _param._shift_0) & gen_mask<Tbht_history_t>(_param._predictor_0_bht_size_shifter));
+	if (_param._predictor_0_have_pht)
+	PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY [i], (history >> _param._shift_1) & gen_mask<Tpht_history_t>(_param._predictor_0_pht_size_counter));
+	  }
+
+	if (_param._predictor_1_have_bht)
+	PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY [i], (history >> _param._shift_2) & gen_mask<Tbht_history_t>(_param._predictor_1_bht_size_shifter));
+	if (_param._predictor_1_have_pht)
+	PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY [i], (history >> _param._shift_3) & gen_mask<Tpht_history_t>(_param._predictor_1_pht_size_counter));
+
+	if (_param._predictor_2_have_bht)
+	PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY [i], (history >> _param._shift_4) & gen_mask<Tbht_history_t>(_param._predictor_2_bht_size_shifter));
+	if (_param._predictor_2_have_pht)
+	PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY [i], (history >> _param._shift_5) & gen_mask<Tpht_history_t>(_param._predictor_2_pht_size_counter));
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_history","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_val.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_val.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_branch_complete_val.cpp	(revision 105)
@@ -0,0 +1,91 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+  void Meta_Predictor_Glue::genMealy_branch_complete_val (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_val","Begin");
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Tcontrol_t val                   = PORT_READ(in_BRANCH_COMPLETE_VAL             [i]);
+	Thistory_t history               = PORT_READ(in_BRANCH_COMPLETE_HISTORY         [i]);
+	Tcontrol_t direction             = PORT_READ(in_BRANCH_COMPLETE_DIRECTION       [i]);
+
+	Tcontrol_t predictor_0_direction = (history>>(_param._shift_2-1))&1;
+	Tcontrol_t predictor_1_direction = (history>>(_param._shift_4-1))&1;
+// 	Tcontrol_t predictor_2_direction = (history>>(_param._shift_6-1))&1;
+
+// 	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_branch_complete_val","direction_(predictor_0 %d, predictor_1 %d, predictor_2 %d, good %d)", predictor_0_direction, predictor_1_direction, predictor_2_direction, direction);
+	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_branch_complete_val","direction_(predictor_0 %d, predictor_1 %d, good %d)", predictor_0_direction, predictor_1_direction, direction);
+
+	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_branch_complete_val"," *  direction_0 : %d >>(%d-1)",history,_param._shift_2);
+	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_branch_complete_val"," *  direction_1 : %d >>(%d-1)",history,_param._shift_4);
+	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_branch_complete_val"," *  direction_2 : %d >>(%d-1)",history,_param._shift_6);
+
+	/*
+	dir_0 dir_1 dir_2 | good_dir  || next_dir_2
+	------------------+-----------++-----------
+	  0     0     0   |     0     || no change 
+	  1     0     0   |     0     ||         1 select pred_0 but miss
+	  0     1     0   |     0     ||         0 select pred_0 and hit 
+	  1     1     0   |     0     || no change
+	  0     0     1   |     0     || no change
+	  1     0     1   |     0     ||         1 select pred_1 and hit 
+	  0     1     1   |     0     ||         0 select pred_1 but miss
+	  1     1     1   |     0     || no change
+	  0     0     0   |     1     || no change
+	  1     0     0   |     1     ||         0 select pred_0 and hit 
+	  0     1     0   |     1     ||         1 select pred_0 but miss
+	  1     1     0   |     1     || no change
+	  0     0     1   |     1     || no change
+	  1     0     1   |     1     ||         0 select pred_1 but miss
+	  0     1     1   |     1     ||         1 select pred_1 and hit 
+	  1     1     1   |     1     || no change
+
+	next_dir_2 = (good_dir and dir_1) or (not good_dir and dir_0)
+	*/
+
+	Tcontrol_t branch_complete_predictor_2_val       =       val and (predictor_0_direction xor predictor_1_direction);
+	Tcontrol_t branch_complete_predictor_2_direction = ( (not direction and predictor_0_direction) or
+							     (    direction and predictor_1_direction) );
+
+	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_branch_complete_val","branch_complete_predictor_2_( val %d, direction %d)",branch_complete_predictor_2_val, branch_complete_predictor_2_direction);
+
+	// Modify meta_predictor if have a branch_complete and twice prediction have not predict the same way
+									  PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION [i], branch_complete_predictor_2_direction);
+	PORT_WRITE(out_BRANCH_COMPLETE_PREDICTOR_2_VAL       [i], branch_complete_predictor_2_val      );
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_branch_complete_val","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_ack.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_ack.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_ack.cpp	(revision 105)
@@ -0,0 +1,50 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::genMealy_predict_ack (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_predict_ack","Begin");
+    
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Tcontrol_t predictor_0_ack =  not _param._have_meta_predictor or PORT_READ(in_PREDICT_PREDICTOR_0_ACK [i]);
+	Tcontrol_t predictor_1_ack =  not _param._have_meta_predictor or PORT_READ(in_PREDICT_PREDICTOR_1_ACK [i]);
+	Tcontrol_t predictor_2_ack =                                     PORT_READ(in_PREDICT_PREDICTOR_2_ACK [i]);
+
+	PORT_WRITE(out_PREDICT_ACK [i], predictor_0_ack and predictor_1_ack and predictor_2_ack);
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_predict_ack","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_history.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_history.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_history.cpp	(revision 105)
@@ -0,0 +1,111 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::genMealy_predict_history (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_predict_history","Begin");
+    
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Thistory_t     history = 0;
+	Tpht_history_t predictor_0_pht_history  =0, predictor_1_pht_history  =0, predictor_2_pht_history  =0;
+	Tbht_history_t predictor_0_bht_history  =0, predictor_1_bht_history  =0, predictor_2_bht_history  =0;
+	Tcontrol_t     predictor_0_pht_direction=0, predictor_1_pht_direction=0, predictor_2_pht_direction=0;
+	Tcontrol_t     predictor_0_bht_direction=0, predictor_1_bht_direction=0, predictor_2_bht_direction=0;
+	Tcontrol_t     predictor_0_direction,     predictor_1_direction,     predictor_2_direction;
+	Tcontrol_t     predictor_direction;
+
+	if (_param._predictor_2_have_pht)
+	  {
+	predictor_2_pht_history   = PORT_READ(in_PREDICT_PREDICTOR_2_PHT_HISTORY [i]);
+	predictor_2_pht_direction = predictor_2_pht_history >> (_param._predictor_2_pht_size_counter-1);
+	history                  |= (predictor_2_pht_history << _param._shift_5);
+	  }
+	if (_param._predictor_2_have_bht)
+	  {
+	predictor_2_bht_history   = PORT_READ(in_PREDICT_PREDICTOR_2_BHT_HISTORY [i]);
+	predictor_2_bht_direction = predictor_2_bht_history >> (_param._predictor_2_bht_size_shifter-1);
+	history                  |= (predictor_2_bht_history << _param._shift_4);
+	  }
+
+	predictor_2_direction = (_param._predictor_2_have_pht==true)?predictor_2_pht_direction:predictor_2_bht_direction;
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_1_have_pht)
+	  {
+	predictor_1_pht_history   = PORT_READ(in_PREDICT_PREDICTOR_1_PHT_HISTORY [i]);
+	predictor_1_pht_direction = predictor_1_pht_history >> (_param._predictor_1_pht_size_counter-1);
+	history                  |= (predictor_1_pht_history << _param._shift_3);
+	  }
+	if (_param._predictor_1_have_bht)
+	  {
+	predictor_1_bht_history   = PORT_READ(in_PREDICT_PREDICTOR_1_BHT_HISTORY [i]);
+	predictor_1_bht_direction = predictor_1_bht_history >> (_param._predictor_1_bht_size_shifter-1);
+	history                  |= (predictor_1_bht_history << _param._shift_2) ;
+	  }
+	if (_param._predictor_0_have_pht)
+	  {
+	predictor_0_pht_history   = PORT_READ(in_PREDICT_PREDICTOR_0_PHT_HISTORY [i]);
+	predictor_0_pht_direction = predictor_0_pht_history >> (_param._predictor_0_pht_size_counter-1);
+	history                  |= (predictor_0_pht_history << _param._shift_1);
+	  }
+	if (_param._predictor_0_have_bht)
+	  {
+	predictor_0_bht_history   = PORT_READ(in_PREDICT_PREDICTOR_0_BHT_HISTORY [i]);
+	predictor_0_bht_direction = predictor_0_bht_history >> (_param._predictor_0_bht_size_shifter-1);
+	history                  |= (predictor_0_bht_history << _param._shift_0);
+	  }
+
+	predictor_0_direction = (_param._predictor_0_have_pht==true)?predictor_0_pht_direction:predictor_0_bht_direction;
+	predictor_1_direction = (_param._predictor_1_have_pht==true)?predictor_1_pht_direction:predictor_1_bht_direction;
+
+	// Meta predictor : take direction of prediction_2 and select the good predictor.
+	predictor_direction   = (predictor_2_direction==0)?predictor_0_direction:predictor_1_direction;
+	
+	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_predict_history","predict_direction = %d - predictor(_0 %d, _1 %d, _2 %d)",predictor_direction,predictor_0_direction,predictor_1_direction,predictor_2_direction);
+	  }
+	else
+	  {
+	predictor_direction   =  predictor_2_direction;
+	log_printf(TRACE,Meta_Predictor_Glue,"genMealy_predict_history","predict_direction = %d - predictor_2 %d",predictor_direction,predictor_2_direction);
+	  }
+
+	PORT_WRITE(out_PREDICT_DIRECTION [i], predictor_direction);
+	PORT_WRITE(out_PREDICT_HISTORY   [i], history            );
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"genMealy_predict_history","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_statistics.cpp	(revision 105)
@@ -0,0 +1,46 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  string Meta_Predictor_Glue::statistics (uint32_t depth)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"statistics","Begin");
+
+    string txt = _stat->print(depth);
+    
+    log_printf(FUNC,Meta_Predictor_Glue,"statistics","End");
+
+    return txt;
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_transition.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef SYSTEMC
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::transition (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"transition","Begin");
+
+#ifdef STATISTICS
+    _stat->add();
+#endif    
+
+#ifdef VHDL_TESTBENCH
+    vhdl_testbench_transition ();
+#endif
+
+    log_printf(FUNC,Meta_Predictor_Glue,"transition","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl.cpp	(revision 105)
@@ -0,0 +1,54 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::vhdl (void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl","Begin");
+
+    Vhdl * vhdl = new Vhdl (_name);
+
+    _interfaces->set_port     (vhdl);
+    _component ->vhdl_instance(vhdl);
+
+    vhdl_declaration (vhdl);
+    vhdl_body        (vhdl);
+
+    vhdl->generate_file();
+
+    delete vhdl;
+
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_body.cpp	(revision 105)
@@ -0,0 +1,153 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::vhdl_body (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_body","Begin");
+    vhdl->set_body ("");
+    vhdl->set_body (" -- predict");
+    
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	string meta_predictor_ack =  (_param._have_meta_predictor==true)?("in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK and in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK"):"'1'";
+
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_ACK         <= "+meta_predictor_ack+" and "+"in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK;");
+
+	uint32_t index=_param._size_history;
+
+
+	if (_param._predictor_2_have_pht)
+	  {
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_pht_size_counter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY;");
+	index-= _param._predictor_2_pht_size_counter;
+	  }
+	if (_param._predictor_2_have_bht)
+	  {
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_bht_size_shifter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY;");
+	index-= _param._predictor_2_bht_size_shifter;
+	  }
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_1_have_pht)
+	  {
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_pht_size_counter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY;");
+	index-= _param._predictor_1_pht_size_counter;
+	  }
+	if (_param._predictor_1_have_bht)
+	  {
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_bht_size_shifter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY;");
+	index-= _param._predictor_1_bht_size_shifter;
+	  }
+
+ 	if (_param._predictor_0_have_pht)
+	  {
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_pht_size_counter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY;");
+	index-= _param._predictor_0_pht_size_counter;
+	  }
+	if (_param._predictor_0_have_bht)
+	  {
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_bht_size_shifter)+" <= in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY;");
+	index-= _param._predictor_0_bht_size_shifter;
+	  }
+	  }
+
+	// direction of prediction
+	vhdl->set_body ("");
+	if (_param._have_meta_predictor)
+	  vhdl->set_body ("out_PREDICT_"+toString(i)+"_DIRECTION   <= predict_"+toString(i)+"_predictor_0_direction when predict_"+toString(i)+"_predictor_2_direction='0' else predict_"+toString(i)+"_predictor_1_direction;");
+	else
+	  vhdl->set_body ("out_PREDICT_"+toString(i)+"_DIRECTION   <= predict_"+toString(i)+"_predictor_2_direction;");
+      }
+
+    // Interface - branch_complete
+
+    vhdl->set_body ("");
+    vhdl->set_body (" -- branch_complete");
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	// branch_complete_predictor_2 val and directionn
+	if (_param._have_meta_predictor)
+	  {
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL       <= (branch_complete_"+toString(i)+"_predictor_0_direction xor branch_complete_"+toString(i)+"_predictor_1_direction) and "+"in_BRANCH_COMPLETE_"+toString(i)+"_VAL;");
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION <= (branch_complete_"+toString(i)+"_predictor_0_direction and not in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION) or (branch_complete_"+toString(i)+"_predictor_1_direction and in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION);");
+	  }
+
+	string meta_predictor_ack =  (_param._have_meta_predictor==true)?("in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK and in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK"):"'1'";
+
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_ACK                   <= "+meta_predictor_ack+" and "+"in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK;");
+
+	uint32_t index=_param._size_history;
+
+	if (_param._predictor_2_have_pht)
+	  {
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_pht_size_counter)+";");
+	index-= _param._predictor_2_pht_size_counter;
+	  }
+	if (_param._predictor_2_have_bht)
+	  {
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_2_bht_size_shifter)+";");
+	index-= _param._predictor_2_bht_size_shifter;
+	  }
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_1_have_pht)
+	  {
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_pht_size_counter)+";");
+	index-= _param._predictor_1_pht_size_counter;
+	  }
+	if (_param._predictor_1_have_bht)
+	  {
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_1_bht_size_shifter)+";");
+	index-= _param._predictor_1_bht_size_shifter;
+	  }
+
+	if (_param._predictor_0_have_pht)
+	  {
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_pht_size_counter)+";");
+	index-= _param._predictor_0_pht_size_counter;
+	  }
+	if (_param._predictor_0_have_bht)
+	  {
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY <= in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"+std_logic_range(index-1,index-_param._predictor_0_bht_size_shifter)+";");
+	index-= _param._predictor_0_bht_size_shifter;
+	  }
+	  }
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_body","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_declaration.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_declaration.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_declaration.cpp	(revision 105)
@@ -0,0 +1,84 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::vhdl_declaration (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_declaration","Begin");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_pht)
+	  vhdl->set_alias ("predict_"+toString(i)+"_predictor_0_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY",std_logic_range(_param._predictor_0_pht_size_counter-1,_param._predictor_0_pht_size_counter-1));
+	else
+	  vhdl->set_alias ("predict_"+toString(i)+"_predictor_0_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY",std_logic_range(_param._predictor_0_bht_size_shifter-1,_param._predictor_0_bht_size_shifter-1));
+	if (_param._predictor_1_have_pht)
+	  vhdl->set_alias ("predict_"+toString(i)+"_predictor_1_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY",std_logic_range(_param._predictor_1_pht_size_counter-1,_param._predictor_1_pht_size_counter-1));
+	else
+	  vhdl->set_alias ("predict_"+toString(i)+"_predictor_1_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY",std_logic_range(_param._predictor_1_bht_size_shifter-1,_param._predictor_1_bht_size_shifter-1));
+	  }
+
+	if (_param._predictor_2_have_pht)
+	  vhdl->set_alias ("predict_"+toString(i)+"_predictor_2_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY",std_logic_range(_param._predictor_2_pht_size_counter-1,_param._predictor_2_pht_size_counter-1));
+	else
+	  vhdl->set_alias ("predict_"+toString(i)+"_predictor_2_direction",std_logic(1), "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY",std_logic_range(_param._predictor_2_bht_size_shifter-1,_param._predictor_2_bht_size_shifter-1));
+      }
+
+    if (_param._have_meta_predictor)
+      {
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+// 	if (_param._predictor_2_have_pht)
+// 	vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_2_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_6-1, _param._shift_6-1));
+// 	else
+// 	vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_2_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_5-1, _param._shift_5-1));
+
+	if (_param._predictor_1_have_pht)
+	vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_1_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_4-1, _param._shift_4-1));
+	else
+	vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_1_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_3-1, _param._shift_3-1));
+
+	if (_param._predictor_0_have_pht)
+	vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_0_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_2-1, _param._shift_2-1));
+	else
+	vhdl->set_alias ("branch_complete_"+toString(i)+"_predictor_0_direction",std_logic(1)," in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY",std_logic_range(_param._shift_1-1, _param._shift_1-1));
+
+      }
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_declaration","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_port.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_port.cpp	(revision 105)
@@ -0,0 +1,100 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace stage_1_ifetch {
+namespace predictor {
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::vhdl_port (Vhdl & vhdl)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_port","Begin");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._have_meta_predictor)
+	  {
+	vhdl.set_port (" in_PREDICT_PREDICTOR_0_ACK_"+toString(i)+"                ", IN, 1);
+	vhdl.set_port (" in_PREDICT_PREDICTOR_1_ACK_"+toString(i)+"                ", IN, 1);
+	  }
+	vhdl.set_port (" in_PREDICT_PREDICTOR_2_ACK_"+toString(i)+"                ", IN, 1);
+	vhdl.set_port ("out_PREDICT_ACK_"+toString(i)+"                            ",OUT, 1);
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_bht)
+	vhdl.set_port (" in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_0_bht_size_shifter);
+	if (_param._predictor_0_have_pht)
+	vhdl.set_port (" in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_0_pht_size_counter);
+	if (_param._predictor_1_have_bht)
+	vhdl.set_port (" in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_1_bht_size_shifter);
+	if (_param._predictor_1_have_pht)
+	vhdl.set_port (" in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_1_pht_size_counter);
+	  }
+	if (_param._predictor_2_have_bht)
+	vhdl.set_port (" in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_2_bht_size_shifter);
+	if (_param._predictor_2_have_pht)
+	vhdl.set_port (" in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_2_pht_size_counter);
+
+	vhdl.set_port ("out_PREDICT_HISTORY_"+toString(i)+"                        ",OUT,_param._size_history);
+	vhdl.set_port ("out_PREDICT_DIRECTION_"+toString(i)+"                      ",OUT,1);
+      }
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	if (_param._have_meta_predictor)
+	  {
+	vhdl.set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"                    ", IN, 1);
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i)+"        ",OUT, 1);
+
+	vhdl.set_port (" in_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i)+"        ", IN, 1);
+	vhdl.set_port (" in_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i)+"        ", IN, 1);
+	  }
+	vhdl.set_port (" in_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i)+"        ", IN, 1);
+	vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"                    ",OUT, 1);
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_bht)
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_0_bht_size_shifter);
+	if (_param._predictor_0_have_pht)
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_0_pht_size_counter);
+	if (_param._predictor_1_have_bht)
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_1_bht_size_shifter);
+	if (_param._predictor_1_have_pht)
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_1_pht_size_counter);
+	  }
+	if (_param._predictor_2_have_bht)
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_2_bht_size_shifter);
+	if (_param._predictor_2_have_pht)
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_2_pht_size_counter);
+
+	vhdl.set_port (" in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"                ", IN,_param._size_history);
+	if (_param._have_meta_predictor)
+	  {
+	vhdl.set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"              ", IN,1);
+	vhdl.set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i)+"  ",OUT,1);
+	  }
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_port","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+}; // end namespace predictor
+}; // end namespace stage_1_ifetch
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_label.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_label.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_label.cpp	(revision 105)
@@ -0,0 +1,35 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace stage_1_ifetch {
+namespace predictor {
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::vhdl_testbench_label (string label)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_label","Begin");
+
+#ifdef VHDL_TESTBENCH
+    _vhdl_testbench->add_label(label);
+#endif
+    
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_label","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+}; // end namespace predictor
+}; // end namespace stage_1_ifetch
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_port.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_port.cpp	(revision 105)
@@ -0,0 +1,100 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace stage_1_ifetch {
+namespace predictor {
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::vhdl_testbench_port ()
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_port","Begin");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._have_meta_predictor)
+	  {
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_0_ACK_"+toString(i)+"                ", IN, 1);
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_1_ACK_"+toString(i)+"                ", IN, 1);
+	  }
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_2_ACK_"+toString(i)+"                ", IN, 1);
+	_vhdl_testbench->set_port ("out_PREDICT_ACK_"+toString(i)+"                            ",OUT, 1);
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_bht)
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_0_bht_size_shifter);
+	if (_param._predictor_0_have_pht)
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_0_pht_size_counter);
+	if (_param._predictor_1_have_bht)
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_1_bht_size_shifter);
+	if (_param._predictor_1_have_pht)
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_1_pht_size_counter);
+	  }
+	if (_param._predictor_2_have_bht)
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_2_bht_size_shifter);
+	if (_param._predictor_2_have_pht)
+	_vhdl_testbench->set_port (" in_PREDICT_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"        ", IN,_param._predictor_2_pht_size_counter);
+
+	_vhdl_testbench->set_port ("out_PREDICT_HISTORY_"+toString(i)+"                        ",OUT,_param._size_history);
+	_vhdl_testbench->set_port ("out_PREDICT_DIRECTION_"+toString(i)+"                      ",OUT,1);
+      }
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	if (_param._have_meta_predictor)
+	  {
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"                    ", IN, 1);
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_VAL_"+toString(i)+"        ",OUT, 1);
+
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_PREDICTOR_0_ACK_"+toString(i)+"        ", IN, 1);
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_PREDICTOR_1_ACK_"+toString(i)+"        ", IN, 1);
+	  }
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_PREDICTOR_2_ACK_"+toString(i)+"        ", IN, 1);
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"                    ",OUT, 1);
+
+	if (_param._have_meta_predictor)
+	  {
+	if (_param._predictor_0_have_bht)
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_0_bht_size_shifter);
+	if (_param._predictor_0_have_pht)
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_0_pht_size_counter);
+	if (_param._predictor_1_have_bht)
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_1_bht_size_shifter);
+	if (_param._predictor_1_have_pht)
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_1_pht_size_counter);
+	  }
+	if (_param._predictor_2_have_bht)
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_2_bht_size_shifter);
+	if (_param._predictor_2_have_pht)
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY_"+toString(i)+"",OUT,_param._predictor_2_pht_size_counter);
+
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"                ", IN,_param._size_history);
+	if (_param._have_meta_predictor)
+	  {
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"              ", IN,1);
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION_"+toString(i)+"  ",OUT,1);
+	  }
+      }
+
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_port","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+}; // end namespace predictor
+}; // end namespace stage_1_ifetch
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Meta_Predictor_Glue_vhdl_testbench_transition.cpp	(revision 105)
@@ -0,0 +1,45 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Meta_Predictor_Glue::vhdl_testbench_transition ()
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_transition","Begin");
+
+//  sc_start(0);
+    _interfaces->testbench();
+
+    log_printf(FUNC,Meta_Predictor_Glue,"vhdl_testbench_transition","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters.cpp	(revision 105)
@@ -0,0 +1,128 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  Parameters::Parameters (bool     have_meta_predictor               ,
+			  bool     predictor_0_have_bht              ,
+			  uint32_t predictor_0_bht_size_shifter      ,
+			  bool     predictor_0_have_pht              ,
+			  uint32_t predictor_0_pht_size_counter      ,
+			  bool     predictor_1_have_bht              ,
+			  uint32_t predictor_1_bht_size_shifter      ,
+			  bool     predictor_1_have_pht              ,
+			  uint32_t predictor_1_pht_size_counter      ,
+			  bool     predictor_2_have_bht              ,
+			  uint32_t predictor_2_bht_size_shifter      ,
+			  bool     predictor_2_have_pht              ,
+			  uint32_t predictor_2_pht_size_counter      ,
+			  uint32_t nb_prediction                     ,
+			  uint32_t nb_branch_complete                ) :
+    _have_meta_predictor                (have_meta_predictor               ),
+    
+    _predictor_0_have_bht               ((have_meta_predictor==false)?false:predictor_0_have_bht              ),
+    _predictor_0_bht_size_shifter       ((_predictor_0_have_bht==false)?0:predictor_0_bht_size_shifter      ),
+    _predictor_0_have_pht               ((have_meta_predictor==false)?false:predictor_0_have_pht              ),
+    _predictor_0_pht_size_counter       ((_predictor_0_have_pht==false)?0:predictor_0_pht_size_counter      ),
+
+    _predictor_1_have_bht               ((have_meta_predictor==false)?false:predictor_1_have_bht              ),
+    _predictor_1_bht_size_shifter       ((_predictor_1_have_bht==false)?0:predictor_1_bht_size_shifter      ),
+    _predictor_1_have_pht               ((have_meta_predictor==false)?false:predictor_1_have_pht              ),
+    _predictor_1_pht_size_counter       ((_predictor_1_have_pht==false)?0:predictor_1_pht_size_counter      ),
+
+    _predictor_2_have_bht               (predictor_2_have_bht              ),
+    _predictor_2_bht_size_shifter       ((_predictor_2_have_bht==false)?0:predictor_2_bht_size_shifter      ),
+    _predictor_2_have_pht               (predictor_2_have_pht              ),
+    _predictor_2_pht_size_counter       ((_predictor_2_have_pht==false)?0:predictor_2_pht_size_counter      ),
+
+    _nb_prediction                      (nb_prediction                     ),
+    _nb_branch_complete                 (nb_branch_complete                ),
+
+    _size_history                       (_predictor_0_bht_size_shifter + _predictor_0_pht_size_counter +
+					 _predictor_1_bht_size_shifter + _predictor_1_pht_size_counter +
+					 _predictor_2_bht_size_shifter + _predictor_2_pht_size_counter ),
+
+    _shift_0                            (0),
+    _shift_1                            (_shift_0 + _predictor_0_bht_size_shifter),
+    _shift_2                            (_shift_1 + _predictor_0_pht_size_counter),
+    _shift_3                            (_shift_2 + _predictor_1_bht_size_shifter),
+    _shift_4                            (_shift_3 + _predictor_1_pht_size_counter),
+    _shift_5                            (_shift_4 + _predictor_2_bht_size_shifter),
+    _shift_6                            (_shift_5 + _predictor_2_pht_size_counter)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"Parameters","Begin");
+    test();
+    log_printf(FUNC,Meta_Predictor_Glue,"Parameters","End");
+  };
+  
+  Parameters::Parameters (Parameters & param):
+    _have_meta_predictor                (param._have_meta_predictor                ),
+
+    _predictor_0_have_bht               (param._predictor_0_have_bht               ),
+    _predictor_0_bht_size_shifter       (param._predictor_0_bht_size_shifter       ),
+    _predictor_0_have_pht               (param._predictor_0_have_pht               ),
+    _predictor_0_pht_size_counter       (param._predictor_0_pht_size_counter       ),
+
+    _predictor_1_have_bht               (param._predictor_1_have_bht               ),
+    _predictor_1_bht_size_shifter       (param._predictor_1_bht_size_shifter       ),
+    _predictor_1_have_pht               (param._predictor_1_have_pht               ),
+    _predictor_1_pht_size_counter       (param._predictor_1_pht_size_counter       ),
+
+    _predictor_2_have_bht               (param._predictor_2_have_bht               ),
+    _predictor_2_bht_size_shifter       (param._predictor_2_bht_size_shifter       ),
+    _predictor_2_have_pht               (param._predictor_2_have_pht               ),
+    _predictor_2_pht_size_counter       (param._predictor_2_pht_size_counter       ),
+
+    _nb_prediction                      (param._nb_prediction                      ),
+    _nb_branch_complete                 (param._nb_branch_complete                 ),
+
+    _size_history                       (param._size_history                       ),
+
+    _shift_0                            (param._shift_0                            ),
+    _shift_1                            (param._shift_1                            ),
+    _shift_2                            (param._shift_2                            ),
+    _shift_3                            (param._shift_3                            ),
+    _shift_4                            (param._shift_4                            ),
+    _shift_5                            (param._shift_5                            ),
+    _shift_6                            (param._shift_6                            )
+
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"Parameters","Begin");
+    test();
+    log_printf(FUNC,Meta_Predictor_Glue,"Parameters","End");
+  };
+
+  Parameters::~Parameters () 
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"~Parameters","Begin");
+    log_printf(FUNC,Meta_Predictor_Glue,"~Parameters","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters_msg_error.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters_msg_error.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters_msg_error.cpp	(revision 105)
@@ -0,0 +1,60 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Types.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  string Parameters::msg_error(void)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"msg_error","Begin");
+
+    string msg = "";
+
+    // note : size_shifter and size_counter is set at 0 if not need
+    if ((8*sizeof(Thistory_t)) < _size_history)
+      {
+        msg += "  - type \"Thistory_t\" is too little to the total size of history (shifter's size and counter's size)\n";
+        msg +=  "    * predictor_0_bht_size_shifter    : " + toString(_predictor_0_bht_size_shifter) + "\n";
+        msg +=  "    * predictor_0_pht_size_counter    : " + toString(_predictor_0_pht_size_counter) + "\n";
+        msg +=  "    * predictor_1_bht_size_shifter    : " + toString(_predictor_1_bht_size_shifter) + "\n";
+        msg +=  "    * predictor_1_pht_size_counter    : " + toString(_predictor_1_pht_size_counter) + "\n";
+        msg +=  "    * predictor_2_bht_size_shifter    : " + toString(_predictor_2_bht_size_shifter) + "\n";
+        msg +=  "    * predictor_2_pht_size_counter    : " + toString(_predictor_2_pht_size_counter) + "\n";
+	msg +=  "    * Thistory_t                (bits): " + toString(8*(sizeof(Thistory_t))) + "\n";
+      }
+
+    return msg;
+
+    log_printf(FUNC,Meta_Predictor_Glue,"msg_error","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Parameters_print.cpp	(revision 105)
@@ -0,0 +1,108 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
+#include "Behavioural/include/XML.h"
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  string Parameters::print (uint32_t depth)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"print","Begin");
+
+    XML xml ("meta_predictor_glue");
+
+    xml.balise_open("meta_predictor_glue");
+
+    xml.  singleton_begin("have_meta_predictor               ");               
+    xml.    attribut("value",toString(_have_meta_predictor               ));
+    xml.  singleton_end();
+
+    xml.  singleton_begin("predictor_0_have_bht              ");        	
+    xml.    attribut("value",toString(_predictor_0_have_bht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_bht_size_shifter      ");	
+    xml.    attribut("value",toString(_predictor_0_bht_size_shifter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_have_pht              ");              
+    xml.    attribut("value",toString(_predictor_0_have_pht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_pht_size_counter      ");      
+    xml.    attribut("value",toString(_predictor_0_pht_size_counter      ));
+    xml.  singleton_end();
+
+    xml.  singleton_begin("predictor_1_have_bht              ");        	
+    xml.    attribut("value",toString(_predictor_1_have_bht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_bht_size_shifter      ");	
+    xml.    attribut("value",toString(_predictor_1_bht_size_shifter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_have_pht              ");              
+    xml.    attribut("value",toString(_predictor_1_have_pht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_pht_size_counter      ");      
+    xml.    attribut("value",toString(_predictor_1_pht_size_counter      ));
+    xml.  singleton_end();
+    
+    xml.  singleton_begin("predictor_2_have_bht              ");        	
+    xml.    attribut("value",toString(_predictor_2_have_bht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_bht_size_shifter      ");	
+    xml.    attribut("value",toString(_predictor_2_bht_size_shifter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_have_pht              ");              
+    xml.    attribut("value",toString(_predictor_2_have_pht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_pht_size_counter      ");      
+    xml.    attribut("value",toString(_predictor_2_pht_size_counter      ));
+    xml.  singleton_end();
+        
+    xml.  singleton_begin("nb_prediction                     ");                     
+    xml.    attribut("value",toString(_nb_prediction                     ));
+    xml.  singleton_end();
+    xml.  singleton_begin("nb_branch_complete                ");                
+    xml.    attribut("value",toString(_nb_branch_complete                ));
+    xml.  singleton_end();
+
+    xml.balise_close();
+
+    log_printf(FUNC,Meta_Predictor_Glue,"print","End");
+    
+    return xml.get_body(depth);
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters & x)
+  {
+    output_stream << x.print(0);
+    
+    return output_stream;
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics.cpp	(revision 105)
@@ -0,0 +1,53 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Statistics.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  Statistics::Statistics (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  ) :
+    morpheo::behavioural::Statistics(name                  ,
+				     parameters_statistics ),
+    _parameters(parameters)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"Statistics","Begin");
+    log_printf(FUNC,Meta_Predictor_Glue,"Statistics","End");
+  };
+  
+  Statistics::~Statistics () 
+  { 
+    log_printf(FUNC,Meta_Predictor_Glue,"~Statistics","Begin");
+    log_printf(FUNC,Meta_Predictor_Glue,"~Statistics","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_add.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_add.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_add.cpp	(revision 105)
@@ -0,0 +1,44 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  void Statistics::add ()
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"add","Begin");
+    log_printf(FUNC,Meta_Predictor_Glue,"add","End");
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_print.cpp	(revision 105)
@@ -0,0 +1,62 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  string Statistics::print (uint32_t depth)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"print","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "<meta_predictor_glue name=\"" << _name << "\" >" << endl
+        << print_body(depth+1) << endl
+	<< tab << "</meta_predictor_glue>" << endl;
+    
+    log_printf(FUNC,Meta_Predictor_Glue,"print","End");
+
+    return msg.str();
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Statistics & x)
+  {
+    output_stream << x.print(0);
+
+    return output_stream;
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_print_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_print_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Meta_Predictor_Glue/src/Statistics_print_body.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace meta_predictor_glue {
+
+
+  string Statistics::print_body (uint32_t depth)
+  {
+    log_printf(FUNC,Meta_Predictor_Glue,"print_body","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "";
+    
+    log_printf(FUNC,Meta_Predictor_Glue,"print_body","End");
+
+    return msg.str();
+  };
+
+}; // end namespace meta_predictor_glue
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/Makefile	(revision 105)
@@ -0,0 +1,29 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_MORPHEO			= ../../../../../../../..
+
+LIBRARY				= $(Meta_Predictor_LIBRARY)
+
+DIR_LIBRARY			= $(Meta_Predictor_DIR_LIBRARY)
+
+#-----[ include ]------------------------------------------
+
+all				:
+				@$(MAKE) all_selftest
+
+library				: Meta_Predictor_library
+
+library_clean			: Meta_Predictor_library_clean
+
+include                         ../Makefile.deps
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Selftest
+include 			$(DIR_MORPHEO)/Behavioural/Makefile.Synthesis
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/config-alpha_21264.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/config-alpha_21264.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/config-alpha_21264.cfg	(revision 105)
@@ -0,0 +1,26 @@
+Meta_Predictor
+1	1	+1	# have_meta_predictor               
+1	1	+1	# predictor_0_have_bht              
+10	10	+1	# predictor_0_bht_size_shifter      
+1024	1024	*2	# predictor_0_bht_nb_shifter
+1	1	+1	# predictor_0_have_pht              
+3	3	+1	# predictor_0_pht_size_counter      
+1024	1024	*2	# predictor_0_pht_nb_counter
+0	0	+1	# predictor_0_pht_size_address_share
+1	1	+1	# predictor_1_have_bht              
+12	12	+1	# predictor_1_bht_size_shifter      
+2  	2  	*2	# predictor_1_bht_nb_shifter
+1	1	+1	# predictor_1_have_pht              
+2	2	+1	# predictor_1_pht_size_counter      
+4096	4096	*2	# predictor_1_pht_nb_counter
+0	0	+1	# predictor_1_pht_size_address_share
+0	0	+1	# predictor_2_have_bht              
+4	4	+1	# predictor_2_bht_size_shifter      
+256	256	*2	# predictor_2_bht_nb_shifter
+1	1	+1	# predictor_2_have_pht              
+2	2	+1	# predictor_2_pht_size_counter      
+4096	4096	*2	# predictor_2_pht_nb_counter
+0	0	+1	# predictor_2_pht_size_address_share
+30	30	*2	# size_address
+1	1	+1	# nb_prediction                     
+1	1	+1	# nb_branch_complete                
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/configuration.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/configuration.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/configuration.cfg	(revision 105)
@@ -0,0 +1,26 @@
+Meta_Predictor
+1	1	+1	# have_meta_predictor               
+1	1	+1	# predictor_0_have_bht              
+10	10	+1	# predictor_0_bht_size_shifter      
+1024	1024	*2	# predictor_0_bht_nb_shifter
+1	1	+1	# predictor_0_have_pht              
+3	3	+1	# predictor_0_pht_size_counter      
+1024	1024	*2	# predictor_0_pht_nb_counter
+0	0	+1	# predictor_0_pht_size_address_share
+1	1	+1	# predictor_1_have_bht              
+12	12	+1	# predictor_1_bht_size_shifter      
+2  	2  	*2	# predictor_1_bht_nb_shifter
+1	1	+1	# predictor_1_have_pht              
+2	2	+1	# predictor_1_pht_size_counter      
+4096	4096	*2	# predictor_1_pht_nb_counter
+0	0	+1	# predictor_1_pht_size_address_share
+0	0	+1	# predictor_2_have_bht              
+4	4	+1	# predictor_2_bht_size_shifter      
+256	256	*2	# predictor_2_bht_nb_shifter
+1	1	+1	# predictor_2_have_pht              
+2	2	+1	# predictor_2_pht_size_counter      
+4096	4096	*2	# predictor_2_pht_nb_counter
+0	0	+1	# predictor_2_pht_size_address_share
+30	30	*2	# size_address
+1	1	+1	# nb_prediction                     
+1	1	+1	# nb_branch_complete                
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/include/test.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/include/test.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/include/test.h	(revision 105)
@@ -0,0 +1,26 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "RegisterFile"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <string>
+#include <iostream>
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor;
+
+void test    (string name,
+	      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters param);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/src/main.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/src/main.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/src/main.cpp	(revision 105)
@@ -0,0 +1,131 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/include/test.h"
+
+#define NB_PARAMS 25
+
+void usage (string exec)
+{
+  cerr << "<Usage> " << exec << " name_instance list_params" << endl
+       << "list_params is :" << endl
+       << " - have_meta_predictor                (bool    )" << endl
+       << " - predictor_0_have_bht               (bool    )" << endl
+       << " - predictor_0_bht_size_shifter       (uint32_t)" << endl
+       << " - predictor_0_bht_nb_shifter         (uint32_t)" << endl
+       << " - predictor_0_have_pht               (bool    )" << endl
+       << " - predictor_0_pht_size_counter       (uint32_t)" << endl
+       << " - predictor_0_pht_nb_counter         (uint32_t)" << endl
+       << " - predictor_0_pht_size_address_share (uint32_t)" << endl
+       << " - predictor_1_have_bht               (bool    )" << endl
+       << " - predictor_1_bht_size_shifter       (uint32_t)" << endl
+       << " - predictor_1_bht_nb_shifter         (uint32_t)" << endl
+       << " - predictor_1_have_pht               (bool    )" << endl
+       << " - predictor_1_pht_size_counter       (uint32_t)" << endl
+       << " - predictor_1_pht_nb_counter         (uint32_t)" << endl
+       << " - predictor_1_pht_size_address_share (uint32_t)" << endl
+       << " - predictor_2_have_bht               (bool    )" << endl
+       << " - predictor_2_bht_size_shifter       (uint32_t)" << endl
+       << " - predictor_2_bht_nb_shifter         (uint32_t)" << endl
+       << " - predictor_2_have_pht               (bool    )" << endl
+       << " - predictor_2_pht_size_counter       (uint32_t)" << endl
+       << " - predictor_2_pht_nb_counter         (uint32_t)" << endl
+       << " - predictor_2_pht_size_address_share (uint32_t)" << endl
+       << " - size_address                       (uint32_t)" << endl
+       << " - nb_prediction                      (uint32_t)" << endl
+       << " - nb_branch_complete                 (uint32_t)" << endl;
+
+  exit (1);
+}
+
+#ifndef SYSTEMC
+int main    (int argc, char * argv[])
+#else
+int sc_main (int argc, char * argv[])
+#endif
+{
+  if (argc != 2+NB_PARAMS)
+    usage (argv[0]);
+
+  const string   name                              = argv[1];
+
+  const bool     have_meta_predictor               = atoi(argv[ 2]);
+
+  const bool     predictor_0_have_bht              = atoi(argv[ 3]);
+  const uint32_t predictor_0_bht_size_shifter      = atoi(argv[ 4]);
+  const uint32_t predictor_0_bht_nb_shifter        = atoi(argv[ 5]);
+  const bool     predictor_0_have_pht              = atoi(argv[ 6]);
+  const uint32_t predictor_0_pht_size_counter      = atoi(argv[ 7]);
+  const uint32_t predictor_0_pht_nb_counter        = atoi(argv[ 8]);
+  const uint32_t predictor_0_pht_size_address_share= atoi(argv[ 9]);
+
+  const bool     predictor_1_have_bht              = atoi(argv[10]);
+  const uint32_t predictor_1_bht_size_shifter      = atoi(argv[11]);
+  const uint32_t predictor_1_bht_nb_shifter        = atoi(argv[12]);
+  const bool     predictor_1_have_pht              = atoi(argv[13]);
+  const uint32_t predictor_1_pht_size_counter      = atoi(argv[14]);
+  const uint32_t predictor_1_pht_nb_counter        = atoi(argv[15]);
+  const uint32_t predictor_1_pht_size_address_share= atoi(argv[16]);
+
+  const bool     predictor_2_have_bht              = atoi(argv[17]);
+  const uint32_t predictor_2_bht_size_shifter      = atoi(argv[18]);
+  const uint32_t predictor_2_bht_nb_shifter        = atoi(argv[19]);
+  const bool     predictor_2_have_pht              = atoi(argv[20]);
+  const uint32_t predictor_2_pht_size_counter      = atoi(argv[21]);
+  const uint32_t predictor_2_pht_nb_counter        = atoi(argv[22]);
+  const uint32_t predictor_2_pht_size_address_share= atoi(argv[23]);
+
+  const uint32_t size_address                      = atoi(argv[24]);
+  const uint32_t nb_prediction                     = atoi(argv[25]);
+  const uint32_t nb_branch_complete                = atoi(argv[26]);
+
+  try 
+    {
+      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters param (have_meta_predictor               ,
+											 predictor_0_have_bht              ,
+											 predictor_0_bht_size_shifter      ,
+											 predictor_0_bht_nb_shifter        ,
+											 predictor_0_have_pht              ,
+											 predictor_0_pht_size_counter      ,
+											 predictor_0_pht_nb_counter        ,
+											 predictor_0_pht_size_address_share,
+											 predictor_1_have_bht              ,
+											 predictor_1_bht_size_shifter      ,
+											 predictor_1_bht_nb_shifter        ,
+											 predictor_1_have_pht              ,
+											 predictor_1_pht_size_counter      ,
+											 predictor_1_pht_nb_counter        ,
+											 predictor_1_pht_size_address_share,
+											 predictor_2_have_bht              ,
+											 predictor_2_bht_size_shifter      ,
+											 predictor_2_bht_nb_shifter        ,
+											 predictor_2_have_pht              ,
+											 predictor_2_pht_size_counter      ,
+											 predictor_2_pht_nb_counter        ,
+											 predictor_2_pht_size_address_share,
+											 size_address                      ,
+											 nb_prediction                     ,
+											 nb_branch_complete                );
+      
+      cout << param.print(1);
+      
+      test (name,param);
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      cout << "<" << name << "> : " <<  error.what ();
+      exit (EXIT_FAILURE);
+    }
+  catch (...)
+    {
+      cerr << "<" << name << "> : This test must generate a error" << endl;
+      exit (EXIT_FAILURE);
+    }
+
+  return (EXIT_SUCCESS);
+}
+
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/src/test.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/SelfTest/src/test.cpp	(revision 105)
@@ -0,0 +1,156 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#define NB_ITERATION 1
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/SelfTest/include/test.h"
+#include "Common/include/Test.h"
+
+void test (string name,
+	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters _param)
+{
+  cout << "<" << name << "> : Simulation SystemC" << endl;
+  
+  Meta_Predictor * _Meta_Predictor = new Meta_Predictor (name.c_str(),
+#ifdef STATISTICS
+							 morpheo::behavioural::Parameters_Statistics(5,50),
+#endif
+							 _param);
+  
+#ifdef SYSTEMC
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  sc_clock                         * CLOCK                      ;
+  sc_signal<Tcontrol_t>            * NRESET                     ;
+
+    // Interface Predict
+  sc_signal<Tcontrol_t>           ** PREDICT_VAL                ;
+  sc_signal<Tcontrol_t>           ** PREDICT_ACK                ;
+  sc_signal<Taddress_t>           ** PREDICT_ADDRESS            ;
+  sc_signal<Thistory_t>           ** PREDICT_HISTORY            ;
+  sc_signal<Tcontrol_t>           ** PREDICT_DIRECTION          ;
+			
+    // Interface Branch_complete
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_VAL        ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_ACK        ;
+  sc_signal<Taddress_t>           ** BRANCH_COMPLETE_ADDRESS    ;
+  sc_signal<Thistory_t>           ** BRANCH_COMPLETE_HISTORY    ;
+  sc_signal<Tcontrol_t>           ** BRANCH_COMPLETE_DIRECTION  ;
+
+  string rename;
+
+  CLOCK                       = new sc_clock ("clock", 1.0, 0.5);
+  NRESET                      = new sc_signal<Tcontrol_t> ("NRESET");
+
+  PREDICT_VAL                 = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+  PREDICT_ACK                 = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+  PREDICT_ADDRESS             = new sc_signal<Taddress_t>     * [_param._nb_prediction     ];
+  PREDICT_HISTORY             = new sc_signal<Thistory_t>     * [_param._nb_prediction     ];
+  PREDICT_DIRECTION           = new sc_signal<Tcontrol_t>     * [_param._nb_prediction     ];
+
+  for (uint32_t i=0; i<_param._nb_prediction; i++)
+    {
+      rename = "PREDICT_VAL_"         +toString(i);
+      PREDICT_VAL                 [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "PREDICT_ACK_"        +toString(i);
+      PREDICT_ACK                 [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "PREDICT_ADDRESS_"     +toString(i);
+      PREDICT_ADDRESS             [i] = new sc_signal<Taddress_t>     (rename.c_str());
+      rename = "PREDICT_HISTORY_"    +toString(i);
+      PREDICT_HISTORY             [i] = new sc_signal<Thistory_t>     (rename.c_str());
+      rename = "PREDICT_DIRECTION_"  +toString(i);
+      PREDICT_DIRECTION           [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+    }
+  
+  BRANCH_COMPLETE_VAL         = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete];
+  BRANCH_COMPLETE_ACK         = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete];
+  BRANCH_COMPLETE_ADDRESS     = new sc_signal<Taddress_t>     * [_param._nb_branch_complete];
+  BRANCH_COMPLETE_HISTORY     = new sc_signal<Thistory_t>     * [_param._nb_branch_complete];
+  BRANCH_COMPLETE_DIRECTION   = new sc_signal<Tcontrol_t>     * [_param._nb_branch_complete];
+  
+  for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+    {
+      rename = "BRANCH_COMPLETE_VAL_"         +toString(i);
+      BRANCH_COMPLETE_VAL         [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "BRANCH_COMPLETE_ACK_"        +toString(i);
+      BRANCH_COMPLETE_ACK         [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "BRANCH_COMPLETE_ADDRESS_"     +toString(i);
+      BRANCH_COMPLETE_ADDRESS     [i] = new sc_signal<Taddress_t>     (rename.c_str());
+      rename = "BRANCH_COMPLETE_HISTORY_"     +toString(i);
+      BRANCH_COMPLETE_HISTORY     [i] = new sc_signal<Thistory_t>     (rename.c_str());
+      rename = "BRANCH_COMPLETE_DIRECTION_"   +toString(i);
+      BRANCH_COMPLETE_DIRECTION   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+    }
+
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  cout << "<" << name << "> Instanciation of _Meta_Predictor" << endl;
+  
+  (*(_Meta_Predictor->in_CLOCK ))        (*(CLOCK ));
+  (*(_Meta_Predictor->in_NRESET))        (*(NRESET));
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	(*(_Meta_Predictor-> in_PREDICT_VAL                 [i]))        (*(PREDICT_VAL                 [i]));
+	(*(_Meta_Predictor->out_PREDICT_ACK                 [i]))        (*(PREDICT_ACK                 [i]));
+	(*(_Meta_Predictor-> in_PREDICT_ADDRESS             [i]))        (*(PREDICT_ADDRESS             [i]));
+	(*(_Meta_Predictor->out_PREDICT_HISTORY             [i]))        (*(PREDICT_HISTORY             [i]));
+	(*(_Meta_Predictor->out_PREDICT_DIRECTION           [i]))        (*(PREDICT_DIRECTION           [i]));
+      }
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	(*(_Meta_Predictor-> in_BRANCH_COMPLETE_VAL         [i]))        (*(BRANCH_COMPLETE_VAL         [i]));
+	(*(_Meta_Predictor->out_BRANCH_COMPLETE_ACK         [i]))        (*(BRANCH_COMPLETE_ACK         [i]));
+	(*(_Meta_Predictor-> in_BRANCH_COMPLETE_ADDRESS     [i]))        (*(BRANCH_COMPLETE_ADDRESS     [i]));
+	(*(_Meta_Predictor-> in_BRANCH_COMPLETE_HISTORY     [i]))        (*(BRANCH_COMPLETE_HISTORY     [i]));
+	(*(_Meta_Predictor-> in_BRANCH_COMPLETE_DIRECTION   [i]))        (*(BRANCH_COMPLETE_DIRECTION   [i]));
+      }
+
+  /********************************************************
+   * Simulation - Begin
+   ********************************************************/
+
+  cout << "<" << name << "> Start Simulation ............" << endl;
+
+  // Initialisation
+  const uint32_t seed = 0;
+//const uint32_t seed = static_cast<uint32_t>(time(NULL));
+
+  srand(seed);
+
+  sc_start(0);
+
+  NRESET->write(0);
+  sc_start(5);
+  NRESET->write(1);
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+
+      sc_start(1);
+    }
+
+  /********************************************************
+   * Simulation - End
+   ********************************************************/
+
+  cout << "Test OK" << endl;
+
+  cout << "<" << name << "> ............ Stop Simulation" << endl;
+
+#endif
+
+  delete _Meta_Predictor;
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile	(revision 105)
@@ -0,0 +1,24 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= .
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ Library ]------------------------------------------
+LIBRARY				= $(DIR_LIB)/libBranch_History_Table.a
+
+
+#-----[ include ]------------------------------------------
+
+all				: $(LIBRARY_NEED)
+				@$(MAKE) all_component
+
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Component
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.defs
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.defs	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.defs	(revision 105)
@@ -0,0 +1,11 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT_MORPHEO		= ../../../../../../../../..
+DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.deps
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.deps	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.deps	(revision 105)
@@ -0,0 +1,47 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+# DIR_MORPHEO must be defined
+
+Branch_History_Table			= yes
+
+ifndef Behavioural
+include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
+endif
+ifndef Shifter
+include 			$(DIR_MORPHEO)/Behavioural/Generic/Shifter/Makefile.deps
+endif
+ifndef RegisterFile_Monolithic
+include 			$(DIR_MORPHEO)/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.deps
+endif
+
+#-----[ Library ]------------------------------------------
+Branch_History_Table_LIBRARY		= 	-lBranch_History_Table	\
+						$(RegisterFile_Monolithic_LIBRARY)	\
+						$(Shifter_LIBRARY)	\
+						$(Behavioural_LIBRARY)	
+
+Branch_History_Table_DIR_LIBRARY	=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/lib	\
+						$(RegisterFile_Monolithic_DIR_LIBRARY)	\
+						$(Shifter_DIR_LIBRARY)		\
+						$(Behavioural_DIR_LIBRARY)
+
+#-----[ Rules ]--------------------------------------------
+
+Branch_History_Table_library		: 
+					@\
+					$(MAKE) Behavioural_library;\
+					$(MAKE) Shifter_library;\
+					$(MAKE) RegisterFile_Monolithic_library;\
+					$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table --makefile=Makefile;
+
+Branch_History_Table_library_clean	: 
+					@\
+					$(MAKE) Behavioural_library_clean;\
+					$(MAKE) Shifter_library_clean;\
+					$(MAKE) RegisterFile_Monolithic_library_clean;\
+					$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table --makefile=Makefile clean;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/Makefile	(revision 105)
@@ -0,0 +1,29 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_MORPHEO			= ../../../../../../../../../..
+
+LIBRARY				= $(Branch_History_Table_LIBRARY)
+
+DIR_LIBRARY			= $(Branch_History_Table_DIR_LIBRARY)
+
+#-----[ include ]------------------------------------------
+
+all				: library
+				@$(MAKE) all_selftest
+
+library				: Branch_History_Table_library
+
+library_clean			: Branch_History_Table_library_clean
+
+include                         ../Makefile.deps
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Selftest
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.Synthesis
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/config0.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/config0.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/config0.cfg	(revision 105)
@@ -0,0 +1,5 @@
+Branch_History_Table
+2	8	*2	# size_shifter      	
+2	64	*4	# nb_shifter        
+1	1	+1	# nb_prediction     
+1	1	+1	# nb_branch_complete
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/config1.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/config1.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/config1.cfg	(revision 105)
@@ -0,0 +1,5 @@
+Branch_History_Table
+2	8	*2	# size_shifter      	
+2	64	*4	# nb_shifter        
+2	2	+1	# nb_prediction     
+2	2	+1	# nb_branch_complete
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h	(revision 105)
@@ -0,0 +1,29 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "RegisterFile"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <string>
+#include <iostream>
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table;
+
+void test   (string name,
+	     morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters param);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/main.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/main.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/main.cpp	(revision 105)
@@ -0,0 +1,47 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test 0
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h"
+
+#define NB_PARAMS 4
+
+void usage (string exec)
+{
+  cerr << "<Usage> " << exec << " name_instance list_params" << endl
+       << "list_params is :" << endl
+       << " - size_shifter       (unsigned int)" << endl
+       << " - nb_shifter         (unsigned int)" << endl
+       << " - nb_prediction      (unsigned int)" << endl
+       << " - nb_branch_complete (unsigned int)" << endl;
+  exit (1);
+}
+
+#ifndef SYSTEMC
+int main    (int argc, char * argv[])
+#else
+int sc_main (int argc, char * argv[])
+#endif
+{
+  if (argc != 2+NB_PARAMS)
+    usage (argv[0]);
+
+  const string   name               = argv[1];
+  const uint32_t size_shifter       = atoi(argv[2]);
+  const uint32_t nb_shifter         = atoi(argv[3]);
+  const uint32_t nb_prediction      = atoi(argv[4]);
+  const uint32_t nb_branch_complete = atoi(argv[5]);
+
+  morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters param (size_shifter       ,
+																       nb_shifter         ,
+																       nb_prediction      ,
+																       nb_branch_complete );
+
+  test (name,param);
+
+  return (EXIT_SUCCESS);
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/test.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/src/test.cpp	(revision 105)
@@ -0,0 +1,190 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#define NB_ITERATION 1024
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/SelfTest/include/test.h"
+#include "Common/include/BitManipulation.h"
+#include "Common/include/Test.h"
+
+void test (string name,
+	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters param)
+{
+  cout << "<" << name << "> : Simulation SystemC" << endl;
+
+  try 
+    {
+      cout << param.print(1);
+      param.test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      cout << "<" << name << "> : " <<  error.what ();
+      return;
+    }
+  catch (...)
+    {
+      cerr << "<" << name << "> : This test must generate a error" << endl;
+      exit (EXIT_FAILURE);
+    }
+
+  Branch_History_Table * _Branch_History_Table = new Branch_History_Table (name.c_str(),
+#ifdef STATISTICS
+					     morpheo::behavioural::Parameters_Statistics(5,50),
+#endif
+					     param);
+  
+#ifdef SYSTEMC
+
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  sc_clock                                 CLOCK ("clock", 1.0, 0.5);
+  sc_signal<Tcontrol_t>                    NRESET;
+  sc_signal<Tcontrol_t>                    PREDICT_VAL               [param._nb_prediction];
+  sc_signal<Tcontrol_t>                    PREDICT_ACK               [param._nb_prediction];
+  sc_signal<Taddress_t>                    PREDICT_ADDRESS           [param._nb_prediction];
+  sc_signal<Thistory_t>                    PREDICT_HISTORY           [param._nb_prediction];
+				           			     
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_VAL       [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_ACK       [param._nb_branch_complete];
+  sc_signal<Taddress_t>                    BRANCH_COMPLETE_ADDRESS   [param._nb_branch_complete];
+  sc_signal<Thistory_t>                    BRANCH_COMPLETE_HISTORY   [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_DIRECTION [param._nb_branch_complete];
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  cout << "<" << name << "> Instanciation of _Branch_History_Table" << endl;
+  
+  (*(_Branch_History_Table->in_CLOCK))        (CLOCK);
+  (*(_Branch_History_Table->in_NRESET))       (NRESET);
+
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    {
+      (*(_Branch_History_Table-> in_PREDICT_VAL     [i]))        (PREDICT_VAL     [i]);
+      (*(_Branch_History_Table->out_PREDICT_ACK     [i]))        (PREDICT_ACK     [i]);
+      (*(_Branch_History_Table-> in_PREDICT_ADDRESS [i]))        (PREDICT_ADDRESS [i]);
+      (*(_Branch_History_Table->out_PREDICT_HISTORY [i]))        (PREDICT_HISTORY [i]);
+    }
+
+  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+    {
+      (*(_Branch_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))        (BRANCH_COMPLETE_VAL       [i]);
+      (*(_Branch_History_Table->out_BRANCH_COMPLETE_ACK       [i]))        (BRANCH_COMPLETE_ACK       [i]);
+      (*(_Branch_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))        (BRANCH_COMPLETE_ADDRESS   [i]);
+      (*(_Branch_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))        (BRANCH_COMPLETE_HISTORY   [i]);
+      (*(_Branch_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))        (BRANCH_COMPLETE_DIRECTION [i]);
+    }
+
+  /********************************************************
+   * Simulation - Begin
+   ********************************************************/
+
+  cout << "<" << name << "> Start Simulation ............" << endl;
+  // Initialisation
+  sc_start(0);
+
+  srand(0);
+  //srand(time(NULL));
+
+  
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
+
+  NRESET.write(1);
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    PREDICT_VAL         [i].write(0);
+  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+    BRANCH_COMPLETE_VAL [i].write(0);
+
+  // Initialisation of Register
+  uint32_t   num_port_branch_complete = 0;
+  uint32_t   num_port_predict         = 0;
+  Taddress_t address                  = 0;
+  Thistory_t history                  = 0;
+  Thistory_t mask                     = gen_mask <Thistory_t> (param._size_shifter);
+  Tcontrol_t direction                = 0;
+
+  while (address<param._nb_shifter)
+    {
+      BRANCH_COMPLETE_VAL       [0].write(1);
+      BRANCH_COMPLETE_ADDRESS   [0].write(address);
+      BRANCH_COMPLETE_HISTORY   [0].write(0);
+      BRANCH_COMPLETE_DIRECTION [0].write(0);
+
+      sc_start(1);
+      
+      if (BRANCH_COMPLETE_ACK[0].read()==1)
+	address++;
+    }
+ 
+  BRANCH_COMPLETE_VAL     [0].write(0);
+  sc_start(0);
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      num_port_branch_complete = rand() % param._nb_branch_complete;
+      num_port_predict         = rand() % param._nb_prediction     ;
+      address                  = rand() % param._nb_shifter        ;
+      history                  = rand() % (1<<param._size_shifter) ;
+      direction                = rand() % 2;
+
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} ["+toString(num_port_branch_complete)+"]" << endl
+	   << hex
+	   << " - address     : " << address  << endl
+	   << " - history old : " << history  << endl
+	   << " - direction   : " << direction<< endl;
+
+      BRANCH_COMPLETE_VAL       [num_port_branch_complete].write(1);
+      BRANCH_COMPLETE_ADDRESS   [num_port_branch_complete].write(address);
+      BRANCH_COMPLETE_HISTORY   [num_port_branch_complete].write(history);
+      BRANCH_COMPLETE_DIRECTION [num_port_branch_complete].write(direction);
+
+      // Wait Ack
+      do
+	{
+	  sc_start(1);
+	}
+      while (BRANCH_COMPLETE_ACK[num_port_branch_complete].read()!=1);
+
+      BRANCH_COMPLETE_VAL     [num_port_branch_complete].write(0);
+      PREDICT_VAL             [num_port_predict        ].write(1);
+      PREDICT_ADDRESS         [num_port_predict        ].write(address);
+      
+      history                  = ((history<<1)&mask)|direction;
+      
+      // Wait Ack
+      do
+	{
+	  sc_start(1);
+	}
+      while (PREDICT_ACK        [num_port_predict        ].read()!=1);
+
+      PREDICT_VAL             [num_port_predict        ].write(0);
+
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} ["+toString(num_port_predict)+"]" << endl
+	   << " - history new : " << PREDICT_HISTORY [num_port_predict].read() << endl;
+
+      TEST(Thistory_t,PREDICT_HISTORY [num_port_predict].read(),history);
+
+      cout << dec;
+    }
+
+  /********************************************************
+   * Simulation - End
+   ********************************************************/
+
+  cout << "<" << name << "> ............ Stop Simulation" << endl;
+
+#endif
+
+  delete _Branch_History_Table;
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/Branch_History_Table.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/Branch_History_Table.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/Branch_History_Table.tex	(revision 105)
@@ -0,0 +1,38 @@
+\documentclass[10pt,a4paper,twocolumn]{article}
+
+\def\dirdoc{tex}
+\def\dirschema{eps}
+
+% Package de variables d'environnement : Titre, command etc ...
+\usepackage{../../../../../../../../../../Behavioural/doc/sty/doc-style}
+\usepackage{sty/header}
+
+
+%------------------------------------------------------------------------------
+% Début document
+%------------------------------------------------------------------------------
+
+\pagestyle{empty}
+
+\begin{document}
+
+% Créez une page de titre
+\maketitle
+\thispagestyle{empty}
+
+%Table des matières et des figures
+%\tableofcontents
+%\newpage
+%\listoffigures
+
+%------------------------------------------------------------------------------
+% Ajout du corps du documents
+%------------------------------------------------------------------------------
+
+\input{tex/root}
+
+%------------------------------------------------------------------------------
+% Fin d'ajout du corps du document
+%------------------------------------------------------------------------------
+
+\end{document}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/Makefile	(revision 105)
@@ -0,0 +1,19 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= ..
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ include ]------------------------------------------
+
+all				:
+				$(MAKE) all_documentation
+
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Documentation
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/sty/header.sty
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/sty/header.sty	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/sty/header.sty	(revision 105)
@@ -0,0 +1,12 @@
+\def\review{YYYY/MM/DD}
+%\def\review{\number\day/\number\month/\number\year\xspace}
+
+\title{Branch\_History\_Table}
+ 
+\author{}
+
+\affiliation{}
+
+\email{}
+
+\date{\review}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/01_introduction.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/01_introduction.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/01_introduction.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Introduction}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/02_features.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/02_features.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/02_features.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Features}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/03_description.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/03_description.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/03_description.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Functional Description}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/04_pinout.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/04_pinout.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/04_pinout.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Pin out}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/05_parameters.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/05_parameters.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/05_parameters.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Parameters}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/06_performance.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/06_performance.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/06_performance.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Performance}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/07_details.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/07_details.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/07_details.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Details}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/08_history.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/08_history.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/08_history.tex	(revision 105)
@@ -0,0 +1,10 @@
+\Section{Revision History}
+
+\begin{tabular}{|c|c|c|}
+\hline
+Revision Date & By  & Modifications\\
+\hline
+\hline
+yyyy/mm/dd    & xxx & Initial document \\
+\hline
+\end{tabular}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/root.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/root.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/doc/tex/root.tex	(revision 105)
@@ -0,0 +1,8 @@
+\input{\dirdoc/01_introduction}
+\input{\dirdoc/02_features}
+\input{\dirdoc/03_description}
+\input{\dirdoc/04_pinout}
+\input{\dirdoc/05_parameters}
+\input{\dirdoc/06_performance}
+\input{\dirdoc/07_details}
+\input{\dirdoc/08_history}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h	(revision 105)
@@ -0,0 +1,147 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Branch_History_Table_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Branch_History_Table_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include "Common/include/ToString.h"
+#include "Common/include/Debug.h"
+
+// Internal structure
+#include "Behavioural/Generic/Shifter/include/Shifter.h"
+#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h"
+#ifdef STATISTICS
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
+#endif
+#ifdef VHDL
+#include "Behavioural/include/Vhdl.h"
+#endif
+#include "Behavioural/include/Component.h"
+
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  class Branch_History_Table 
+#if SYSTEMC
+    : public sc_module
+#endif
+  {
+    // -----[ fields ]----------------------------------------------------
+    // Parameters
+  protected : const string     _name;
+
+  protected : const Parameters _param;
+#ifdef STATISTICS
+  protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
+#endif
+#ifdef STATISTICS
+  private   : Statistics                     * _stat;
+#endif
+
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
+
+#ifdef SYSTEMC
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Interface
+  public    : SC_CLOCK                      *  in_CLOCK                  ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET                 ;
+ 
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL            ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK            ;
+  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS        ;
+  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY        ;
+
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL    ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK    ;
+  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS;
+  public    : SC_IN (Thistory_t)           **  in_BRANCH_COMPLETE_HISTORY;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION;
+
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#endif
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  public    : morpheo::behavioural::generic::shifter::Shifter           * component_Shifter     ;
+  public    : morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic * component_RegisterFile;
+
+    // -----[ methods ]---------------------------------------------------
+
+#ifdef SYSTEMC
+    SC_HAS_PROCESS (Branch_History_Table);
+#endif					       
+  public  :          Branch_History_Table              (
+#ifdef SYSTEMC
+							sc_module_name                              name,
+#else					       
+							string                                      name,
+#endif					       
+#ifdef STATISTICS
+							morpheo::behavioural::Parameters_Statistics param_statistics,
+#endif
+							Parameters                                  param );
+					       
+  public  :          Branch_History_Table              (Parameters param );
+  public  :          ~Branch_History_Table             (void);
+					       
+#ifdef SYSTEMC				       
+  private : void     allocation                (void);
+  private : void     deallocation              (void);
+					       
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+  public  : void     transition                (void);
+#endif
+#endif					       
+					       
+#ifdef STATISTICS
+  public  : string   statistics                (uint32_t depth);
+#endif
+#if VHDL				       
+  public  : void     vhdl                      (void);
+  private : void     vhdl_declaration          (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
+#endif					       
+#ifdef VHDL_TESTBENCH			       
+  private : void     vhdl_testbench_transition (void);
+#endif
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h	(revision 105)
@@ -0,0 +1,70 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Parameters_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Parameters_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Parameters.h"
+// Internal structure
+#include "Behavioural/Generic/Shifter/include/Parameters.h"
+#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
+#include <math.h>
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  class Parameters : public morpheo::behavioural::Parameters
+  {
+    //-----[ fields ]------------------------------------------------------------
+  public : const uint32_t _size_shifter      ;
+  public : const uint32_t _nb_shifter        ;
+  public : const uint32_t _nb_prediction     ;
+  public : const uint32_t _nb_branch_complete;
+
+  public :       morpheo::behavioural::generic::shifter::Parameters      * _param_shifter;
+  public :       morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters * _param_registerfile;
+
+    //-----[ methods ]-----------------------------------------------------------
+  public : Parameters  (uint32_t size_shifter      ,
+ 			uint32_t nb_shifter        ,
+			uint32_t nb_prediction     ,
+			uint32_t nb_branch_complete);
+  public : Parameters  (Parameters & param) ;
+  public : ~Parameters () ;
+
+  public : string msg_error (void);
+
+  public :        string   print      (uint32_t depth);
+  public : friend ostream& operator<< (ostream& output_stream,
+				       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters & x);
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h	(revision 105)
@@ -0,0 +1,74 @@
+#ifdef STATISTICS
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Statistics_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Statistics_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Statistics.h"
+#include "Behavioural/include/Parameters_Statistics.h"
+#include "Behavioural/Generic/Shifter/include/Statistics.h"
+#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Statistics.h"
+//#include "Behavioural/Generic/Group/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h"
+
+//using namespace morpheo::behavioural::generic::group;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  class Statistics : public morpheo::behavioural::Statistics
+  {
+    // -----[ fields ]----------------------------------------------------
+  private  : const Parameters                                   _parameters;
+
+    // -----[ methods ]---------------------------------------------------
+  public   : Statistics  (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  );
+//public   : Statistics  (Statistics & stat);
+  public   : ~Statistics () ;
+
+  public   : string   print_body (uint32_t depth);
+  public   : string   print      (uint32_t depth);
+  public   : string   print      (uint32_t depth          ,
+				  string   component_stat );
+  public   : void     add        ();
+
+  public   : friend ostream& operator<< (ostream& output_stream,
+					 const Statistics & x);
+
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h	(revision 105)
@@ -0,0 +1,43 @@
+#ifdef SYSTEMC
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Type_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_branch_history_table_Type_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Types.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+  typedef uint32_t Thistory_t;
+  typedef uint32_t Taddress_t;
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table.cpp	(revision 105)
@@ -0,0 +1,102 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+#ifdef SYSTEMC
+  Branch_History_Table::Branch_History_Table (sc_module_name name,
+#else
+  Branch_History_Table::Branch_History_Table (string name,
+#endif
+#ifdef STATISTICS
+					      morpheo::behavioural::Parameters_Statistics             param_statistics,
+#endif
+					      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters param ):
+					       _name             (name)
+					      ,_param            (param)
+#ifdef STATISTICS
+					      ,_param_statistics (param_statistics)
+#endif
+  {
+
+#ifdef SYSTEMC
+    allocation ();
+#endif
+
+#ifdef STATISTICS
+    // Allocation of statistics
+    _stat = new Statistics (static_cast<string>(_name),
+			    param_statistics          ,
+			    param);
+#endif
+
+#ifdef VHDL
+    // generate the vhdl
+    vhdl();
+#endif
+
+
+#ifdef SYSTEMC
+//     // Constant
+//     for (uint32_t i=0; i<_param._nb_prediction     ; i++)
+//       PORT_WRITE(out_PREDICT_ACK         [i],1);
+//     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+//       PORT_WRITE(out_BRANCH_COMPLETE_ACK [i],1);
+
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+    SC_METHOD (transition);
+    dont_initialize ();
+    sensitive_pos << *(in_CLOCK);
+#endif
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+#endif    
+
+#endif
+  };
+  
+  Branch_History_Table::~Branch_History_Table (void)
+  {
+#ifdef STATISTICS
+
+    _stat->generate_file(statistics(0));
+
+    delete _stat;
+#endif
+
+#ifdef SYSTEMC
+    deallocation ();
+#endif
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_allocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_allocation.cpp	(revision 105)
@@ -0,0 +1,221 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  void Branch_History_Table::allocation (void)
+  {
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Branch_History_Table"
+#ifdef POSITION
+					     ,MIXTE                
+#endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      Interface * interface = _interfaces->set_interface(""
+#ifdef POSITION
+							 , IN  
+							 , SOUTH
+							 , "Generalist interface"
+#endif
+							 );
+      
+      in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
+    }
+
+    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     in_PREDICT_VAL     = new SC_IN (Tcontrol_t) * [_param._nb_prediction];
+    out_PREDICT_ACK     = new SC_OUT(Tcontrol_t) * [_param._nb_prediction];
+     in_PREDICT_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_prediction];
+    out_PREDICT_HISTORY = new SC_OUT(Thistory_t) * [_param._nb_prediction];
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+							   );
+
+	 in_PREDICT_VAL     [i] = interface->set_signal_valack_in        ("val"    , VAL);
+	out_PREDICT_ACK     [i] = interface->set_signal_valack_out       ("ack"    , ACK);
+	 in_PREDICT_ADDRESS [i] = interface->set_signal_in  <Taddress_t> ("address", static_cast<uint32_t>(ceil(log2(_param._nb_shifter))));
+	out_PREDICT_HISTORY [i] = interface->set_signal_out <Thistory_t> ("history", _param._size_shifter);
+      }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+        in_BRANCH_COMPLETE_VAL       = new SC_IN     (Tcontrol_t) * [_param._nb_branch_complete];
+       out_BRANCH_COMPLETE_ACK       = new SC_OUT    (Tcontrol_t) * [_param._nb_branch_complete];
+        in_BRANCH_COMPLETE_ADDRESS   = new SC_IN     (Taddress_t) * [_param._nb_branch_complete];
+        in_BRANCH_COMPLETE_HISTORY   = new SC_IN     (Thistory_t) * [_param._nb_branch_complete];
+        in_BRANCH_COMPLETE_DIRECTION = new SC_IN     (Tcontrol_t) * [_param._nb_branch_complete];
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, EAST
+								, "Interface branch complete"
+#endif
+								);
+
+	 in_BRANCH_COMPLETE_VAL        [i] = interface->set_signal_valack_in        ("val"      , VAL);
+	out_BRANCH_COMPLETE_ACK        [i] = interface->set_signal_valack_out       ("ack"      , ACK);
+	 in_BRANCH_COMPLETE_ADDRESS    [i] = interface->set_signal_in  <Taddress_t> ("address"  , static_cast<uint32_t>(ceil(log2(_param._nb_shifter))));
+	 in_BRANCH_COMPLETE_HISTORY    [i] = interface->set_signal_in  <Thistory_t> ("history"  , _param._size_shifter);
+	 in_BRANCH_COMPLETE_DIRECTION  [i] = interface->set_signal_in  <Tcontrol_t> ("direction", 1);
+      }
+    
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    string name_component;
+
+    // =====[ component_Shifter ]=========================================    
+    
+    name_component = _name+"_Shifter";
+
+    component_Shifter = new morpheo::behavioural::generic::shifter::Shifter (name_component.c_str()
+#ifdef STATISTICS
+									     ,_param_statistics
+#endif
+									     ,*(_param._param_shifter));
+
+    _component->set_component (component_Shifter->_component
+#ifdef POSITION
+			       , 25
+			       , 25
+			       , 10
+			       , 10
+#endif
+			       );
+
+     // =====[ component_RegisterFile ]====================================    
+    
+    name_component = _name+"_RegisterFile";
+    
+    component_RegisterFile = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic(name_component.c_str(),
+#ifdef STATISTICS
+															       _param_statistics            ,
+#endif
+															       *(_param._param_registerfile));
+
+    _component->set_component (component_RegisterFile->_component
+#ifdef POSITION
+			       , 75
+			       , 75
+			       , 10
+			       , 10
+#endif
+			       );
+     
+    // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+     // =====[ component_RegisterFile - Instanciation ]====================    
+
+#ifdef POSITION
+    _component->interface_map (_name+"_RegisterFile","",
+			       _name                ,"");
+#endif
+
+    _component->port_map(_name+"_RegisterFile", "in_CLOCK" , _name,"in_CLOCK" );
+    _component->port_map(_name+"_RegisterFile", "in_NRESET", _name,"in_NRESET");
+    
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_RegisterFile","read_"   +toString(i),
+				   _name                ,"predict_"+toString(i));
+#endif
+
+ 	_component->port_map(_name+"_RegisterFile", "in_READ_"+toString(i)+"_VAL"    , _name, "in_PREDICT_"+toString(i)+"_VAL"    );
+ 	_component->port_map(_name+"_RegisterFile","out_READ_"+toString(i)+"_ACK"    , _name,"out_PREDICT_"+toString(i)+"_ACK"    );
+ 	_component->port_map(_name+"_RegisterFile", "in_READ_"+toString(i)+"_ADDRESS", _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
+ 	_component->port_map(_name+"_RegisterFile","out_READ_"+toString(i)+"_DATA"   , _name,"out_PREDICT_"+toString(i)+"_HISTORY");
+      }
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_RegisterFile","write_"  +toString(i),
+				   _name+"_Shifter"     ,"shifter_"+toString(i));
+#endif
+
+ 	_component->port_map(_name+"_RegisterFile", "in_WRITE_"+toString(i)+"_VAL"    , _name           , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"    );
+ 	_component->port_map(_name+"_RegisterFile","out_WRITE_"+toString(i)+"_ACK"    , _name           ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"    );
+ 	_component->port_map(_name+"_RegisterFile", "in_WRITE_"+toString(i)+"_ADDRESS", _name           , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
+ 	_component->port_map(_name+"_RegisterFile", "in_WRITE_"+toString(i)+"_DATA"   , _name+"_Shifter","out_SHIFTER_"        +toString(i)+"_DATA");
+      }
+
+    // =====[ component_Shifter - Instanciation ]=========================    
+
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+
+#ifdef POSITION
+    _component->interface_map (_name+"_Shifter","",
+			       _name           ,"");
+#endif
+
+    _component->port_map(_name+"_Shifter", "in_CLOCK" , _name,"in_CLOCK" );
+    _component->port_map(_name+"_Shifter", "in_NRESET", _name,"in_NRESET");
+
+#endif
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_Shifter","shifter_"+toString(i),
+				   _name           ,"branch_complete_"+toString(i));
+
+#endif
+
+ 	_component->port_map(_name+"_Shifter", "in_SHIFTER_" +toString(i)+"_DATA"    , _name                , "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY");
+ 	_component->port_map(_name+"_Shifter", "in_SHIFTER_" +toString(i)+"_CARRY_IN", _name                , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");
+ 	_component->port_map(_name+"_Shifter", "out_SHIFTER_"+toString(i)+"_DATA"    , _name+"_RegisterFile", "in_WRITE_"+toString(i)+"_DATA");
+      }
+
+#ifdef POSITION
+    _component->generate_file();
+#endif
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_deallocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_deallocation.cpp	(revision 105)
@@ -0,0 +1,58 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+  void Branch_History_Table::deallocation (void)
+  {
+    delete     in_CLOCK;
+    delete     in_NRESET;
+
+    delete []  in_PREDICT_VAL    ;
+    delete [] out_PREDICT_ACK    ;
+    delete []  in_PREDICT_ADDRESS;
+    delete [] out_PREDICT_HISTORY;
+
+    delete []  in_BRANCH_COMPLETE_VAL    ;
+    delete [] out_BRANCH_COMPLETE_ACK    ;
+    delete []  in_BRANCH_COMPLETE_ADDRESS;
+    delete []  in_BRANCH_COMPLETE_HISTORY;
+    delete []  in_BRANCH_COMPLETE_DIRECTION;
+
+     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    delete component_Shifter;
+    delete component_RegisterFile;
+    
+    delete _component;
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_statistics.cpp	(revision 105)
@@ -0,0 +1,45 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  string Branch_History_Table::statistics (uint32_t depth)
+  {
+    return _stat->print(depth,
+			component_Shifter     ->statistics(depth+1) +
+			component_RegisterFile->statistics(depth+1) 
+			);
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_transition.cpp	(revision 105)
@@ -0,0 +1,50 @@
+#ifdef SYSTEMC
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  void Branch_History_Table::transition (void)
+  {
+#ifdef STATISTICS
+    _stat->add();
+#endif    
+
+#ifdef VHDL_TESTBENCH
+    vhdl_testbench_transition ();
+#endif
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl.cpp	(revision 105)
@@ -0,0 +1,53 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  void Branch_History_Table::vhdl (void)
+  {
+    Vhdl * vhdl = new Vhdl (_name);
+
+    _interfaces->set_port     (vhdl);
+    _component ->vhdl_instance(vhdl);
+
+    vhdl_declaration (vhdl);
+    vhdl_body        (vhdl);
+
+    vhdl->generate_file();
+
+    delete vhdl;
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_body.cpp	(revision 105)
@@ -0,0 +1,41 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  void Branch_History_Table::vhdl_body (Vhdl * & vhdl)
+  {
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_declaration.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_declaration.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_declaration.cpp	(revision 105)
@@ -0,0 +1,39 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+  void Branch_History_Table::vhdl_declaration (Vhdl * & vhdl)
+  {
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_testbench_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Branch_History_Table_vhdl_testbench_transition.cpp	(revision 105)
@@ -0,0 +1,44 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  void Branch_History_Table::vhdl_testbench_transition (void)
+  {
+//     sc_start(0);
+
+    _interfaces->testbench();
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters.cpp	(revision 105)
@@ -0,0 +1,87 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  Parameters::Parameters (uint32_t size_shifter      ,
+ 			  uint32_t nb_shifter        ,
+			  uint32_t nb_prediction     ,
+			  uint32_t nb_branch_complete) :
+    _size_shifter       (size_shifter      ),
+    _nb_shifter         (nb_shifter        ),
+    _nb_prediction      (nb_prediction     ),
+    _nb_branch_complete (nb_branch_complete)
+  {
+    _param_shifter = new morpheo::behavioural::generic::shifter::Parameters (size_shifter       ,
+									     nb_branch_complete ,
+									     1                  ,
+									     morpheo::behavioural::generic::shifter::without_rotate     ,
+									     morpheo::behavioural::generic::shifter::internal_left_shift,
+									     morpheo::behavioural::generic::shifter::external_completion),
+    _param_registerfile = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters (nb_prediction      ,
+														nb_branch_complete ,
+														nb_shifter         ,
+														size_shifter       );
+    
+    test();
+  };
+  
+  Parameters::Parameters (Parameters & param) :
+    _size_shifter       (param._size_shifter      ),
+    _nb_shifter         (param._nb_shifter        ),
+    _nb_prediction      (param._nb_prediction     ),
+    _nb_branch_complete (param._nb_branch_complete)
+  {
+    _param_shifter = new morpheo::behavioural::generic::shifter::Parameters (param._size_shifter       ,
+									     param._nb_branch_complete ,
+									     1                         ,
+									     morpheo::behavioural::generic::shifter::without_rotate     ,
+									     morpheo::behavioural::generic::shifter::internal_left_shift,
+									     morpheo::behavioural::generic::shifter::external_completion,
+									     true),
+
+    _param_registerfile = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters (param._nb_prediction      ,
+														param._nb_branch_complete ,
+														param._nb_shifter         ,
+														param._size_shifter       );
+      
+
+
+    test();
+  };
+
+  Parameters::~Parameters () 
+  {
+    delete _param_shifter;
+    delete _param_registerfile;
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters_msg_error.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters_msg_error.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters_msg_error.cpp	(revision 105)
@@ -0,0 +1,63 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Types.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  string Parameters::msg_error(void)
+  {
+    string msg = "";
+
+    if (is_positive (_size_shifter) == false)
+      {
+	msg += "  - size_shifter must be > 0\n";
+	msg += "    * size_shifter                    : " + toString(_size_shifter) + "\n";
+      }
+
+    if (is_positive (_nb_prediction) == false)
+      {
+	msg += "  - nb_prediction must be > 0\n";
+	msg += "    * nb_prediction                   : " + toString(_nb_prediction) + "\n";
+      }
+
+    if (is_positive (_nb_branch_complete) == false)
+      {
+	msg += "  - nb_branch_complete must be > 0\n";
+	msg += "    * nb_branch_complete              : " + toString(_nb_branch_complete) + "\n";
+      }
+
+    return msg;
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Parameters_print.cpp	(revision 105)
@@ -0,0 +1,61 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  string Parameters::print (uint32_t depth)
+  {
+    string tab = string(depth,'\t');
+    ostringstream msg;
+    msg << tab << "<branch_history_table>" << endl
+	<< tab << "\t<size_shifter       value=\"" << _size_shifter       << "\" />" << endl
+ 	<< tab << "\t<nb_shifter         value=\"" << _nb_shifter         << "\" />" << endl
+	<< tab << "\t<nb_prediction      value=\"" << _nb_prediction      << "\" />" << endl
+	<< tab << "\t<nb_branch_complete value=\"" << _nb_branch_complete << "\" />" << endl;
+    msg << _param_shifter     ->print(depth+1);
+    msg << _param_registerfile->print(depth+1);
+    msg	<< tab << "</branch_history_table>" << endl;
+    
+    return msg.str();
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Parameters & x)
+  {
+    output_stream << x.print(0);
+    
+    return output_stream;
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics.cpp	(revision 105)
@@ -0,0 +1,51 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  Statistics::Statistics (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  ) :
+    morpheo::behavioural::Statistics(name                  ,
+				     parameters_statistics ),
+    _parameters(parameters)
+  {
+  };
+  
+  Statistics::~Statistics () 
+  { 
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_add.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_add.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_add.cpp	(revision 105)
@@ -0,0 +1,44 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+
+  void Statistics::add ()
+  {
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_print.cpp	(revision 105)
@@ -0,0 +1,64 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+  string Statistics::print (uint32_t depth                ,
+			    string   component_statistics )
+  {
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "<branch_history_table name=\"" << _name << "\" >" << endl
+	<< print_body(depth+1)
+	<< component_statistics
+	<< tab << "</branch_history_table>" << endl;
+    
+    return msg.str();
+  };
+
+  string Statistics::print (uint32_t depth)
+  {
+    return print(depth,"");
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table::Statistics & x)
+  {
+    output_stream << x.print(0);
+
+    return output_stream;
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_print_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_print_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Branch_History_Table/src/Statistics_print_body.cpp	(revision 105)
@@ -0,0 +1,49 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace branch_history_table {
+
+  string Statistics::print_body (uint32_t depth)
+  {
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "";
+    
+    return msg.str();
+  };
+
+}; // end namespace branch_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile	(revision 105)
@@ -0,0 +1,24 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= .
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ Library ]------------------------------------------
+LIBRARY				= $(DIR_LIB)/libTwo_Level_Branch_Predictor.a
+
+
+#-----[ include ]------------------------------------------
+
+all				:
+				@$(MAKE) all_component
+
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Component
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile.defs
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile.defs	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile.defs	(revision 105)
@@ -0,0 +1,11 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT_MORPHEO		= ../../../../../../../..
+DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile.deps
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile.deps	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Makefile.deps	(revision 105)
@@ -0,0 +1,54 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+# DIR_MORPHEO must be defined
+
+Two_Level_Branch_Predictor			= yes
+
+ifndef Behavioural
+include $(DIR_MORPHEO)/Behavioural/Makefile.deps
+endif
+ifndef Branch_History_Table
+include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.deps
+endif
+ifndef Pattern_History_Table
+include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.deps
+endif
+ifndef Two_Level_Branch_Predictor_Glue
+include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.deps
+endif
+
+#-----[ Library ]------------------------------------------
+Two_Level_Branch_Predictor_LIBRARY		= 	-lTwo_Level_Branch_Predictor			\
+							$(Two_Level_Branch_Predictor_Glue_LIBRARY)	\
+							$(Branch_History_Table_LIBRARY)			\
+							$(Pattern_History_Table_LIBRARY)		\
+							$(Behavioural_LIBRARY)	
+
+Two_Level_Branch_Predictor_DIR_LIBRARY		=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/lib	\
+							$(Two_Level_Branch_Predictor_Glue_DIR_LIBRARY)	\
+							$(Branch_History_Table_DIR_LIBRARY)		\
+							$(Pattern_History_Table_DIR_LIBRARY)		\
+							$(Behavioural_DIR_LIBRARY)
+
+#-----[ Rules ]--------------------------------------------
+
+Two_Level_Branch_Predictor_library		: 
+						@\
+						$(MAKE) Behavioural_library;\
+						$(MAKE) Branch_History_Table_library;\
+						$(MAKE) Pattern_History_Table_library;\
+						$(MAKE) Two_Level_Branch_Predictor_Glue_library;\
+						$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor --makefile=Makefile ;
+	
+Two_Level_Branch_Predictor_library_clean	: 
+						@\
+						$(MAKE) Behavioural_library_clean;\
+						$(MAKE) Branch_History_Table_library_clean;\
+						$(MAKE) Pattern_History_Table_library_clean;\
+						$(MAKE) Two_Level_Branch_Predictor_Glue_library_clean;\
+						$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor --makefile=Makefile clean;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile	(revision 105)
@@ -0,0 +1,24 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= .
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ Library ]------------------------------------------
+LIBRARY				= $(DIR_LIB)/libPattern_History_Table.a
+
+
+#-----[ include ]------------------------------------------
+
+all				: $(LIBRARY_NEED)
+				@$(MAKE) all_component
+
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Component
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.defs
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.defs	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.defs	(revision 105)
@@ -0,0 +1,11 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT_MORPHEO		= ../../../../../../../../..
+DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.deps
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.deps	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.deps	(revision 105)
@@ -0,0 +1,47 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+# DIR_MORPHEO must be defined
+
+Pattern_History_Table			= yes
+
+ifndef Behavioural
+include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
+endif
+ifndef Counter
+include 			$(DIR_MORPHEO)/Behavioural/Generic/Counter/Makefile.deps
+endif
+ifndef RegisterFile_Monolithic
+include 			$(DIR_MORPHEO)/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.deps
+endif
+
+#-----[ Library ]------------------------------------------
+Pattern_History_Table_LIBRARY		= 	-lPattern_History_Table	\
+						$(RegisterFile_Monolithic_LIBRARY)	\
+						$(Counter_LIBRARY)	\
+						$(Behavioural_LIBRARY)
+
+Pattern_History_Table_DIR_LIBRARY	=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/lib	\
+						$(RegisterFile_Monolithic_DIR_LIBRARY)	\
+						$(Counter_DIR_LIBRARY)		\
+						$(Behavioural_DIR_LIBRARY)
+
+#-----[ Rules ]--------------------------------------------
+
+Pattern_History_Table_library		: 
+					@\
+					$(MAKE) Behavioural_library;\
+					$(MAKE) Counter_library;\
+					$(MAKE) RegisterFile_Monolithic_library;\
+					$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table --makefile=Makefile;
+	
+Pattern_History_Table_library_clean	: 
+					@\
+					$(MAKE) Behavioural_library_clean;\
+					$(MAKE) Counter_library_clean;\
+					$(MAKE) RegisterFile_Monolithic_library_clean;\
+					$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table --makefile=Makefile clean;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/Makefile	(revision 105)
@@ -0,0 +1,29 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_MORPHEO			= ../../../../../../../../../..
+
+LIBRARY				= $(Pattern_History_Table_LIBRARY)
+
+DIR_LIBRARY			= $(Pattern_History_Table_DIR_LIBRARY)
+
+#-----[ include ]------------------------------------------
+
+all				: library
+				@$(MAKE) all_selftest
+
+library				: Pattern_History_Table_library
+
+library_clean			: Pattern_History_Table_library_clean
+
+include                         ../Makefile.deps
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Selftest
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Synthesis
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config0.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config0.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config0.cfg	(revision 105)
@@ -0,0 +1,5 @@
+Pattern_History_Table
+2	8	*2	# size_counter      	
+2	64	*4	# nb_counter        
+1	1	+1	# nb_prediction     
+1	1	+1	# nb_branch_complete
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config1.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config1.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/config1.cfg	(revision 105)
@@ -0,0 +1,5 @@
+Pattern_History_Table
+2	8	*2	# size_counter      	
+2	64	*4	# nb_counter        
+2	2	+1	# nb_prediction     
+2	2	+1	# nb_branch_complete
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/configuration.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/configuration.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/configuration.cfg	(revision 105)
@@ -0,0 +1,5 @@
+Pattern_History_Table
+2	8	*2	# size_counter      	
+2	64	*4	# nb_counter        
+1	2	+1	# nb_prediction     
+1	2	+1	# nb_branch_complete
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h	(revision 105)
@@ -0,0 +1,29 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "RegisterFile"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <string>
+#include <iostream>
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table;
+
+void test   (string name,
+	     morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters param);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/main.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/main.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/main.cpp	(revision 105)
@@ -0,0 +1,47 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test 0
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h"
+
+#define NB_PARAMS 4
+
+void usage (string exec)
+{
+  cerr << "<Usage> " << exec << " name_instance list_params" << endl
+       << "list_params is :" << endl
+       << " - size_counter       (unsigned int)" << endl
+       << " - nb_counter         (unsigned int)" << endl
+       << " - nb_prediction      (unsigned int)" << endl
+       << " - nb_branch_complete (unsigned int)" << endl;
+  exit (1);
+}
+
+#ifndef SYSTEMC
+int main    (int argc, char * argv[])
+#else
+int sc_main (int argc, char * argv[])
+#endif
+{
+  if (argc != 2+NB_PARAMS)
+    usage (argv[0]);
+
+  const string   name               = argv[1];
+  const uint32_t size_counter       = atoi(argv[2]);
+  const uint32_t nb_counter         = atoi(argv[3]);
+  const uint32_t nb_prediction      = atoi(argv[4]);
+  const uint32_t nb_branch_complete = atoi(argv[5]);
+
+  morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters param (size_counter       ,
+																       nb_counter         ,
+																       nb_prediction      ,
+																       nb_branch_complete );
+
+  test (name,param);
+
+  return (EXIT_SUCCESS);
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp	(revision 105)
@@ -0,0 +1,187 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#define NB_ITERATION 512
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/include/test.h"
+#include "Common/include/Test.h"
+
+void test (string name,
+	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters param)
+{
+  cout << "<" << name << "> : Simulation SystemC" << endl;
+
+  try 
+    {
+      cout << param.print(1);
+      param.test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      cout << "<" << name << "> : " <<  error.what ();
+      return;
+    }
+  catch (...)
+    {
+      cerr << "<" << name << "> : This test must generate a error" << endl;
+      exit (EXIT_FAILURE);
+    }
+  Pattern_History_Table * _Pattern_History_Table = new Pattern_History_Table (name.c_str(),
+#ifdef STATISTICS
+					     morpheo::behavioural::Parameters_Statistics(5,50),
+#endif
+					     param);
+  
+#ifdef SYSTEMC
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  sc_clock                                 CLOCK ("clock", 1.0, 0.5);
+  sc_signal<Tcontrol_t>                    NRESET;
+
+  sc_signal<Tcontrol_t>                    PREDICT_VAL               [param._nb_prediction];
+  sc_signal<Tcontrol_t>                    PREDICT_ACK               [param._nb_prediction];
+  sc_signal<Taddress_t>                    PREDICT_ADDRESS           [param._nb_prediction];
+  sc_signal<Thistory_t>                    PREDICT_HISTORY           [param._nb_prediction];
+				           			     
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_VAL       [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_ACK       [param._nb_branch_complete];
+  sc_signal<Taddress_t>                    BRANCH_COMPLETE_ADDRESS   [param._nb_branch_complete];
+  sc_signal<Thistory_t>                    BRANCH_COMPLETE_HISTORY   [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_DIRECTION [param._nb_branch_complete];
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  cout << "<" << name << "> Instanciation of _Pattern_History_Table" << endl;
+  
+  (*(_Pattern_History_Table->in_CLOCK))        (CLOCK);
+  (*(_Pattern_History_Table->in_NRESET))       (NRESET);
+
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    {
+      (*(_Pattern_History_Table-> in_PREDICT_VAL     [i]))        (PREDICT_VAL     [i]);
+      (*(_Pattern_History_Table->out_PREDICT_ACK     [i]))        (PREDICT_ACK     [i]);
+      (*(_Pattern_History_Table-> in_PREDICT_ADDRESS [i]))        (PREDICT_ADDRESS [i]);
+      (*(_Pattern_History_Table->out_PREDICT_HISTORY [i]))        (PREDICT_HISTORY [i]);
+    }
+
+  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+    {
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))        (BRANCH_COMPLETE_VAL       [i]);
+      (*(_Pattern_History_Table->out_BRANCH_COMPLETE_ACK       [i]))        (BRANCH_COMPLETE_ACK       [i]);
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))        (BRANCH_COMPLETE_ADDRESS   [i]);
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))        (BRANCH_COMPLETE_HISTORY   [i]);
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))        (BRANCH_COMPLETE_DIRECTION [i]);
+    }
+
+  /********************************************************
+   * Simulation - Begin
+   ********************************************************/
+
+  cout << "<" << name << "> Start Simulation ............" << endl;
+  // Initialisation
+
+  srand(0);
+  //srand(TIME(NULL));
+
+  sc_start(0);
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
+  
+  NRESET.write(1);
+
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    PREDICT_VAL         [i].write(0);
+  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+    BRANCH_COMPLETE_VAL [i].write(0);
+
+  // Initialisation of Register
+  uint32_t   num_port_branch_complete = 0;
+  uint32_t   num_port_predict         = 0;
+  Taddress_t address                  = 0;
+  Thistory_t history_max              = (1<<param._size_counter)-1;
+  Thistory_t history                  = 0;
+  Tcontrol_t direction                = 0;
+
+  while (address<param._nb_counter)
+    {
+      BRANCH_COMPLETE_VAL       [0].write(1);
+      BRANCH_COMPLETE_ADDRESS   [0].write(address);
+      BRANCH_COMPLETE_HISTORY   [0].write(0);
+      BRANCH_COMPLETE_DIRECTION [0].write(0);
+
+      sc_start(1);
+      
+      if (BRANCH_COMPLETE_ACK[0].read()==1)
+	address++;
+    }
+ 
+  BRANCH_COMPLETE_VAL     [0].write(0);
+  sc_start(0);
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      num_port_branch_complete = rand() % param._nb_branch_complete;
+      num_port_predict         = rand() % param._nb_prediction     ;
+      address                  = rand() % param._nb_counter        ;
+      history                  = rand() % (1<<param._size_counter) ;
+      direction                = rand() % 2;
+
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} ["+toString(num_port_branch_complete)+"]" << endl
+	   << hex
+	   << " - address     : " << address   << endl
+	   << " - history old : " << history   << endl
+	   << " - direction   : " << direction << endl;
+
+      BRANCH_COMPLETE_VAL       [num_port_branch_complete].write(1);
+      BRANCH_COMPLETE_ADDRESS   [num_port_branch_complete].write(address);
+      BRANCH_COMPLETE_HISTORY   [num_port_branch_complete].write(history);
+      BRANCH_COMPLETE_DIRECTION [num_port_branch_complete].write(direction);
+
+      // Wait Ack
+      do
+	{
+	  sc_start(1);
+	}
+      while (BRANCH_COMPLETE_ACK[num_port_branch_complete].read()!=1);
+
+      BRANCH_COMPLETE_VAL     [num_port_branch_complete].write(0);
+      PREDICT_VAL             [num_port_predict        ].write(1);
+      PREDICT_ADDRESS         [num_port_predict        ].write(address);
+      
+      history                  = (direction==1)?((history<history_max)?history+1:history):((history>0)?history-1:history);
+      
+      // Wait Ack
+      do
+	{
+	  sc_start(1);
+	}
+      while (PREDICT_ACK        [num_port_predict        ].read()!=1);
+
+      PREDICT_VAL             [num_port_predict        ].write(0);
+
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} ["+toString(num_port_predict)+"]" << endl
+	   << " - history new : " << PREDICT_HISTORY [num_port_predict].read() << endl
+	   << dec;
+
+      TEST(Thistory_t,PREDICT_HISTORY [num_port_predict].read(),history);
+    }
+
+  /********************************************************
+   * Simulation - End
+   ********************************************************/
+
+  cout << "<" << name << "> ............ Stop Simulation" << endl;
+
+#endif
+
+  delete _Pattern_History_Table;
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/Makefile	(revision 105)
@@ -0,0 +1,19 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= ..
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ include ]------------------------------------------
+
+all				:
+				$(MAKE) all_documentation
+
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Documentation
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/Pattern_History_Table.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/Pattern_History_Table.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/Pattern_History_Table.tex	(revision 105)
@@ -0,0 +1,38 @@
+\documentclass[10pt,a4paper,twocolumn]{article}
+
+\def\dirdoc{tex}
+\def\dirschema{eps}
+
+% Package de variables d'environnement : Titre, command etc ...
+\usepackage{../../../../../../../../../../Behavioural/doc/sty/doc-style}
+\usepackage{sty/header}
+
+
+%------------------------------------------------------------------------------
+% Début document
+%------------------------------------------------------------------------------
+
+\pagestyle{empty}
+
+\begin{document}
+
+% Créez une page de titre
+\maketitle
+\thispagestyle{empty}
+
+%Table des matières et des figures
+%\tableofcontents
+%\newpage
+%\listoffigures
+
+%------------------------------------------------------------------------------
+% Ajout du corps du documents
+%------------------------------------------------------------------------------
+
+\input{tex/root}
+
+%------------------------------------------------------------------------------
+% Fin d'ajout du corps du document
+%------------------------------------------------------------------------------
+
+\end{document}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/sty/header.sty
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/sty/header.sty	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/sty/header.sty	(revision 105)
@@ -0,0 +1,12 @@
+\def\review{YYYY/MM/DD}
+%\def\review{\number\day/\number\month/\number\year\xspace}
+
+\title{Pattern\_History\_Table}
+ 
+\author{}
+
+\affiliation{}
+
+\email{}
+
+\date{\review}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/01_introduction.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/01_introduction.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/01_introduction.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Introduction}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/02_features.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/02_features.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/02_features.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Features}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/03_description.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/03_description.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/03_description.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Functional Description}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/04_pinout.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/04_pinout.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/04_pinout.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Pin out}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/05_parameters.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/05_parameters.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/05_parameters.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Parameters}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/06_performance.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/06_performance.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/06_performance.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Performance}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/07_details.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/07_details.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/07_details.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Details}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/08_history.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/08_history.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/08_history.tex	(revision 105)
@@ -0,0 +1,10 @@
+\Section{Revision History}
+
+\begin{tabular}{|c|c|c|}
+\hline
+Revision Date & By  & Modifications\\
+\hline
+\hline
+yyyy/mm/dd    & xxx & Initial document \\
+\hline
+\end{tabular}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/root.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/root.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/doc/tex/root.tex	(revision 105)
@@ -0,0 +1,8 @@
+\input{\dirdoc/01_introduction}
+\input{\dirdoc/02_features}
+\input{\dirdoc/03_description}
+\input{\dirdoc/04_pinout}
+\input{\dirdoc/05_parameters}
+\input{\dirdoc/06_performance}
+\input{\dirdoc/07_details}
+\input{\dirdoc/08_history}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h	(revision 105)
@@ -0,0 +1,71 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Parameters_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Parameters_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Parameters.h"
+// Internal structure
+#include "Behavioural/Generic/Counter/include/Parameters.h"
+#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
+#include <math.h>
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  class Parameters : public morpheo::behavioural::Parameters
+  {
+    //-----[ fields ]------------------------------------------------------------
+  public : const uint32_t _size_counter      ;
+  public : const uint32_t _nb_counter        ;
+  public : const uint32_t _nb_prediction     ;
+  public : const uint32_t _nb_branch_complete;
+
+  public :       morpheo::behavioural::generic::counter::Parameters      * _param_counter;
+  public :       morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters * _param_registerfile;
+
+    //-----[ methods ]-----------------------------------------------------------
+  public : Parameters  (uint32_t size_counter      ,
+ 			uint32_t nb_counter        ,
+			uint32_t nb_prediction     ,
+			uint32_t nb_branch_complete);
+  public : Parameters  (Parameters & param) ;
+  public : ~Parameters () ;
+
+  public : string msg_error (void);
+
+  public :        string   print      (uint32_t depth);
+  public : friend ostream& operator<< (ostream& output_stream,
+				       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters & x);
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h	(revision 105)
@@ -0,0 +1,152 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Pattern_History_Table_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Pattern_History_Table_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <iostream>
+#include "Common/include/ToString.h"
+#include "Common/include/Debug.h"
+
+// Internal structure
+#include "Behavioural/Generic/Counter/include/Counter.h"
+#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h"
+#ifdef STATISTICS
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
+#endif
+#ifdef VHDL
+#include "Behavioural/include/Vhdl.h"
+#endif
+#include "Behavioural/include/Component.h"
+
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  class Pattern_History_Table 
+#if SYSTEMC
+    : public sc_module
+#endif
+  {
+    // -----[ fields ]----------------------------------------------------
+    // Parameters
+  protected : const string     _name;
+
+  protected : const Parameters _param;
+#ifdef STATISTICS
+ protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
+#endif
+
+#ifdef STATISTICS
+  private   : Statistics                     * _stat;
+#endif
+
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
+
+#ifdef SYSTEMC
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Interface
+  public    : SC_CLOCK                      *  in_CLOCK        ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
+
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL            ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK            ;
+  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS        ;
+  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY        ;
+
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL    ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK    ;
+  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS;
+  public    : SC_IN (Thistory_t)           **  in_BRANCH_COMPLETE_HISTORY;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION;
+
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_SIGNAL(Thistory_t)        ** signal_BRANCH_COMPLETE_HISTORY;
+#endif
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  public    : morpheo::behavioural::generic::counter::Counter           * component_Counter     ;
+  public    : morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic * component_RegisterFile;
+
+    // -----[ methods ]---------------------------------------------------
+
+#ifdef SYSTEMC
+    SC_HAS_PROCESS (Pattern_History_Table);
+#endif					       
+
+  public  :          Pattern_History_Table              (
+#ifdef SYSTEMC
+							 sc_module_name                              name,
+#else					       
+							 string                                      name,
+#endif					       
+#ifdef STATISTICS
+							 morpheo::behavioural::Parameters_Statistics param_statistics,
+#endif
+							 Parameters                                  param );
+    
+  public  :          Pattern_History_Table              (Parameters param );
+  public  :          ~Pattern_History_Table             (void);
+					       
+#ifdef SYSTEMC				       
+  private : void     allocation                (void);
+  private : void     deallocation              (void);
+					       
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+  public  : void     transition                (void);
+#endif
+#endif					       
+
+#ifdef STATISTICS
+  public  : string   statistics                (uint32_t depth);
+#endif
+#if VHDL				       
+  public  : void     vhdl                      (void);
+  private : void     vhdl_declaration          (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
+#endif					       
+#ifdef VHDL_TESTBENCH			       
+  private : void     vhdl_testbench_transition (void);
+#endif
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h	(revision 105)
@@ -0,0 +1,74 @@
+#ifdef STATISTICS
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Statistics_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Statistics_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Statistics.h"
+#include "Behavioural/include/Parameters_Statistics.h"
+#include "Behavioural/Generic/Counter/include/Statistics.h"
+#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Statistics.h"
+//#include "Behavioural/Generic/Group/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
+
+//using namespace morpheo::behavioural::generic::group;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  class Statistics : public morpheo::behavioural::Statistics
+  {
+    // -----[ fields ]----------------------------------------------------
+  private  : const Parameters                                   _parameters;
+
+    // -----[ methods ]---------------------------------------------------
+  public   : Statistics  (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  );
+//public   : Statistics  (Statistics & stat);
+  public   : ~Statistics () ;
+    
+  public   : string   print_body (uint32_t depth);
+  public   : string   print      (uint32_t depth);
+  public   : string   print      (uint32_t depth,
+				  string   component_stat);
+  public   : void     add        ();
+
+  public   : friend ostream& operator<< (ostream& output_stream,
+					 const Statistics & x);
+
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h	(revision 105)
@@ -0,0 +1,43 @@
+#ifdef SYSTEMC
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Type_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_pattern_history_table_Type_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Types.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+  typedef uint32_t Thistory_t;
+  typedef uint32_t Taddress_t;
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters.cpp	(revision 105)
@@ -0,0 +1,85 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  Parameters::Parameters (uint32_t size_counter      ,
+ 			  uint32_t nb_counter        ,
+			  uint32_t nb_prediction     ,
+			  uint32_t nb_branch_complete) :
+    _size_counter       (size_counter      ),
+    _nb_counter         (nb_counter        ),
+    _nb_prediction      (nb_prediction     ),
+    _nb_branch_complete (nb_branch_complete)
+  {
+    log_printf(FUNC,Pattern_History_Table,"Parameters","Begin");
+
+    _param_counter      = new morpheo::behavioural::generic::counter::Parameters (size_counter       ,
+										  nb_branch_complete );
+    _param_registerfile = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters (nb_prediction      ,
+														nb_branch_complete ,
+														nb_counter         ,
+														size_counter       );
+    
+
+    test();
+    log_printf(FUNC,Pattern_History_Table,"Parameters","End");
+  };
+  
+  Parameters::Parameters (Parameters & param) :
+    _size_counter       (param._size_counter      ),
+    _nb_counter         (param._nb_counter        ),
+    _nb_prediction      (param._nb_prediction     ),
+    _nb_branch_complete (param._nb_branch_complete)
+  {
+    log_printf(FUNC,Pattern_History_Table,"Parameters","Begin");
+
+    _param_counter = new morpheo::behavioural::generic::counter::Parameters (param._size_counter       ,
+									     param._nb_branch_complete );
+
+    _param_registerfile = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::Parameters (param._nb_prediction      ,
+														param._nb_branch_complete ,
+														param._nb_counter         ,
+														param._size_counter       );
+    
+    test();
+    log_printf(FUNC,Pattern_History_Table,"Parameters","End");
+  };
+
+  Parameters::~Parameters () 
+  {
+    log_printf(FUNC,Pattern_History_Table,"~Parameters","Begin");
+    delete _param_counter;
+    delete _param_registerfile;
+    log_printf(FUNC,Pattern_History_Table,"~Parameters","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters_msg_error.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters_msg_error.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters_msg_error.cpp	(revision 105)
@@ -0,0 +1,67 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Types.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  string Parameters::msg_error(void)
+  {
+    log_printf(FUNC,Pattern_History_Table,"msg_error","Begin");
+
+    string msg = "";
+
+    if (is_positive (_size_counter) == false)
+      {
+	msg += "  - size_counter must be > 0\n";
+	msg += "    * size_counter                    : " + toString(_size_counter) + "\n";
+      }
+
+    if (is_positive (_nb_prediction) == false)
+      {
+	msg += "  - nb_prediction must be > 0\n";
+	msg += "    * nb_prediction                   : " + toString(_nb_prediction) + "\n";
+      }
+
+    if (is_positive (_nb_branch_complete) == false)
+      {
+	msg += "  - nb_branch_complete must be > 0\n";
+	msg += "    * nb_branch_complete              : " + toString(_nb_branch_complete) + "\n";
+      }
+
+    return msg;
+
+    log_printf(FUNC,Pattern_History_Table,"msg_error","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Parameters_print.cpp	(revision 105)
@@ -0,0 +1,65 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  string Parameters::print (uint32_t depth)
+  {
+    log_printf(FUNC,Pattern_History_Table,"print","Begin");
+
+    string tab = string(depth,'\t');
+    ostringstream msg;
+    msg << tab << "<pattern_history_table>" << endl
+	<< tab << "\t<size_counter       value=\"" << _size_counter       << "\" />" << endl
+ 	<< tab << "\t<nb_counter         value=\"" << _nb_counter         << "\" />" << endl
+	<< tab << "\t<nb_prediction      value=\"" << _nb_prediction      << "\" />" << endl
+	<< tab << "\t<nb_branch_complete value=\"" << _nb_branch_complete << "\" />" << endl;
+    msg << _param_counter     ->print(depth+1);
+    msg << _param_registerfile->print(depth+1);
+    msg << tab << "</pattern_history_table>" << endl;
+
+    log_printf(FUNC,Pattern_History_Table,"print","End");
+    
+    return msg.str();
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters & x)
+  {
+    output_stream << x.print(0);
+    
+    return output_stream;
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table.cpp	(revision 105)
@@ -0,0 +1,106 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+#ifdef SYSTEMC
+  Pattern_History_Table::Pattern_History_Table (sc_module_name name,
+#else
+  Pattern_History_Table::Pattern_History_Table (string name,
+#endif
+#ifdef STATISTICS
+			      morpheo::behavioural::Parameters_Statistics             param_statistics,
+#endif
+			      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters param ):
+			      _name              (name)
+			      ,_param            (param)
+#ifdef STATISTICS
+			      ,_param_statistics (param_statistics)
+#endif
+  {
+    log_printf(FUNC,Pattern_History_Table,"Pattern_History_Table","Begin");
+   
+#ifdef SYSTEMC
+    allocation ();
+#endif
+ 
+#ifdef STATISTICS
+    // Allocation of statistics
+    _stat = new Statistics (static_cast<string>(_name),
+			    param_statistics          ,
+			    param);
+#endif
+
+#ifdef VHDL
+    // generate the vhdl
+    vhdl();
+#endif
+
+#ifdef SYSTEMC
+//     // Constant
+//     for (uint32_t i=0; i<_param._nb_prediction     ; i++)
+//       PORT_WRITE(out_PREDICT_ACK         [i],1);
+//     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+//       PORT_WRITE(out_BRANCH_COMPLETE_ACK [i],1);
+
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+    SC_METHOD (transition);
+    dont_initialize ();
+    sensitive_pos << *(in_CLOCK);
+#endif
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+#endif    
+
+#endif
+    log_printf(FUNC,Pattern_History_Table,"Pattern_History_Table","End");
+  };
+  
+  Pattern_History_Table::~Pattern_History_Table (void)
+  {
+    log_printf(FUNC,Pattern_History_Table,"~Pattern_History_Table","Begin");
+
+#ifdef STATISTICS
+    _stat->generate_file(statistics(0));
+    
+    delete _stat;
+#endif
+
+#ifdef SYSTEMC
+    deallocation ();
+#endif
+
+    log_printf(FUNC,Pattern_History_Table,"~Pattern_History_Table","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_allocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_allocation.cpp	(revision 105)
@@ -0,0 +1,226 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Pattern_History_Table::allocation (void)
+  {
+    log_printf(FUNC,Pattern_History_Table,"allocation","Begin");
+
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Pattern_History_Table"
+#ifdef POSITION
+					     ,MIXTE                
+#endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      Interface * interface = _interfaces->set_interface(""
+#ifdef POSITION
+							 , IN  
+							 , SOUTH
+							 , "Generalist interface"
+#endif
+							 );
+      
+      in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
+    }
+
+    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     in_PREDICT_VAL     = new SC_IN (Tcontrol_t) * [_param._nb_prediction];
+    out_PREDICT_ACK     = new SC_OUT(Tcontrol_t) * [_param._nb_prediction];
+     in_PREDICT_ADDRESS = new SC_IN (Taddress_t) * [_param._nb_prediction];
+    out_PREDICT_HISTORY = new SC_OUT(Thistory_t) * [_param._nb_prediction];
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+								);
+
+	 in_PREDICT_VAL     [i] = interface->set_signal_valack_in        ("val"    , VAL);
+	out_PREDICT_ACK     [i] = interface->set_signal_valack_out       ("ack"    , ACK);
+	 in_PREDICT_ADDRESS [i] = interface->set_signal_in  <Taddress_t> ("address", static_cast<uint32_t>(ceil(log2(_param._nb_counter))));
+	out_PREDICT_HISTORY [i] = interface->set_signal_out <Thistory_t> ("history", _param._size_counter);
+      }
+    
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+        in_BRANCH_COMPLETE_VAL       = new SC_IN     (Tcontrol_t) * [_param._nb_branch_complete];
+       out_BRANCH_COMPLETE_ACK       = new SC_OUT    (Tcontrol_t) * [_param._nb_branch_complete];
+        in_BRANCH_COMPLETE_ADDRESS   = new SC_IN     (Taddress_t) * [_param._nb_branch_complete];
+        in_BRANCH_COMPLETE_HISTORY   = new SC_IN     (Thistory_t) * [_param._nb_branch_complete];
+        in_BRANCH_COMPLETE_DIRECTION = new SC_IN     (Tcontrol_t) * [_param._nb_branch_complete];
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, EAST
+								, "Interface branch complete"
+#endif
+								);
+
+	 in_BRANCH_COMPLETE_VAL        [i] = interface->set_signal_valack_in        ("val"      , VAL);
+	out_BRANCH_COMPLETE_ACK        [i] = interface->set_signal_valack_out       ("ack"      , ACK);
+	 in_BRANCH_COMPLETE_ADDRESS    [i] = interface->set_signal_in  <Taddress_t> ("address"  , static_cast<uint32_t>(ceil(log2(_param._nb_counter))));
+	 in_BRANCH_COMPLETE_HISTORY    [i] = interface->set_signal_in  <Thistory_t> ("history"  , _param._size_counter);
+	 in_BRANCH_COMPLETE_DIRECTION  [i] = interface->set_signal_in  <Tcontrol_t> ("direction", 1);
+      }
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    string name_component;
+
+    // =====[ component_Counter ]=========================================    
+    
+    name_component = _name+"_Counter";
+
+    component_Counter = new morpheo::behavioural::generic::counter::Counter (name_component.c_str()
+#ifdef STATISTICS
+									     ,_param_statistics
+#endif
+									     ,*(_param._param_counter));
+
+    _component->set_component (component_Counter->_component
+#ifdef POSITION
+			       , 25
+			       , 25
+			       , 10
+			       , 10
+#endif
+			       );
+
+     // =====[ component_RegisterFile ]====================================    
+    
+    name_component = _name+"_RegisterFile";
+    
+    component_RegisterFile = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic(name_component.c_str(),
+#ifdef STATISTICS
+															       _param_statistics            ,
+#endif
+															       *(_param._param_registerfile));
+
+    _component->set_component (component_RegisterFile->_component
+#ifdef POSITION
+			       , 75
+			       , 75
+			       , 10
+			       , 10
+#endif
+			       );
+     
+    // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // =====[ component_RegisterFile - Instanciation ]====================    
+
+#ifdef POSITION
+    _component->interface_map (_name+"_RegisterFile","",
+			       _name                ,"");
+#endif
+
+    _component->port_map(_name+"_RegisterFile", "in_CLOCK" , _name,"in_CLOCK" );
+    _component->port_map(_name+"_RegisterFile", "in_NRESET", _name,"in_NRESET");
+    
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_RegisterFile","read_"   +toString(i),
+				   _name                ,"predict_"+toString(i));
+#endif
+
+ 	_component->port_map(_name+"_RegisterFile", "in_READ_"+toString(i)+"_VAL"    , _name, "in_PREDICT_"+toString(i)+"_VAL"    );
+ 	_component->port_map(_name+"_RegisterFile","out_READ_"+toString(i)+"_ACK"    , _name,"out_PREDICT_"+toString(i)+"_ACK"    );
+ 	_component->port_map(_name+"_RegisterFile", "in_READ_"+toString(i)+"_ADDRESS", _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
+ 	_component->port_map(_name+"_RegisterFile","out_READ_"+toString(i)+"_DATA"   , _name,"out_PREDICT_"+toString(i)+"_HISTORY");
+      }
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_RegisterFile","write_"  +toString(i),
+				   _name+"_Counter"     ,"counter_"+toString(i));
+#endif
+
+ 	_component->port_map(_name+"_RegisterFile", "in_WRITE_"+toString(i)+"_VAL"    , _name           , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"    );
+ 	_component->port_map(_name+"_RegisterFile","out_WRITE_"+toString(i)+"_ACK"    , _name           ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"    );
+ 	_component->port_map(_name+"_RegisterFile", "in_WRITE_"+toString(i)+"_ADDRESS", _name           , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
+ 	_component->port_map(_name+"_RegisterFile", "in_WRITE_"+toString(i)+"_DATA"   , _name+"_Counter","out_COUNTER_"        +toString(i)+"_DATA");
+      }
+
+    // =====[ component_Counter - Instanciation ]=========================    
+
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+
+#ifdef POSITION
+    _component->interface_map (_name+"_Counter","",
+			       _name           ,"");
+#endif
+
+    _component->port_map(_name+"_Counter", "in_CLOCK" , _name,"in_CLOCK" );
+    _component->port_map(_name+"_Counter", "in_NRESET", _name,"in_NRESET");
+
+#endif
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_Counter","counter_"+toString(i),
+				   _name           ,"branch_complete_"+toString(i));
+
+#endif
+
+ 	_component->port_map(_name+"_Counter", "in_COUNTER_" +toString(i)+"_DATA"    , _name                , "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY");
+ 	_component->port_map(_name+"_Counter", "in_COUNTER_" +toString(i)+"_ADDSUB"  , _name                , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");
+ 	_component->port_map(_name+"_Counter", "out_COUNTER_"+toString(i)+"_DATA"    , _name+"_RegisterFile", "in_WRITE_"+toString(i)+"_DATA");
+      }
+
+#ifdef POSITION
+    _component->generate_file();
+#endif
+
+    log_printf(FUNC,Pattern_History_Table,"allocation","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_deallocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_deallocation.cpp	(revision 105)
@@ -0,0 +1,64 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Pattern_History_Table::deallocation (void)
+  {
+    log_printf(FUNC,Pattern_History_Table,"deallocation","Begin");
+
+    delete     in_CLOCK;
+    delete     in_NRESET;
+
+    delete []  in_PREDICT_VAL    ;
+    delete [] out_PREDICT_ACK    ;
+    delete []  in_PREDICT_ADDRESS;
+    delete [] out_PREDICT_HISTORY;
+
+    delete []  in_BRANCH_COMPLETE_VAL    ;
+    delete [] out_BRANCH_COMPLETE_ACK    ;
+    delete []  in_BRANCH_COMPLETE_ADDRESS;
+    delete []  in_BRANCH_COMPLETE_HISTORY;
+    delete []  in_BRANCH_COMPLETE_DIRECTION;
+
+     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    delete component_Counter;
+    delete component_RegisterFile;
+    
+    delete _component;
+
+    log_printf(FUNC,Pattern_History_Table,"deallocation","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_statistics.cpp	(revision 105)
@@ -0,0 +1,50 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+  string Pattern_History_Table::statistics (uint32_t depth)
+  {
+    log_printf(FUNC,Pattern_History_Table,"statistics","Begin");
+
+    string stat_print = _stat->print(depth,
+				     component_Counter     ->statistics(depth+1) + 
+				     component_RegisterFile->statistics(depth+1)
+				     );
+
+    log_printf(FUNC,Pattern_History_Table,"statistics","End");
+
+    return stat_print;
+      
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_transition.cpp	(revision 105)
@@ -0,0 +1,54 @@
+#ifdef SYSTEMC
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Pattern_History_Table::transition (void)
+  {
+    log_printf(FUNC,Pattern_History_Table,"transition","Begin");
+
+#ifdef STATISTICS
+    _stat->add();
+#endif    
+
+#ifdef VHDL_TESTBENCH
+    vhdl_testbench_transition ();
+#endif
+
+    log_printf(FUNC,Pattern_History_Table,"transition","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl.cpp	(revision 105)
@@ -0,0 +1,58 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Pattern_History_Table::vhdl (void)
+  {
+    log_printf(FUNC,Pattern_History_Table,"vhdl","Begin");
+
+    Vhdl * vhdl = new Vhdl (_name);
+
+    _interfaces->set_port     (vhdl);
+    _component ->vhdl_instance(vhdl);
+
+    vhdl_declaration (vhdl);
+    vhdl_body        (vhdl);
+
+    vhdl->generate_file();
+
+    delete vhdl;
+
+    log_printf(FUNC,Pattern_History_Table,"vhdl","End");
+
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_body.cpp	(revision 105)
@@ -0,0 +1,51 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Pattern_History_Table::vhdl_body (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Pattern_History_Table,"vhdl_body","Begin");
+
+//     vhdl->set_body ("-- Output : always at '1'");
+//     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+//       vhdl->set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" <= '1';");
+//     for (uint32_t i=0; i<_param._nb_prediction     ; i++)
+//       vhdl->set_body ("out_PREDICT_ACK_"+toString(i)+"         <= '1';");
+//     vhdl->set_body ("");
+
+    log_printf(FUNC,Pattern_History_Table,"vhdl_body","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_declaration.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_declaration.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_declaration.cpp	(revision 105)
@@ -0,0 +1,44 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Pattern_History_Table::vhdl_declaration (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Pattern_History_Table,"vhdl_declaration","Begin");
+
+    log_printf(FUNC,Pattern_History_Table,"vhdl_declaration","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_testbench_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Pattern_History_Table_vhdl_testbench_transition.cpp	(revision 105)
@@ -0,0 +1,48 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Pattern_History_Table::vhdl_testbench_transition ()
+  {
+    log_printf(FUNC,Pattern_History_Table,"vhdl_testbench_transition","Begin");
+
+//     sc_start(0);
+
+    _interfaces->testbench();
+
+    log_printf(FUNC,Pattern_History_Table,"vhdl_testbench_transition","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics.cpp	(revision 105)
@@ -0,0 +1,55 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  Statistics::Statistics (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  ) :
+    morpheo::behavioural::Statistics(name                  ,
+				     parameters_statistics ),
+    _parameters(parameters)
+  {
+    log_printf(FUNC,Pattern_History_Table,"Statistics","Begin");
+    log_printf(FUNC,Pattern_History_Table,"Statistics","End");
+  };
+  
+  Statistics::~Statistics () 
+  { 
+    log_printf(FUNC,Pattern_History_Table,"~Statistics","Begin");
+    log_printf(FUNC,Pattern_History_Table,"~Statistics","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_add.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_add.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_add.cpp	(revision 105)
@@ -0,0 +1,46 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  void Statistics::add ()
+  {
+    log_printf(FUNC,Pattern_History_Table,"add","Begin");
+    log_printf(FUNC,Pattern_History_Table,"add","End");
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_print.cpp	(revision 105)
@@ -0,0 +1,78 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  string Statistics::print (uint32_t depth ,
+			    string component_stat)
+  {
+    log_printf(FUNC,Pattern_History_Table,"print","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "<pattern_history_table name=\"" << _name << "\" >" << endl
+        << print_body(depth+1)
+	<< component_stat
+	<< tab << "</pattern_history_table>" << endl;
+    
+    log_printf(FUNC,Pattern_History_Table,"print","End");
+
+    return msg.str();
+  };
+
+  string Statistics::print (uint32_t depth)
+  {
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "<pattern_history_table name=\"" << _name << "\" >" << endl
+	<< print_body(depth+1) << endl
+	<< tab << "</pattern_history_table>" << endl;
+    
+    return msg.str();
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Statistics & x)
+  {
+    output_stream << x.print(0);
+
+    return output_stream;
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_print_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_print_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Pattern_History_Table/src/Statistics_print_body.cpp	(revision 105)
@@ -0,0 +1,54 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace pattern_history_table {
+
+
+  string Statistics::print_body (uint32_t depth)
+  {
+    log_printf(FUNC,Pattern_History_Table,"print_body","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "";
+    
+    log_printf(FUNC,Pattern_History_Table,"print_body","End");
+
+    return msg.str();
+  };
+
+}; // end namespace pattern_history_table
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/Makefile	(revision 105)
@@ -0,0 +1,28 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_MORPHEO			= ../../../../../../../../..
+LIBRARY				= $(Two_Level_Branch_Predictor_LIBRARY)
+
+DIR_LIBRARY			= $(Two_Level_Branch_Predictor_DIR_LIBRARY)
+
+#-----[ include ]------------------------------------------
+
+all				:
+				@$(MAKE) all_selftest
+
+library				: Two_Level_Branch_Predictor_library
+
+library_clean			: Two_Level_Branch_Predictor_library_clean
+
+include                         ../Makefile.deps
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Selftest
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Synthesis
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/config0.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/config0.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/config0.cfg	(revision 105)
@@ -0,0 +1,11 @@
+Two_Level_Branch_Predictor
+0	1	+1	# have_bht           
+4	4	+1	# bht_size_shifter   
+32	32	*2	# bht_nb_shifter     
+1	1	+1	# have_pht           
+8	8	+1	# pht_size_counter   
+32	32	*2	# pht_nb_counter     
+2	2	+1	# pht_size_address_share
+16	16	+1	# size_address      
+1	2	+1	# nb_prediction     
+1	2	+1	# nb_branch_complete
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/config1.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/config1.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/config1.cfg	(revision 105)
@@ -0,0 +1,11 @@
+Two_Level_Branch_Predictor
+1	1	+1	# have_bht           
+4	4	+1	# bht_size_shifter   
+32	32	*2	# bht_nb_shifter     
+0	1	+1	# have_pht           
+8	8	+1	# pht_size_counter   
+32	32	*2	# pht_nb_counter     
+2	2	+1	# pht_size_address_share
+16	16	+1	# size_address      
+1	2	+1	# nb_prediction     
+1	2	+1	# nb_branch_complete
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/include/test.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/include/test.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/include/test.h	(revision 105)
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "RegisterFile"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <string>
+#include <iostream>
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor;
+
+void test   (string name,
+	     morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters param);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/src/main.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/src/main.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/src/main.cpp	(revision 105)
@@ -0,0 +1,83 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h"
+
+#define NB_PARAMS 10
+
+void usage (string exec)
+{
+  cerr << "<Usage> " << exec << " name_instance list_params" << endl
+       << "list_params is :" << endl
+       << " - have_bht               (boolean     )" << endl
+       << " - bht_size_shifter       (unsigned int)" << endl
+       << " - bht_nb_shifter         (unsigned int)" << endl
+       << " - have_pht               (boolean     )" << endl
+       << " - pht_size_counter       (unsigned int)" << endl
+       << " - pht_nb_counter         (unsigned int)" << endl
+       << " - pht_size_address_share (unsigned int)" << endl
+       << " - size_address           (unsigned int)" << endl
+       << " - nb_prediction          (unsigned int)" << endl
+       << " - nb_branch_complete     (unsigned int)" << endl;
+
+  exit (1);
+}
+
+#ifndef SYSTEMC
+int main    (int argc, char * argv[])
+#else
+int sc_main (int argc, char * argv[])
+#endif
+{
+  cout << "<test0> : Classic usage" << endl;
+
+  if (argc != 2+NB_PARAMS)
+    usage (argv[0]);
+  
+  const string   name                     = argv[1];
+  const bool     have_bht                 = atoi(argv[ 2]);
+  const uint32_t bht_size_shifter         = atoi(argv[ 3]);
+  const uint32_t bht_nb_shifter           = atoi(argv[ 4]);
+  const bool     have_pht                 = atoi(argv[ 5]);
+  const uint32_t pht_size_counter         = atoi(argv[ 6]);
+  const uint32_t pht_nb_counter           = atoi(argv[ 7]);
+  const uint32_t pht_size_address_share   = atoi(argv[ 8]);
+  const uint32_t size_address             = atoi(argv[ 9]);
+  const uint32_t nb_prediction            = atoi(argv[10]);
+  const uint32_t nb_branch_complete       = atoi(argv[11]);
+
+  try 
+    {
+      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters param (have_bht               ,
+														     bht_size_shifter       ,
+														     bht_nb_shifter         ,
+														     have_pht               ,
+														     pht_size_counter       ,
+														     pht_nb_counter         ,
+														     pht_size_address_share ,
+														     size_address           ,
+														     nb_prediction          ,
+														     nb_branch_complete     );
+      
+      cout << param.print(1);
+      
+      test (name,param);
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      cout << "<" << name << "> : " <<  error.what ();
+      exit (EXIT_FAILURE);
+    }
+  catch (...)
+    {
+      cerr << "<" << name << "> : This test must generate a error" << endl;
+      exit (EXIT_FAILURE);
+    }
+
+  return (EXIT_SUCCESS);
+}
+
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/src/test.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/SelfTest/src/test.cpp	(revision 105)
@@ -0,0 +1,307 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#define NB_ITERATION 512
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/SelfTest/include/test.h"
+#include "Common/include/Test.h"
+#include "Common/include/BitManipulation.h"
+void test (string name,
+	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters param)
+{
+  cout << "<" << name << "> : Simulation SystemC" << endl;
+
+  Two_Level_Branch_Predictor * _Two_Level_Branch_Predictor = new Two_Level_Branch_Predictor (name.c_str(),
+#ifdef STATISTICS
+					     morpheo::behavioural::Parameters_Statistics(5,50),
+#endif
+					     param);
+  
+#ifdef SYSTEMC
+
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  sc_clock                              *  CLOCK;
+  sc_signal<Tcontrol_t>                 *  NRESET;
+
+  sc_signal<Tcontrol_t>                 *  PREDICT_VAL                 [param._nb_prediction];
+  sc_signal<Tcontrol_t>                 *  PREDICT_ACK                 [param._nb_prediction];
+  sc_signal<Taddress_t>                 *  PREDICT_ADDRESS             [param._nb_prediction];
+  sc_signal<Tbht_history_t>             *  PREDICT_BHT_HISTORY         [param._nb_prediction];
+  sc_signal<Tpht_history_t>             *  PREDICT_PHT_HISTORY         [param._nb_prediction];
+				      	 
+  sc_signal<Tcontrol_t>                 *  BRANCH_COMPLETE_VAL         [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                 *  BRANCH_COMPLETE_ACK         [param._nb_branch_complete];
+  sc_signal<Taddress_t>                 *  BRANCH_COMPLETE_ADDRESS     [param._nb_branch_complete];
+  sc_signal<Tbht_history_t>             *  BRANCH_COMPLETE_BHT_HISTORY [param._nb_branch_complete];
+  sc_signal<Tpht_history_t>             *  BRANCH_COMPLETE_PHT_HISTORY [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                 *  BRANCH_COMPLETE_DIRECTION   [param._nb_branch_complete];
+
+  // Rename signal
+
+  string rename;
+
+  CLOCK  = new sc_clock              ("clock", 1.0, 0.5);
+  NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    {
+      rename = "PREDICT_VAL_"        +toString(i);
+      PREDICT_VAL                 [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "PREDICT_ACK_"        +toString(i);
+      PREDICT_ACK                 [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "PREDICT_ADDRESS_"    +toString(i);
+      PREDICT_ADDRESS             [i] = new sc_signal<Taddress_t>     (rename.c_str());
+      rename = "PREDICT_BHT_HISTORY_"+toString(i);
+      PREDICT_BHT_HISTORY         [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+      rename = "PREDICT_PHT_HISTORY_"+toString(i);
+      PREDICT_PHT_HISTORY         [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+    }
+  
+  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+    {
+      rename = "BRANCH_COMPLETE_VAL_"        +toString(i);
+      BRANCH_COMPLETE_VAL         [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "BRANCH_COMPLETE_ACK_"        +toString(i);
+      BRANCH_COMPLETE_ACK         [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+      rename = "BRANCH_COMPLETE_ADDRESS_"    +toString(i);
+      BRANCH_COMPLETE_ADDRESS     [i] = new sc_signal<Taddress_t>     (rename.c_str());
+      rename = "BRANCH_COMPLETE_BHT_HISTORY_"+toString(i);
+      BRANCH_COMPLETE_BHT_HISTORY [i] = new sc_signal<Tbht_history_t> (rename.c_str());
+      rename = "BRANCH_COMPLETE_PHT_HISTORY_"+toString(i);
+      BRANCH_COMPLETE_PHT_HISTORY [i] = new sc_signal<Tpht_history_t> (rename.c_str());
+      rename = "BRANCH_COMPLETE_DIRECTION_"  +toString(i);
+      BRANCH_COMPLETE_DIRECTION   [i] = new sc_signal<Tcontrol_t>     (rename.c_str());
+    }
+
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  cout << "<" << name << "> Instanciation of _Two_Level_Branch_Predictor" << endl;
+  
+  (*(_Two_Level_Branch_Predictor->in_CLOCK ))        (*(CLOCK ));
+  (*(_Two_Level_Branch_Predictor->in_NRESET))        (*(NRESET));
+  
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    {
+      (*(_Two_Level_Branch_Predictor-> in_PREDICT_VAL                 [i])) (*(PREDICT_VAL                  [i]));
+      (*(_Two_Level_Branch_Predictor->out_PREDICT_ACK                 [i])) (*(PREDICT_ACK                  [i]));
+      (*(_Two_Level_Branch_Predictor-> in_PREDICT_ADDRESS             [i])) (*(PREDICT_ADDRESS              [i]));
+      if (param._have_bht)						       				       
+      (*(_Two_Level_Branch_Predictor->out_PREDICT_BHT_HISTORY         [i])) (*(PREDICT_BHT_HISTORY          [i]));
+      if (param._have_pht)
+      (*(_Two_Level_Branch_Predictor->out_PREDICT_PHT_HISTORY         [i])) (*(PREDICT_PHT_HISTORY          [i]));
+    }
+
+    for (uint32_t i=0; i<param._nb_branch_complete; i++)
+      {
+	(*(_Two_Level_Branch_Predictor-> in_BRANCH_COMPLETE_VAL         [i])) (*(BRANCH_COMPLETE_VAL          [i]));
+	(*(_Two_Level_Branch_Predictor->out_BRANCH_COMPLETE_ACK         [i])) (*(BRANCH_COMPLETE_ACK          [i]));
+	(*(_Two_Level_Branch_Predictor-> in_BRANCH_COMPLETE_ADDRESS     [i])) (*(BRANCH_COMPLETE_ADDRESS      [i]));
+	if (param._have_bht)						       					
+	(*(_Two_Level_Branch_Predictor-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(BRANCH_COMPLETE_BHT_HISTORY  [i]));
+	if (param._have_pht)						       					
+	(*(_Two_Level_Branch_Predictor-> in_BRANCH_COMPLETE_PHT_HISTORY [i])) (*(BRANCH_COMPLETE_PHT_HISTORY  [i]));
+	(*(_Two_Level_Branch_Predictor-> in_BRANCH_COMPLETE_DIRECTION   [i])) (*(BRANCH_COMPLETE_DIRECTION    [i]));
+      }
+
+  /********************************************************
+   * Simulation - Begin
+   ********************************************************/
+
+  cout << "<" << name << "> Start Simulation ............" << endl;
+  // Initialisation
+
+  const uint32_t seed = 0;
+//const uint32_t seed = static_cast<uint32_t>(time(NULL));
+
+  srand(seed);
+
+  const uint32_t   num_port_predict         = rand()%param._nb_prediction;
+  const uint32_t   num_port_branch_complete = rand()%param._nb_branch_complete;
+  const Taddress_t address                  = rand()%param._size_address;
+        Tcontrol_t direction;
+
+  sc_start(0);
+
+  NRESET->write(0);
+  sc_start(5);
+  NRESET->write(1);
+
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    PREDICT_VAL                  [i]->write(0);
+  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+    BRANCH_COMPLETE_VAL          [i]->write(0);
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
+
+  // Step 1
+  BRANCH_COMPLETE_VAL          [num_port_branch_complete]->write(1);
+  BRANCH_COMPLETE_DIRECTION    [num_port_branch_complete]->write(0);
+
+  if (param._have_pht)						       					
+    {
+      // Step 1.1 -> pattern_history_table
+
+      // Step 1.1.1 compute number of group.
+      uint32_t size_address_shift=0;
+
+      if (param._have_bht)
+	size_address_shift=param._param_two_level_branch_predictor_glue->_pht_size_address_shift;
+
+      uint32_t nb_group        = (1<<size_address_shift);
+      uint32_t nb_reg_by_group = (1<<(param._pht_size_address-size_address_shift));
+
+//       cout << "pht_size_address           : " << param._pht_size_address << endl;
+//       cout << "size_address_shift         : " << size_address_shift << endl;
+//       cout << "nb_group                   : " << nb_group           << endl;
+//       cout << "nb_reg_by_group            : " << nb_reg_by_group    << endl;
+
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init pht" << endl;
+      
+      BRANCH_COMPLETE_PHT_HISTORY  [num_port_branch_complete]->write(0);
+
+      // Step 1.1.2 for all group ...
+      for (uint32_t i=0; i<nb_group; i++)
+	{
+	  if (param._have_bht)
+	    BRANCH_COMPLETE_BHT_HISTORY  [num_port_branch_complete]->write(i);
+
+	  for (uint32_t j=0; j<nb_reg_by_group; j++)
+	    {
+	      cout << "j : " << j << " on " << nb_reg_by_group << endl;
+	      BRANCH_COMPLETE_ADDRESS [num_port_branch_complete]->write(j);
+
+	      sc_start(1);
+
+	      // wait ackwolegde
+	      while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0)
+		{
+		  sc_start(1);
+		}
+	    }
+	}
+    }
+
+  if (param._have_bht)						       					
+    {
+      // Step 1.2 -> branch_history_table
+      BRANCH_COMPLETE_BHT_HISTORY  [num_port_branch_complete]->write(0);
+      
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Init bht" << endl;
+      
+      for (uint32_t i=0; i<param._bht_nb_shifter; i++)
+	{
+	  BRANCH_COMPLETE_ADDRESS [num_port_branch_complete]->write(i);
+
+	  sc_start(1);
+	}
+
+      // wait ackwolegde
+      while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0)
+	{
+	  sc_start(1);
+	}
+    }
+
+  // Step 2
+  BRANCH_COMPLETE_VAL          [num_port_branch_complete]->write(0);
+  PREDICT_ADDRESS              [num_port_predict        ]->write(address);
+  BRANCH_COMPLETE_ADDRESS      [num_port_branch_complete]->write(address);
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl
+       << " * predict_address : " << hex << address << dec << endl;
+  
+  // A lot of prediction
+  Tbht_history_t bht_history = 0;
+  Tpht_history_t pht_history [1<<param._bht_size_shifter];
+  
+  for (uint32_t i=0; i<static_cast<uint32_t>(1<<param._bht_size_shifter); i++)
+    pht_history [i] = 0;
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Predict          : bht_history " << bht_history << " - pht_history " << pht_history[bht_history] << endl; 
+
+
+      // Ask a new prediction
+      PREDICT_VAL                  [num_port_predict        ]->write(1);
+
+      sc_start(1);
+
+      // wait ackwolegde
+      while (PREDICT_ACK [num_port_predict] -> read() == 0)
+	{
+	  sc_start(1);
+	}
+      PREDICT_ACK                  [num_port_predict        ]->write(0);
+
+      sc_start(0);
+
+      // Test
+      cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Predict (Test)   : " << endl; 
+      if (param._have_bht)
+	{
+	  cout << "\tbht_history " << PREDICT_BHT_HISTORY[num_port_predict]->read() << endl;
+	  TEST(Tbht_history_t,bht_history             ,PREDICT_BHT_HISTORY[num_port_predict]->read());
+	}
+      if (param._have_pht)
+	{
+	  cout << "\tpht_history " << PREDICT_PHT_HISTORY[num_port_predict]->read() << endl;
+	  TEST(Tpht_history_t,pht_history[bht_history],PREDICT_PHT_HISTORY[num_port_predict]->read());
+	}
+
+      // update
+      direction = ((rand()%2)==1);
+
+      BRANCH_COMPLETE_VAL          [num_port_branch_complete]->write(1);
+      if (param._have_bht)
+      BRANCH_COMPLETE_BHT_HISTORY  [num_port_branch_complete]->write(bht_history             );
+
+
+      if (param._have_pht)
+      BRANCH_COMPLETE_PHT_HISTORY  [num_port_branch_complete]->write(pht_history[bht_history]);
+      BRANCH_COMPLETE_DIRECTION    [num_port_branch_complete]->write(direction);
+
+      if (param._have_pht)
+      if (direction == 0)
+	{
+	  if (pht_history[bht_history] > 0)
+	    pht_history[bht_history] --;
+	}
+      else
+	{
+	  if (pht_history[bht_history] < (static_cast<Tpht_history_t>(1<<param._pht_size_counter)-1))
+	    pht_history[bht_history] ++;
+	}
+
+      if (param._have_bht)
+      bht_history              = (((bht_history) << 1) | direction) & gen_mask<Tbht_history_t>(param._bht_size_shifter);
+
+      sc_start(1);
+
+      // wait ackwolegde
+      while (BRANCH_COMPLETE_ACK [num_port_branch_complete] -> read() == 0)
+	{
+	  sc_start(1);
+	}
+      BRANCH_COMPLETE_VAL          [num_port_branch_complete]->write(0);
+    }
+
+  /********************************************************
+   * Simulation - End
+   ********************************************************/
+
+  cout << "<" << name << "> ............ Stop Simulation" << endl;
+
+#endif
+
+  delete _Two_Level_Branch_Predictor;
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile	(revision 105)
@@ -0,0 +1,24 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= .
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ Library ]------------------------------------------
+LIBRARY				= $(DIR_LIB)/libTwo_Level_Branch_Predictor_Glue.a
+
+
+#-----[ include ]------------------------------------------
+
+all				: $(LIBRARY_NEED)
+				@$(MAKE) all_component
+
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Component
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.defs
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.defs	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.defs	(revision 105)
@@ -0,0 +1,11 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT_MORPHEO		= ../../../../../../../../..
+DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.deps
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.deps	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.deps	(revision 105)
@@ -0,0 +1,33 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+# DIR_MORPHEO must be defined
+
+Two_Level_Branch_Predictor_Glue			= yes
+
+ifndef Behavioural
+include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
+endif
+
+#-----[ Library ]------------------------------------------
+Two_Level_Branch_Predictor_Glue_LIBRARY		= 	-lTwo_Level_Branch_Predictor_Glue	\
+					$(Behavioural_LIBRARY)	
+
+Two_Level_Branch_Predictor_Glue_DIR_LIBRARY		=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/lib	\
+					$(Behavioural_DIR_LIBRARY)
+
+#-----[ Rules ]--------------------------------------------
+
+Two_Level_Branch_Predictor_Glue_library		: 
+				@\
+				$(MAKE) Behavioural_library;\
+				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue --makefile=Makefile;
+	
+Two_Level_Branch_Predictor_Glue_library_clean	: 
+				@\
+				$(MAKE) Behavioural_library_clean;\
+				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue --makefile=Makefile clean;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/Makefile	(revision 105)
@@ -0,0 +1,30 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_MORPHEO			= ../../../../../../../../../..
+
+LIBRARY				= $(Two_Level_Branch_Predictor_Glue_LIBRARY)
+
+DIR_LIBRARY			= $(Two_Level_Branch_Predictor_Glue_DIR_LIBRARY)
+
+#-----[ include ]------------------------------------------
+
+all				: library
+				@$(MAKE) all_selftest
+
+library				: Two_Level_Branch_Predictor_Glue_library
+
+library_clean			: Two_Level_Branch_Predictor_Glue_library_clean
+
+include                         ../Makefile.deps
+include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Selftest
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Synthesis
+
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config0.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config0.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config0.cfg	(revision 105)
@@ -0,0 +1,10 @@
+Two_Level_Branch_Predictor_Glue
+0	1	+1	# have_bht           
+11	11	+1	# bht_size_history   
+4	4	+1	# bht_size_address   
+1	1	+1	# have_pht           
+13	13	+1	# pht_size_address   
+2	2	+1	# pht_size_address_share
+16	16	+1	# size_address       
+2	2	+1	# nb_prediction      
+2	2	+1	# nb_branch_complete 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config1.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config1.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/config1.cfg	(revision 105)
@@ -0,0 +1,10 @@
+Two_Level_Branch_Predictor_Glue
+1	1	+1	# have_bht           
+11	11	+1	# bht_size_history   
+4	4	+1	# bht_size_address   
+0	1	+1	# have_pht           
+13	13	+1	# pht_size_address   
+0	2	+1	# pht_size_address_share
+16	16	+1	# size_address       
+1	2	+1	# nb_prediction      
+1	2	+1	# nb_branch_complete 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/configuration.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/configuration.cfg	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/configuration.cfg	(revision 105)
@@ -0,0 +1,10 @@
+Two_Level_Branch_Predictor_Glue
+1	1	+1	# have_bht           
+11	11	+1	# bht_size_history   
+4	4	+1	# bht_size_address   
+0	1	+1	# have_pht           
+13	13	+1	# pht_size_address   
+0	2	+1	# pht_size_address_share
+16	16	+1	# size_address       
+1	2	+1	# nb_prediction      
+1	2	+1	# nb_branch_complete 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h	(revision 105)
@@ -0,0 +1,29 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "RegisterFile"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <string>
+#include <iostream>
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor;
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor;
+
+using namespace morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue;
+
+void test   (string name,
+	     morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters param);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/main.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/main.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/main.cpp	(revision 105)
@@ -0,0 +1,62 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h"
+
+#define NB_PARAMS 9
+
+void usage (string exec)
+{
+  cerr << "<Usage> " << exec << " name_instance list_params" << endl
+       << "list_params is :" << endl
+       << " - have_bht               (boolean     )" << endl
+       << " - bht_size_history       (unsigned int)" << endl
+       << " - bht_size_address       (unsigned int)" << endl
+       << " - have_pht               (boolean     )" << endl
+       << " - pht_size_address       (unsigned int)" << endl
+       << " - pht_size_address_share (unsigned int)" << endl
+       << " - size_address           (unsigned int)" << endl
+       << " - nb_prediction          (unsigned int)" << endl
+       << " - nb_branch_complete     (unsigned int)" << endl;
+  exit (1);
+}
+
+#ifndef SYSTEMC
+int main    (int argc, char * argv[])
+#else
+int sc_main (int argc, char * argv[])
+#endif
+{
+  if (argc != 2+NB_PARAMS)
+    usage (argv[0]);
+
+  const string   name                     = argv[1];
+  const bool     have_bht                 = atoi(argv[ 2]);
+  const uint32_t bht_size_history         = atoi(argv[ 3]);
+  const uint32_t bht_size_address         = atoi(argv[ 4]);
+  const bool     have_pht                 = atoi(argv[ 5]);
+  const uint32_t pht_size_address         = atoi(argv[ 6]);
+  const uint32_t pht_size_address_share   = atoi(argv[ 7]);
+  const uint32_t size_address             = atoi(argv[ 8]);
+  const uint32_t nb_prediction            = atoi(argv[ 9]);
+  const uint32_t nb_branch_complete       = atoi(argv[10]);
+
+  morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters param (have_bht              ,
+																		  bht_size_history      ,
+																		  bht_size_address      ,
+																		  have_pht              ,
+																		  pht_size_address      ,
+																		  pht_size_address_share,
+																		  size_address          ,
+																		  nb_prediction         ,
+																		  nb_branch_complete    );
+
+  test (name,param);
+
+  return (EXIT_SUCCESS);
+}
+
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp	(revision 105)
@@ -0,0 +1,251 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#define NB_ITERATION 64
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/include/test.h"
+#include "Common/include/BitManipulation.h"
+#include "Common/include/Test.h"
+
+void test (string name,
+	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters param)
+{
+  cout << "<" << name << "> : Simulation SystemC" << endl;
+
+  try 
+    {
+      cout << param.print(1);
+      param.test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      cout << "<" << name << "> : " <<  error.what ();
+      return;
+    }
+  catch (...)
+    {
+      cerr << "<" << name << "> : This test must generate a error" << endl;
+      exit (EXIT_FAILURE);
+    }
+  Two_Level_Branch_Predictor_Glue * _Two_Level_Branch_Predictor_Glue = new Two_Level_Branch_Predictor_Glue (name.c_str(),
+#ifdef STATISTICS
+					     morpheo::behavioural::Parameters_Statistics(5,50),
+#endif
+					     param);
+  
+#ifdef SYSTEMC
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  sc_clock                                 CLOCK ("clock", 1.0, 0.5);
+  sc_signal<Tcontrol_t>                    NRESET;
+
+  sc_signal<Tcontrol_t>                    PREDICT_BHT_ACK             [param._nb_prediction];
+  sc_signal<Tcontrol_t>                    PREDICT_PHT_ACK             [param._nb_prediction];
+  sc_signal<Tcontrol_t>                    PREDICT_ACK                 [param._nb_prediction];
+  				           
+  sc_signal<Taddress_t>                    PREDICT_ADDRESS             [param._nb_prediction];
+  sc_signal<Tbht_history_t>                PREDICT_BHT_HISTORY         [param._nb_prediction];
+  sc_signal<Taddress_t>                    PREDICT_BHT_ADDRESS         [param._nb_prediction];
+  sc_signal<Taddress_t>                    PREDICT_PHT_ADDRESS         [param._nb_prediction];
+  				           
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_BHT_ACK     [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_PHT_ACK     [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_ACK         [param._nb_branch_complete];
+  sc_signal<Taddress_t>                    BRANCH_COMPLETE_ADDRESS     [param._nb_branch_complete];
+  sc_signal<Tbht_history_t>                BRANCH_COMPLETE_BHT_HISTORY [param._nb_branch_complete];
+  sc_signal<Taddress_t>                    BRANCH_COMPLETE_BHT_ADDRESS [param._nb_branch_complete];
+  sc_signal<Taddress_t>                    BRANCH_COMPLETE_PHT_ADDRESS [param._nb_branch_complete];
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  cout << "<" << name << "> Instanciation of _Two_Level_Branch_Predictor_Glue" << endl;
+  
+  (*(_Two_Level_Branch_Predictor_Glue->in_CLOCK))        (CLOCK);
+  (*(_Two_Level_Branch_Predictor_Glue->in_NRESET))       (NRESET);
+
+  for (uint32_t i=0; i<param._nb_prediction; i++)
+    {
+      if (param._have_bht)
+	{
+      (*(_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_ACK             [i])) (PREDICT_BHT_ACK             [i]);
+      (*(_Two_Level_Branch_Predictor_Glue->out_PREDICT_BHT_ADDRESS         [i])) (PREDICT_BHT_ADDRESS         [i]);
+	}
+      if (param._have_bht and param._have_pht)
+      (*(_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_HISTORY         [i])) (PREDICT_BHT_HISTORY         [i]);
+      if (param._have_pht)
+	{
+      (*(_Two_Level_Branch_Predictor_Glue-> in_PREDICT_PHT_ACK             [i])) (PREDICT_PHT_ACK             [i]);
+      (*(_Two_Level_Branch_Predictor_Glue->out_PREDICT_PHT_ADDRESS         [i])) (PREDICT_PHT_ADDRESS         [i]);
+	}
+      (*(_Two_Level_Branch_Predictor_Glue->out_PREDICT_ACK                 [i])) (PREDICT_ACK                 [i]);
+      (*(_Two_Level_Branch_Predictor_Glue-> in_PREDICT_ADDRESS             [i])) (PREDICT_ADDRESS             [i]);
+    }
+  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+    {
+      if (param._have_bht)
+	{
+      (*(_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_ACK     [i])) (BRANCH_COMPLETE_BHT_ACK     [i]);
+      (*(_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_BHT_ADDRESS [i])) (BRANCH_COMPLETE_BHT_ADDRESS [i]);
+	}
+      if (param._have_bht and param._have_pht)
+      (*(_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (BRANCH_COMPLETE_BHT_HISTORY [i]);
+
+      if (param._have_pht)
+	{
+      (*(_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_PHT_ACK     [i])) (BRANCH_COMPLETE_PHT_ACK     [i]);
+      (*(_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (BRANCH_COMPLETE_PHT_ADDRESS [i]);
+	}
+      (*(_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_ACK         [i])) (BRANCH_COMPLETE_ACK         [i]);
+      (*(_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_ADDRESS     [i])) (BRANCH_COMPLETE_ADDRESS     [i]);
+    }
+
+  /********************************************************
+   * Simulation - Begin
+   ********************************************************/
+
+  cout << "<" << name << "> Start Simulation ............" << endl;
+  // Initialisation
+
+  Tcontrol_t predict_bht_ack;
+  Tcontrol_t predict_pht_ack;
+
+  Tcontrol_t branch_complete_bht_ack;
+  Tcontrol_t branch_complete_pht_ack;
+  
+  srand(0);
+  //srand(time(NULL));
+
+  sc_start(0);
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
+
+  NRESET.write(1);
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Test ack" << endl;
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      // Branch History Table
+      if (param._have_bht)
+	{
+	  predict_bht_ack         = (rand()%2)!=0;
+	  branch_complete_bht_ack = (rand()%2)!=0;
+
+	}
+      else
+	{
+	  predict_bht_ack         = 1;
+	  branch_complete_bht_ack = 1;
+	}
+
+      // Pattern History Table
+      if (param._have_pht)
+	{
+	  predict_pht_ack         = (rand()%2)!=0;
+	  branch_complete_pht_ack = (rand()%2)!=0;
+	}
+      else
+	{
+	  predict_pht_ack         = 1;
+	  branch_complete_pht_ack = 1;
+	}
+      
+      for (uint32_t i=0; i<param._nb_prediction;      i++)
+	{
+	  PREDICT_BHT_ACK         [i] .write(predict_bht_ack);
+	  PREDICT_PHT_ACK         [i] .write(predict_pht_ack);
+	}
+      
+      for (uint32_t i=0; i<param._nb_branch_complete; i++)
+	{
+	  BRANCH_COMPLETE_BHT_ACK [i] .write(branch_complete_bht_ack);
+	  BRANCH_COMPLETE_PHT_ACK [i] .write(branch_complete_pht_ack);
+	}
+      
+      sc_start(0);
+
+      // Test result
+      for (uint32_t i=0; i<param._nb_prediction;      i++)
+	TEST(Tcontrol_t,(predict_pht_ack & predict_bht_ack),PREDICT_ACK [i].read());
+
+      for (uint32_t i=0; i<param._nb_branch_complete;      i++)
+	TEST(Tcontrol_t,(branch_complete_pht_ack & branch_complete_bht_ack),BRANCH_COMPLETE_ACK [i].read());
+
+      sc_start(1);
+    }
+
+  Taddress_t     predict_address;
+  Tbht_history_t predict_bht_history;
+  Taddress_t     branch_complete_address;
+  Tbht_history_t branch_complete_bht_history;
+
+
+  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Test address" << endl;
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      predict_address             = rand()%(1<<param._size_address    );
+      predict_bht_history         = 0;
+      branch_complete_address     = rand()%(1<<param._size_address    );
+      branch_complete_bht_history = 0;
+
+      for (uint32_t i=0; i<param._nb_prediction; i++)
+	PREDICT_ADDRESS         [i].write (predict_address);
+      for (uint32_t i=0; i<param._nb_branch_complete; i++)
+	BRANCH_COMPLETE_ADDRESS [i].write (branch_complete_address);
+
+      // Branch History Table
+      if (param._have_bht and param._have_pht)
+	{
+	  predict_bht_history         = rand()%(1<<param._bht_size_history);
+	  branch_complete_bht_history = rand()%(1<<param._bht_size_history);
+	  
+	  for (uint32_t i=0; i<param._nb_prediction; i++)
+	    PREDICT_BHT_HISTORY         [i].write(predict_bht_history);
+	  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+	    BRANCH_COMPLETE_BHT_HISTORY [i].write(branch_complete_bht_history);
+	}
+
+      sc_start(0);
+
+      // Branch History Table
+      if (param._have_bht)
+	{
+	  for (uint32_t i=0; i<param._nb_prediction; i++)
+	    TEST(Taddress_t,PREDICT_BHT_ADDRESS [i].read(),(predict_address & gen_mask<Taddress_t>(param._bht_size_address)));
+
+	  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+	    TEST(Taddress_t,BRANCH_COMPLETE_BHT_ADDRESS [i].read(),(branch_complete_address & gen_mask<Taddress_t>(param._bht_size_address)));
+	}
+
+      // Pattern History Table
+      if (param._have_pht)
+	{
+	  uint32_t shift = (param._have_bht==false)?0:(param._pht_size_address_shift);
+
+	  for (uint32_t i=0; i<param._nb_prediction; i++)
+	    TEST(Taddress_t,PREDICT_PHT_ADDRESS [i].read(),(((predict_address << shift) xor predict_bht_history) & gen_mask<Taddress_t>(param._pht_size_address)));
+	  for (uint32_t i=0; i<param._nb_branch_complete; i++)
+	    TEST(Taddress_t,BRANCH_COMPLETE_PHT_ADDRESS [i].read(), (((branch_complete_address << shift) xor branch_complete_bht_history) & gen_mask<Taddress_t>(param._pht_size_address)));
+	}
+
+      sc_start(1);	  
+    }
+  /********************************************************
+   * Simulation - End
+   ********************************************************/
+
+  cout << "<" << name << "> ............ Stop Simulation" << endl;
+
+#endif
+
+  delete _Two_Level_Branch_Predictor_Glue;
+}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/Makefile	(revision 105)
@@ -0,0 +1,19 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= ..
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ include ]------------------------------------------
+
+all				:
+				$(MAKE) all_documentation
+
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Documentation
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/Two_Level_Branch_Predictor_Glue.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/Two_Level_Branch_Predictor_Glue.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/Two_Level_Branch_Predictor_Glue.tex	(revision 105)
@@ -0,0 +1,38 @@
+\documentclass[10pt,a4paper,twocolumn]{article}
+
+\def\dirdoc{tex}
+\def\dirschema{eps}
+
+% Package de variables d'environnement : Titre, command etc ...
+\usepackage{../../../../../../../../../../Behavioural/doc/sty/doc-style}
+\usepackage{sty/header}
+
+
+%------------------------------------------------------------------------------
+% Début document
+%------------------------------------------------------------------------------
+
+\pagestyle{empty}
+
+\begin{document}
+
+% Créez une page de titre
+\maketitle
+\thispagestyle{empty}
+
+%Table des matières et des figures
+%\tableofcontents
+%\newpage
+%\listoffigures
+
+%------------------------------------------------------------------------------
+% Ajout du corps du documents
+%------------------------------------------------------------------------------
+
+\input{tex/root}
+
+%------------------------------------------------------------------------------
+% Fin d'ajout du corps du document
+%------------------------------------------------------------------------------
+
+\end{document}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/sty/header.sty
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/sty/header.sty	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/sty/header.sty	(revision 105)
@@ -0,0 +1,12 @@
+\def\review{YYYY/MM/DD}
+%\def\review{\number\day/\number\month/\number\year\xspace}
+
+\title{Two\_Level\_Branch\_Predictor\_Glue}
+ 
+\author{}
+
+\affiliation{}
+
+\email{}
+
+\date{\review}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/01_introduction.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/01_introduction.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/01_introduction.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Introduction}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/02_features.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/02_features.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/02_features.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Features}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/03_description.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/03_description.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/03_description.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Functional Description}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/04_pinout.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/04_pinout.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/04_pinout.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Pin out}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/05_parameters.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/05_parameters.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/05_parameters.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Parameters}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/06_performance.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/06_performance.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/06_performance.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Performance}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/07_details.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/07_details.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/07_details.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Details}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/08_history.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/08_history.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/08_history.tex	(revision 105)
@@ -0,0 +1,10 @@
+\Section{Revision History}
+
+\begin{tabular}{|c|c|c|}
+\hline
+Revision Date & By  & Modifications\\
+\hline
+\hline
+yyyy/mm/dd    & xxx & Initial document \\
+\hline
+\end{tabular}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/root.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/root.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/doc/tex/root.tex	(revision 105)
@@ -0,0 +1,8 @@
+\input{\dirdoc/01_introduction}
+\input{\dirdoc/02_features}
+\input{\dirdoc/03_description}
+\input{\dirdoc/04_pinout}
+\input{\dirdoc/05_parameters}
+\input{\dirdoc/06_performance}
+\input{\dirdoc/07_details}
+\input{\dirdoc/08_history}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h	(revision 105)
@@ -0,0 +1,77 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Parameters_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Parameters_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Parameters.h"
+#include <math.h>
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  class Parameters : public morpheo::behavioural::Parameters
+  {
+    //-----[ fields ]------------------------------------------------------------
+  public : const bool     _have_bht              ;
+  public : const uint32_t _bht_size_history      ;
+  public : const uint32_t _bht_size_address      ;
+  public : const bool     _have_pht              ;
+  public : const uint32_t _pht_size_address      ;
+  public : const uint32_t _pht_size_address_share;
+  public : const uint32_t _size_address          ;
+  public : const uint32_t _nb_prediction         ;
+  public : const uint32_t _nb_branch_complete    ;
+  public : const uint32_t _pht_size_address_shift;
+
+    //-----[ methods ]-----------------------------------------------------------
+  public : Parameters  (bool     have_bht              ,
+			uint32_t bht_size_history      ,
+			uint32_t bht_size_address      ,
+			bool     have_pht              ,
+			uint32_t pht_size_address      ,
+			uint32_t pht_size_address_share,
+			uint32_t size_address          ,
+			uint32_t nb_prediction         ,
+			uint32_t nb_branch_complete    );
+
+  public : Parameters  (Parameters & param) ;
+  public : ~Parameters () ;
+
+  public : string msg_error (void);
+
+  public :        string   print      (uint32_t depth);
+  public : friend ostream& operator<< (ostream& output_stream,
+				       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters & x);
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h	(revision 105)
@@ -0,0 +1,70 @@
+#ifdef STATISTICS
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Statistics_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Statistics_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Statistics.h"
+#include "Behavioural/include/Parameters_Statistics.h"
+//#include "Behavioural/Generic/Group/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
+
+//using namespace morpheo::behavioural::generic::group;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  class Statistics : public morpheo::behavioural::Statistics
+  {
+    // -----[ fields ]----------------------------------------------------
+  private  : const Parameters                                   _parameters;
+
+    // -----[ methods ]---------------------------------------------------
+  public   : Statistics  (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  );
+//public   : Statistics  (Statistics & stat);
+  public   : ~Statistics () ;
+    
+  public   : string   print_body (uint32_t depth);
+  public   : string   print      (uint32_t depth);
+  public   : void     add        ();
+
+  public   : friend ostream& operator<< (ostream& output_stream,
+					 const Statistics & x);
+
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h	(revision 105)
@@ -0,0 +1,157 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Two_Level_Branch_Predictor_Glue_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Two_Level_Branch_Predictor_Glue_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <iostream>
+#include "Common/include/ToString.h"
+#include "Common/include/Debug.h"
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h"
+#ifdef STATISTICS
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h"
+#endif
+#ifdef VHDL
+#include "Behavioural/include/Vhdl.h"
+#endif
+#include "Behavioural/include/Component.h"
+
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  class Two_Level_Branch_Predictor_Glue 
+#if SYSTEMC
+    : public sc_module
+#endif
+  {
+    // -----[ fields ]----------------------------------------------------
+    // Parameters
+  protected : const string     _name;
+
+  protected : const Parameters _param;
+//#ifdef STATISTICS
+//protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
+//#endif
+
+#ifdef STATISTICS
+  private   : Statistics                     * _stat;
+#endif
+
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
+
+#ifdef SYSTEMC
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Interface
+  public    : SC_CLOCK                      *  in_CLOCK                      ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET                     ;
+
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_BHT_ACK            ;
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_PHT_ACK            ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                ;
+					   
+  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS            ;
+  public    : SC_IN (Tbht_history_t)       **  in_PREDICT_BHT_HISTORY        ;
+  public    : SC_OUT(Taddress_t)           ** out_PREDICT_BHT_ADDRESS        ;
+  public    : SC_OUT(Taddress_t)           ** out_PREDICT_PHT_ADDRESS        ;
+					   
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_BHT_ACK    ;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_PHT_ACK    ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK        ;
+					   
+  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS    ;
+  public    : SC_IN (Tbht_history_t)       **  in_BRANCH_COMPLETE_BHT_HISTORY;
+  public    : SC_OUT(Taddress_t)           ** out_BRANCH_COMPLETE_BHT_ADDRESS;
+  public    : SC_OUT(Taddress_t)           ** out_BRANCH_COMPLETE_PHT_ADDRESS;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#endif
+
+    // -----[ methods ]---------------------------------------------------
+
+#ifdef SYSTEMC
+    SC_HAS_PROCESS (Two_Level_Branch_Predictor_Glue);
+#endif
+  public  :          Two_Level_Branch_Predictor_Glue              (
+#ifdef SYSTEMC
+								   sc_module_name                              name,
+#else					       
+								   string                                      name,
+#endif					       
+#ifdef STATISTICS
+								   morpheo::behavioural::Parameters_Statistics param_statistics,
+#endif
+								   Parameters                                  param );
+					       
+  public  :          Two_Level_Branch_Predictor_Glue              (Parameters param );
+  public  :          ~Two_Level_Branch_Predictor_Glue             (void);
+					       
+#ifdef SYSTEMC				       
+  private : void     allocation                (void);
+  private : void     deallocation              (void);
+					       
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+  public  : void     transition                            (void);
+#endif						           
+  public  : void     genMealy_predict_ack                  (void);
+  public  : void     genMealy_predict_bht_address          (void);
+  public  : void     genMealy_predict_pht_address          (void);
+  public  : void     genMealy_branch_complete_ack          (void);
+  public  : void     genMealy_branch_complete_bht_address  (void);
+  public  : void     genMealy_branch_complete_pht_address  (void);
+#endif					       
+
+#ifdef STATISTICS
+  public  : string   statistics                (uint32_t depth);
+#endif
+#if VHDL				       
+  public  : void     vhdl                      (void);
+  private : void     vhdl_declaration          (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
+#endif					       
+#ifdef VHDL_TESTBENCH			       
+  private : void     vhdl_testbench_transition (void);
+#endif
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h	(revision 105)
@@ -0,0 +1,44 @@
+#ifdef SYSTEMC
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Type_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_two_level_branch_predictor_glue_Type_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Types.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+  typedef uint32_t Taddress_t    ;
+  typedef uint32_t Tbht_history_t;
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters.cpp	(revision 105)
@@ -0,0 +1,82 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  Parameters::Parameters (bool     have_bht               ,
+			  uint32_t bht_size_history       ,
+			  uint32_t bht_size_address       ,
+			  bool     have_pht               ,
+			  uint32_t pht_size_address       ,
+			  uint32_t pht_size_address_share ,
+			  uint32_t size_address           ,
+			  uint32_t nb_prediction          ,
+			  uint32_t nb_branch_complete     ):
+    _have_bht                (have_bht               ),
+    _bht_size_history        (bht_size_history       ),
+    _bht_size_address        (bht_size_address       ),
+    _have_pht                (have_pht               ),
+    _pht_size_address        (pht_size_address       ),
+    _pht_size_address_share  (pht_size_address_share ),
+    _size_address            (size_address           ),
+    _nb_prediction           (nb_prediction          ),
+    _nb_branch_complete      (nb_branch_complete     ),
+    _pht_size_address_shift  (bht_size_history-pht_size_address_share)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Parameters","Begin");
+    test();
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Parameters","End");
+  };
+  
+  Parameters::Parameters (Parameters & param):
+    _have_bht                (param._have_bht               ),
+    _bht_size_history        (param._bht_size_history       ),
+    _bht_size_address        (param._bht_size_address       ),
+    _have_pht                (param._have_pht               ),
+    _pht_size_address        (param._pht_size_address       ),
+    _pht_size_address_share  (param._pht_size_address_share ),
+    _size_address            (param._size_address           ),
+    _nb_prediction           (param._nb_prediction          ),
+    _nb_branch_complete      (param._nb_branch_complete     ),
+    _pht_size_address_shift  (param._pht_size_address_shift )
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Parameters","Begin");
+    test();
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Parameters","End");
+  };
+
+  Parameters::~Parameters () 
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"~Parameters","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"~Parameters","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_msg_error.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_msg_error.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_msg_error.cpp	(revision 105)
@@ -0,0 +1,61 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Types.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  string Parameters::msg_error(void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"msg_error","Begin");
+
+    string msg = "";
+    
+    if ((_have_bht and _have_pht) and (_pht_size_address_share >= _pht_size_address))
+      {
+	msg += "  - You can't have higher pht_size_address_share >= pht_size_address\n";
+	msg += "    * pht_size_address                : " + toString(_pht_size_address      ) + "\n";
+	msg += "    * pht_size_address_share          : " + toString(_pht_size_address_share) + "\n";
+      }
+    if ((_have_bht and _have_pht) and (_bht_size_history > _pht_size_address))
+      {
+	msg += "  - You can't have higher bht_size_history > pht_size_address\n";
+	msg += "    * bht_size_history                : " + toString(_bht_size_history      ) + "\n";
+	msg += "    * pht_size_address                : " + toString(_pht_size_address      ) + "\n";
+      }
+
+    return msg;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"msg_error","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Parameters_print.cpp	(revision 105)
@@ -0,0 +1,68 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  string Parameters::print (uint32_t depth)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"print","Begin");
+
+    string tab = string(depth,'\t');
+    ostringstream msg;
+    msg << tab << "<two_level_branch_predictor_glue>" << endl
+	<< tab << "\t<have_bht               value=\"" << _have_bht               << "\" />" << endl
+	<< tab << "\t<bht_size_history       value=\"" << _bht_size_history       << "\" />" << endl
+	<< tab << "\t<bht_size_address       value=\"" << _bht_size_address       << "\" />" << endl
+	<< tab << "\t<have_pht               value=\"" << _have_pht               << "\" />" << endl
+	<< tab << "\t<pht_size_address       value=\"" << _pht_size_address       << "\" />" << endl
+	<< tab << "\t<pht_size_address_share value=\"" << _pht_size_address_share << "\" /> <!-- Need " << _pht_size_address_shift << " bits to shift -->" << endl
+	<< tab << "\t<size_address           value=\"" << _size_address           << "\" />" << endl
+	<< tab << "\t<nb_prediction          value=\"" << _nb_prediction          << "\" />" << endl
+	<< tab << "\t<nb_branch_complete     value=\"" << _nb_branch_complete     << "\" />" << endl
+      	<< tab << "</two_level_branch_predictor_glue>" << endl;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"print","End");
+    
+    return msg.str();
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters & x)
+  {
+    output_stream << x.print(0);
+    
+    return output_stream;
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics.cpp	(revision 105)
@@ -0,0 +1,55 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  Statistics::Statistics (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  ) :
+    morpheo::behavioural::Statistics(name                  ,
+				     parameters_statistics ),
+    _parameters(parameters)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Statistics","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Statistics","End");
+  };
+  
+  Statistics::~Statistics () 
+  { 
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"~Statistics","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"~Statistics","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_add.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_add.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_add.cpp	(revision 105)
@@ -0,0 +1,46 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Statistics::add ()
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"add","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"add","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_print.cpp	(revision 105)
@@ -0,0 +1,64 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  string Statistics::print (uint32_t depth)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"print","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "<two_level_branch_predictor_glue name=\"" << _name << "\" >" << endl
+        << print_body(depth+1) << endl
+	<< tab << "</two_level_branch_predictor_glue>" << endl;
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"print","End");
+
+    return msg.str();
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Statistics & x)
+  {
+    output_stream << x.print(0);
+
+    return output_stream;
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_print_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_print_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Statistics_print_body.cpp	(revision 105)
@@ -0,0 +1,54 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  string Statistics::print_body (uint32_t depth)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"print_body","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "";
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"print_body","End");
+
+    return msg.str();
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp	(revision 105)
@@ -0,0 +1,214 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+#ifdef SYSTEMC
+  Two_Level_Branch_Predictor_Glue::Two_Level_Branch_Predictor_Glue (sc_module_name name,
+#else
+  Two_Level_Branch_Predictor_Glue::Two_Level_Branch_Predictor_Glue (string name,
+#endif
+#ifdef STATISTICS
+								    morpheo::behavioural::Parameters_Statistics             param_statistics,
+#endif
+								    morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters param ):
+								    _name              (name)
+								    ,_param            (param)
+// #ifdef STATISTICS
+//								    ,_param_statistics (param_statistics)
+// #endif
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Two_Level_Branch_Predictor_Glue","Begin");
+
+    allocation ();
+
+#ifdef STATISTICS
+    // Allocation of statistics
+    _stat = new Statistics (static_cast<string>(_name),
+			    param_statistics          ,
+			    param);
+#endif
+
+#ifdef VHDL
+    // generate the vhdl
+    vhdl();
+#endif
+
+#ifdef SYSTEMC
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+    SC_METHOD (transition);
+    dont_initialize ();
+    sensitive_pos << *(in_CLOCK);
+#endif
+
+    SC_METHOD (genMealy_predict_ack);
+    dont_initialize ();
+    sensitive_neg << *(in_CLOCK);
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._have_bht)
+	sensitive << (*(in_PREDICT_BHT_ACK     [i]));
+	if (_param._have_pht)
+	sensitive << (*(in_PREDICT_PHT_ACK     [i]));
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	if (_param._have_bht)
+	  (*(out_PREDICT_ACK         [i])) (*(in_PREDICT_BHT_ACK     [i]));
+	if (_param._have_pht)
+	  (*(out_PREDICT_ACK         [i])) (*(in_PREDICT_PHT_ACK     [i]));
+      }
+#endif
+    
+    if (_param._have_bht)
+      {
+	SC_METHOD (genMealy_predict_bht_address);
+	dont_initialize ();
+	sensitive_neg << *(in_CLOCK);
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  sensitive << (*(in_PREDICT_ADDRESS     [i]));
+	
+#ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  (*(out_PREDICT_BHT_ADDRESS [i])) (*(in_PREDICT_ADDRESS     [i]));
+#endif
+      }
+
+    if (_param._have_pht)
+      {
+	SC_METHOD (genMealy_predict_pht_address);
+	dont_initialize ();
+	sensitive_neg << *(in_CLOCK);
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  {
+	    if (_param._have_bht)
+	      sensitive << (*(in_PREDICT_BHT_HISTORY [i]));
+	    sensitive << (*(in_PREDICT_ADDRESS     [i]));
+	  }
+	
+#ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  {
+	    (*(out_PREDICT_PHT_ADDRESS [i])) (*(in_PREDICT_ADDRESS     [i]));
+	    if (_param._have_bht)
+	      (*(out_PREDICT_PHT_ADDRESS [i])) (*(in_PREDICT_BHT_HISTORY [i]));
+	  }
+#endif
+      }
+
+    SC_METHOD (genMealy_branch_complete_ack);
+    dont_initialize ();
+    sensitive_neg << *(in_CLOCK);
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	if (_param._have_bht)
+	sensitive << (*(in_BRANCH_COMPLETE_BHT_ACK     [i]));
+	if (_param._have_pht)
+	sensitive << (*(in_BRANCH_COMPLETE_PHT_ACK     [i]));
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	if (_param._have_bht)
+	  (*(out_BRANCH_COMPLETE_ACK         [i])) (*(in_BRANCH_COMPLETE_BHT_ACK     [i]));
+	if (_param._have_pht)
+	  (*(out_BRANCH_COMPLETE_ACK         [i])) (*(in_BRANCH_COMPLETE_PHT_ACK     [i]));
+      }
+#endif
+    
+    if (_param._have_bht)
+      {
+	SC_METHOD (genMealy_branch_complete_bht_address);
+	dont_initialize ();
+	sensitive_neg << *(in_CLOCK);
+	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	  sensitive << (*(in_BRANCH_COMPLETE_ADDRESS     [i]));
+	
+#ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	  (*(out_BRANCH_COMPLETE_BHT_ADDRESS [i])) (*(in_BRANCH_COMPLETE_ADDRESS     [i]));
+#endif
+      }
+
+    if (_param._have_pht)
+      {
+	SC_METHOD (genMealy_branch_complete_pht_address);
+	dont_initialize ();
+	sensitive_neg << *(in_CLOCK);
+	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	  {
+	    if (_param._have_bht)
+	      sensitive << (*(in_BRANCH_COMPLETE_BHT_HISTORY [i]));
+	    sensitive << (*(in_BRANCH_COMPLETE_ADDRESS     [i]));
+	  }
+	
+#ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	  {
+	    (*(out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (*(in_BRANCH_COMPLETE_ADDRESS     [i]));
+	    if (_param._have_bht)
+	      (*(out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (*(in_BRANCH_COMPLETE_BHT_HISTORY [i]));
+	  }
+#endif
+      }
+
+#endif
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Two_Level_Branch_Predictor_Glue","End");
+  };
+  
+  Two_Level_Branch_Predictor_Glue::~Two_Level_Branch_Predictor_Glue (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"~Two_Level_Branch_Predictor_Glue","Begin");
+
+#ifdef STATISTICS
+    _stat->generate_file(statistics(0));
+    
+    delete _stat;
+#endif
+
+#ifdef SYSTEMC
+    deallocation ();
+#endif
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"~Two_Level_Branch_Predictor_Glue","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_allocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_allocation.cpp	(revision 105)
@@ -0,0 +1,163 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Two_Level_Branch_Predictor_Glue::allocation (void)
+  {
+    string rename;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"allocation","Begin");
+
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Two_Level_Branch_Predictor_Glue"
+#ifdef POSITION
+					     ,COMBINATORY
+#endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      Interface * interface = _interfaces->set_interface(""
+#ifdef POSITION
+							 , IN  
+							 , SOUTH
+							 , "Generalist interface"
+#endif
+							 );
+      
+      in_CLOCK              = interface->set_signal_clk              ("clock" ,1,CLOCK_VHDL_NO);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_NO);
+    }
+    
+    // ~~~~~[ Interface : "Predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    if (_param._have_bht)
+      {
+     in_PREDICT_BHT_ACK              = new SC_IN (Tcontrol_t)           * [_param._nb_prediction];
+    out_PREDICT_BHT_ADDRESS          = new SC_OUT(Taddress_t)           * [_param._nb_prediction];
+      }
+    if (_param._have_pht)
+      {
+     in_PREDICT_PHT_ACK              = new SC_IN (Tcontrol_t)           * [_param._nb_prediction];
+    out_PREDICT_PHT_ADDRESS          = new SC_OUT(Taddress_t)           * [_param._nb_prediction];
+      }
+    if (_param._have_bht and _param._have_pht)
+     in_PREDICT_BHT_HISTORY          = new SC_IN (Tbht_history_t)       * [_param._nb_prediction];
+    out_PREDICT_ACK                  = new SC_OUT(Tcontrol_t)           * [_param._nb_prediction];
+     in_PREDICT_ADDRESS              = new SC_IN (Taddress_t)           * [_param._nb_prediction];
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+								);
+
+	if (_param._have_bht)
+	  {
+         in_PREDICT_BHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("bht_ack"    ,1);
+        out_PREDICT_BHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("bht_address",_param._bht_size_address);
+	  }
+	if (_param._have_pht)
+	  {
+         in_PREDICT_PHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("pht_ack"    ,1);
+        out_PREDICT_PHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("pht_address",_param._pht_size_address);
+	  }
+	if (_param._have_bht and _param._have_pht)
+         in_PREDICT_BHT_HISTORY         [i] = interface->set_signal_in  <Tbht_history_t> ("bht_history",_param._bht_size_history);
+        out_PREDICT_ACK                 [i] = interface->set_signal_out <Tcontrol_t>     ("ack"        ,1);
+         in_PREDICT_ADDRESS             [i] = interface->set_signal_in  <Taddress_t>     ("address"    ,_param._size_address);
+      }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    if (_param._have_bht)
+      {
+     in_BRANCH_COMPLETE_BHT_ACK              = new SC_IN (Tcontrol_t)           * [_param._nb_branch_complete];
+    out_BRANCH_COMPLETE_BHT_ADDRESS          = new SC_OUT(Taddress_t)           * [_param._nb_branch_complete];
+      }
+    if (_param._have_pht)
+      {
+     in_BRANCH_COMPLETE_PHT_ACK              = new SC_IN (Tcontrol_t)           * [_param._nb_branch_complete];
+    out_BRANCH_COMPLETE_PHT_ADDRESS          = new SC_OUT(Taddress_t)           * [_param._nb_branch_complete];
+      }
+    if (_param._have_bht and _param._have_pht)
+     in_BRANCH_COMPLETE_BHT_HISTORY          = new SC_IN (Tbht_history_t)       * [_param._nb_branch_complete];
+    
+    out_BRANCH_COMPLETE_ACK                  = new SC_OUT(Tcontrol_t)           * [_param._nb_branch_complete];
+     in_BRANCH_COMPLETE_ADDRESS              = new SC_IN (Taddress_t)           * [_param._nb_branch_complete];
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, EAST
+								, "Interface branch complete"
+#endif
+								);
+	if (_param._have_bht)
+	  {
+         in_BRANCH_COMPLETE_BHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("bht_ack"    ,1);
+        out_BRANCH_COMPLETE_BHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("bht_address",_param._bht_size_address);
+	  }
+	if (_param._have_pht)
+	  {
+         in_BRANCH_COMPLETE_PHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("pht_ack"    ,1);
+        out_BRANCH_COMPLETE_PHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("pht_address",_param._pht_size_address);
+	  }
+	if (_param._have_bht and _param._have_pht)
+         in_BRANCH_COMPLETE_BHT_HISTORY         [i] = interface->set_signal_in  <Tbht_history_t> ("bht_history",_param._bht_size_history);
+
+        out_BRANCH_COMPLETE_ACK                 [i] = interface->set_signal_out <Tcontrol_t>     ("ack"        ,1);
+         in_BRANCH_COMPLETE_ADDRESS             [i] = interface->set_signal_in  <Taddress_t>     ("address"    ,_param._size_address);
+      }
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+#ifdef POSITION
+    _component->generate_file();
+#endif
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"allocation","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_deallocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_deallocation.cpp	(revision 105)
@@ -0,0 +1,81 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Two_Level_Branch_Predictor_Glue::deallocation (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"deallocation","Begin");
+
+    delete     in_CLOCK;
+    delete     in_NRESET;
+
+    if (_param._have_bht)
+      {
+    delete []  in_PREDICT_BHT_ACK    ;
+    delete [] out_PREDICT_BHT_ADDRESS;
+      }
+    if (_param._have_pht)
+      {
+    delete []  in_PREDICT_PHT_ACK    ;
+    delete [] out_PREDICT_PHT_ADDRESS;
+      }
+    if (_param._have_bht and _param._have_pht)
+    delete []  in_PREDICT_BHT_HISTORY;
+    
+    delete [] out_PREDICT_ACK        ;
+    delete []  in_PREDICT_ADDRESS    ;
+
+    if (_param._have_bht)
+      {
+    delete []  in_BRANCH_COMPLETE_BHT_ACK    ;
+    delete [] out_BRANCH_COMPLETE_BHT_ADDRESS;
+      }
+    if (_param._have_pht)
+      {
+    delete []  in_BRANCH_COMPLETE_PHT_ACK    ;
+    delete [] out_BRANCH_COMPLETE_PHT_ADDRESS;
+      }
+    if (_param._have_bht and _param._have_pht)
+    delete []  in_BRANCH_COMPLETE_BHT_HISTORY;
+    delete [] out_BRANCH_COMPLETE_ACK        ;
+    delete []  in_BRANCH_COMPLETE_ADDRESS    ;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    delete _component;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"deallocation","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_ack.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_ack.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_ack.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+#include "Common/include/BitManipulation.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+  void Two_Level_Branch_Predictor_Glue::genMealy_branch_complete_ack (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_ack","Begin");
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	// Ackwnolegde
+	bool bht_ack = (not _param._have_bht) or PORT_READ(in_BRANCH_COMPLETE_BHT_ACK [i]);
+	bool pht_ack = (not _param._have_pht) or PORT_READ(in_BRANCH_COMPLETE_PHT_ACK [i]);		  
+
+	PORT_WRITE (out_BRANCH_COMPLETE_ACK [i], bht_ack and pht_ack);
+      }
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_ack","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_bht_address.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_bht_address.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_bht_address.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+#include "Common/include/BitManipulation.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+  void Two_Level_Branch_Predictor_Glue::genMealy_branch_complete_bht_address (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","Begin");
+
+    if (_param._have_bht)
+      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	{
+	  // Address
+	  Taddress_t address = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
+	  
+	  PORT_WRITE (out_BRANCH_COMPLETE_BHT_ADDRESS [i], range<Taddress_t>(_param._size_address, address, _param._bht_size_address));
+	}
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp	(revision 105)
@@ -0,0 +1,63 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+#include "Common/include/BitManipulation.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+  void Two_Level_Branch_Predictor_Glue::genMealy_branch_complete_pht_address (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","Begin");
+
+    if (_param._have_pht)
+      for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	{
+	  // Address
+	  Taddress_t     address = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
+	  Tbht_history_t history = 0;
+	  
+	  if (_param._have_bht)
+	    {
+	      history = PORT_READ (in_BRANCH_COMPLETE_BHT_HISTORY [i]);
+	      address = address << _param._pht_size_address_shift;
+	    }
+
+	  Taddress_t     pht_address = (history ^ address) & gen_mask<Taddress_t>(_param._pht_size_address);
+
+	  log_printf(TRACE,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","out_BRANCH_COMPLETE_PHT_ADDRESS [%d]= %.8x xor %.8x<<%d = %.8x",i,history,PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]),_param._pht_size_address_shift, pht_address);
+	  
+	  PORT_WRITE (out_BRANCH_COMPLETE_PHT_ADDRESS [i], pht_address);
+	}
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_ack.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_ack.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_ack.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+#include "Common/include/BitManipulation.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+  void Two_Level_Branch_Predictor_Glue::genMealy_predict_ack (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_ack","Begin");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	// Ackwnolegde
+	bool bht_ack = (not _param._have_bht) or PORT_READ(in_PREDICT_BHT_ACK [i]);
+	bool pht_ack = (not _param._have_pht) or PORT_READ(in_PREDICT_PHT_ACK [i]);		  
+
+	PORT_WRITE (out_PREDICT_ACK [i], bht_ack and pht_ack);
+      }
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_ack","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp	(revision 105)
@@ -0,0 +1,53 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+#include "Common/include/BitManipulation.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+  void Two_Level_Branch_Predictor_Glue::genMealy_predict_bht_address (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_address","Begin");
+
+    if (_param._have_bht)
+      for (uint32_t i=0; i<_param._nb_prediction; i++)
+	{
+	  // Address
+	  Taddress_t     address = PORT_READ(in_PREDICT_ADDRESS [i]);
+	  Taddress_t bht_address = range<Taddress_t>(_param._size_address, address, _param._bht_size_address);
+	  
+	  PORT_WRITE (out_PREDICT_BHT_ADDRESS [i], bht_address);
+	}
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_address","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_pht_address.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_pht_address.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_pht_address.cpp	(revision 105)
@@ -0,0 +1,59 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+#include "Common/include/BitManipulation.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+  void Two_Level_Branch_Predictor_Glue::genMealy_predict_pht_address (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_address","Begin");
+
+    if (_param._have_pht)
+      for (uint32_t i=0; i<_param._nb_prediction; i++)
+	{
+	  // Address
+	  Taddress_t address = PORT_READ(in_PREDICT_ADDRESS [i]);
+	  Tbht_history_t history = 0;
+	  
+	  if (_param._have_bht)
+	    {
+	      history = PORT_READ (in_PREDICT_BHT_HISTORY [i]);
+	      address = address << _param._pht_size_address_shift;
+	    }
+	  
+	  PORT_WRITE (out_PREDICT_PHT_ADDRESS [i], (history xor address) & gen_mask<Taddress_t>(_param._pht_size_address));
+	}
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"genMealy_predict_address","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_statistics.cpp	(revision 105)
@@ -0,0 +1,48 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  string Two_Level_Branch_Predictor_Glue::statistics (uint32_t depth)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"statistics","Begin");
+
+    string txt = _stat->print(depth);
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"statistics","End");
+
+    return txt;
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_transition.cpp	(revision 105)
@@ -0,0 +1,54 @@
+#ifdef SYSTEMC
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Two_Level_Branch_Predictor_Glue::transition (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"transition","Begin");
+
+#ifdef STATISTICS
+    _stat->add();
+#endif    
+
+#ifdef VHDL_TESTBENCH
+    vhdl_testbench_transition ();
+#endif
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"transition","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp	(revision 105)
@@ -0,0 +1,58 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Two_Level_Branch_Predictor_Glue::vhdl (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl","Begin");
+    
+    Vhdl * vhdl = new Vhdl (_name);
+
+    _interfaces->set_port     (vhdl);
+    _component ->vhdl_instance(vhdl);
+
+    vhdl_declaration (vhdl);
+    vhdl_body        (vhdl);
+
+    vhdl->generate_file();
+
+    delete vhdl;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl","End");
+
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_body.cpp	(revision 105)
@@ -0,0 +1,169 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Two_Level_Branch_Predictor_Glue::vhdl_body (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_body","Begin");
+
+    vhdl->set_body ("-- ack output");
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	string bht_ack, pht_ack;
+
+	if (_param._have_bht)
+	  bht_ack = "in_PREDICT_"+toString(i)+"_BHT_ACK";
+	else
+	  bht_ack = "'1'";
+
+	if (_param._have_pht)
+	  pht_ack = "in_PREDICT_"+toString(i)+"_PHT_ACK";
+	else
+	  pht_ack = "'1'";
+
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_ACK         <= "+bht_ack+" and "+pht_ack+";");
+      }
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	string bht_ack, pht_ack;
+
+	if (_param._have_bht)
+	  bht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK";
+	else
+	  bht_ack = "'1'";
+
+	if (_param._have_pht)
+	  pht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK";
+	else
+	  pht_ack = "'1'";
+
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_ACK <= "+bht_ack+" and "+pht_ack+";");
+      }
+    
+    vhdl->set_body ("");
+    vhdl->set_body ("-- address output");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	// The address is higher than the address size of bht
+	if (_param._have_bht)
+	  vhdl->set_body ("out_PREDICT_"+toString(i)+"_BHT_ADDRESS <= in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";");
+
+	if (_param._have_pht)
+	  {
+	    // For pht : 2 cases
+	    if (_param._have_bht)
+	      {
+		uint32_t min = 0;
+		uint32_t max = _param._pht_size_address;
+
+		// A lot of case :
+		//
+		//      pht_size_addr
+		// addr             bht_history
+		//
+		// ---------] |
+		//            |[---------
+		//
+		// -----------|----]               share
+		//            |  [-------
+		//
+		// -----------|----]            no share
+		//            |     [-----
+		//
+		
+		// Test if address is share 
+		if (_param._pht_size_address_shift > 0)
+		  {
+		    min = _param._pht_size_address_shift;
+		    vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <=  in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";");
+		  }
+
+		if (_param._bht_size_history < _param._pht_size_address)
+		  {
+		    max = _param._bht_size_history;
+		    vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
+		  }
+		
+		// intersection
+		if (_param._pht_size_address_share > 0)
+		  vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";");
+	      }
+	    else
+	      vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";");
+	  }
+      }
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	// The address is higher than the address size of bht
+	if (_param._have_bht)
+	  vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS <= in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";");
+
+	if (_param._have_pht)
+	  {
+	    // For pht : 2 cases
+	    if (_param._have_bht)
+	      {
+		uint32_t min = 0;
+		uint32_t max = _param._pht_size_address;
+
+		// Test if address is share 
+		if (_param._pht_size_address_shift > 0)
+		  {
+		    min = _param._pht_size_address_shift;
+		    vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";");
+		  }
+
+		if (_param._bht_size_history < _param._pht_size_address)
+		  {
+		    max = _param._bht_size_history;
+		    vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
+		  }
+		
+		// intersection
+		if (_param._pht_size_address_share > 0)
+		  vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";");
+	      }
+	    else
+	      vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";");
+	  }
+      }
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_body","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_declaration.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_declaration.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_declaration.cpp	(revision 105)
@@ -0,0 +1,43 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Two_Level_Branch_Predictor_Glue::vhdl_declaration (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_declaration","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_declaration","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp	(revision 105)
@@ -0,0 +1,48 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+namespace two_level_branch_predictor_glue {
+
+
+  void Two_Level_Branch_Predictor_Glue::vhdl_testbench_transition ()
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_transition","Begin");
+
+//     sc_start(0);
+
+    _interfaces->testbench();
+
+    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_transition","End");
+  };
+
+}; // end namespace two_level_branch_predictor_glue
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/Makefile	(revision 105)
@@ -0,0 +1,19 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= ..
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ include ]------------------------------------------
+
+all				:
+				$(MAKE) all_documentation
+
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Documentation
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/Two_Level_Branch_Predictor.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/Two_Level_Branch_Predictor.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/Two_Level_Branch_Predictor.tex	(revision 105)
@@ -0,0 +1,38 @@
+\documentclass[10pt,a4paper,twocolumn]{article}
+
+\def\dirdoc{tex}
+\def\dirschema{eps}
+
+% Package de variables d'environnement : Titre, command etc ...
+\usepackage{../../../../../../../../../Behavioural/doc/sty/doc-style}
+\usepackage{sty/header}
+
+
+%------------------------------------------------------------------------------
+% Début document
+%------------------------------------------------------------------------------
+
+\pagestyle{empty}
+
+\begin{document}
+
+% Créez une page de titre
+\maketitle
+\thispagestyle{empty}
+
+%Table des matières et des figures
+%\tableofcontents
+%\newpage
+%\listoffigures
+
+%------------------------------------------------------------------------------
+% Ajout du corps du documents
+%------------------------------------------------------------------------------
+
+\input{tex/root}
+
+%------------------------------------------------------------------------------
+% Fin d'ajout du corps du document
+%------------------------------------------------------------------------------
+
+\end{document}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/sty/header.sty
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/sty/header.sty	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/sty/header.sty	(revision 105)
@@ -0,0 +1,12 @@
+\def\review{YYYY/MM/DD}
+%\def\review{\number\day/\number\month/\number\year\xspace}
+
+\title{Two\_Level\_Branch\_Predictor}
+ 
+\author{}
+
+\affiliation{}
+
+\email{}
+
+\date{\review}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/01_introduction.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/01_introduction.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/01_introduction.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Introduction}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/02_features.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/02_features.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/02_features.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Features}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/03_description.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/03_description.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/03_description.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Functional Description}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/04_pinout.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/04_pinout.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/04_pinout.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Pin out}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/05_parameters.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/05_parameters.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/05_parameters.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Parameters}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/06_performance.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/06_performance.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/06_performance.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Performance}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/07_details.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/07_details.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/07_details.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Details}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/08_history.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/08_history.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/08_history.tex	(revision 105)
@@ -0,0 +1,10 @@
+\Section{Revision History}
+
+\begin{tabular}{|c|c|c|}
+\hline
+Revision Date & By  & Modifications\\
+\hline
+\hline
+yyyy/mm/dd    & xxx & Initial document \\
+\hline
+\end{tabular}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/root.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/root.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/doc/tex/root.tex	(revision 105)
@@ -0,0 +1,8 @@
+\input{\dirdoc/01_introduction}
+\input{\dirdoc/02_features}
+\input{\dirdoc/03_description}
+\input{\dirdoc/04_pinout}
+\input{\dirdoc/05_parameters}
+\input{\dirdoc/06_performance}
+\input{\dirdoc/07_details}
+\input{\dirdoc/08_history}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Parameters.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Parameters.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Parameters.h	(revision 105)
@@ -0,0 +1,86 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Parameters_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Parameters_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Parameters.h"
+// Internal structure
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Parameters.h"
+#include <math.h>
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  class Parameters : public morpheo::behavioural::Parameters
+  {
+    //-----[ fields ]------------------------------------------------------------
+  public : const bool     _have_bht              ;
+  public : const uint32_t _bht_size_shifter      ;
+  public : const uint32_t _bht_nb_shifter        ;
+  public : const bool     _have_pht              ;
+  public : const uint32_t _pht_size_counter      ;
+  public : const uint32_t _pht_nb_counter        ;
+  public : const uint32_t _pht_size_address_share;
+  public : const uint32_t _size_address          ;
+  public : const uint32_t _nb_prediction         ;
+  public : const uint32_t _nb_branch_complete    ;
+    
+  public : const uint32_t _bht_size_address  ;
+  public : const uint32_t _pht_size_address  ;
+
+  public :       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table ::Parameters * _param_branch_history_table;
+  public :       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters * _param_pattern_history_table;
+  public :       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters * _param_two_level_branch_predictor_glue;
+
+    //-----[ methods ]-----------------------------------------------------------
+  public : Parameters  (bool     have_bht              ,
+			uint32_t bht_size_shifter      ,
+			uint32_t bht_nb_shifter        ,
+			bool     have_pht              ,
+			uint32_t pht_size_counter      ,
+			uint32_t pht_nb_counter        ,
+			uint32_t pht_size_address_share,
+			uint32_t size_address          ,
+			uint32_t nb_prediction         ,
+			uint32_t nb_branch_complete    );
+
+  public : Parameters  (Parameters & param) ;
+  public : ~Parameters () ;
+
+  public : string msg_error (void);
+
+  public :        string   print      (uint32_t depth);
+  public : friend ostream& operator<< (ostream& output_stream,
+				       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters & x);
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Statistics.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Statistics.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Statistics.h	(revision 105)
@@ -0,0 +1,75 @@
+#ifdef STATISTICS
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Statistics_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Statistics_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+// Internal structure
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Statistics.h"
+#include "Behavioural/include/Statistics.h"
+#include "Behavioural/include/Parameters_Statistics.h"
+//#include "Behavioural/Generic/Group/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
+
+//using namespace morpheo::behavioural::generic::group;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  class Statistics : public morpheo::behavioural::Statistics
+  {
+    // -----[ fields ]----------------------------------------------------
+  private  : const Parameters                                   _parameters;
+
+    // -----[ methods ]---------------------------------------------------
+  public   : Statistics  (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  );
+//public   : Statistics  (Statistics & stat);
+  public   : ~Statistics () ;
+    
+  public   : string   print_body (uint32_t depth);
+  public   : string   print      (uint32_t depth);
+  public   : string   print      (uint32_t depth,
+				  string   component_stat
+				  );
+  public   : void     add        ();
+
+  public   : friend ostream& operator<< (ostream& output_stream,
+					 const Statistics & x);
+
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h	(revision 105)
@@ -0,0 +1,162 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Two_Level_Branch_Predictor_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Two_Level_Branch_Predictor_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <iostream>
+#include "Common/include/ToString.h"
+#include "Common/include/Debug.h"
+
+// Internal structure
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/include/Branch_History_Table.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/include/Pattern_History_Table.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h"
+#ifdef STATISTICS
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h"
+#endif
+#ifdef VHDL
+#include "Behavioural/include/Vhdl.h"
+#endif
+#include "Behavioural/include/Component.h"
+
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  class Two_Level_Branch_Predictor 
+#if SYSTEMC
+    : public sc_module
+#endif
+  {
+    // -----[ fields ]----------------------------------------------------
+    // Parameters
+  protected : const string     _name;
+
+  protected : const Parameters _param;
+#ifdef STATISTICS
+ protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
+#endif
+
+#ifdef STATISTICS
+  private   : Statistics                     * _stat;
+#endif
+
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
+
+#ifdef SYSTEMC
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Interface
+  public    : SC_CLOCK                      *  in_CLOCK                      ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET                     ;
+    // Interface Predict
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL                ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                ;
+  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS            ;
+  public    : SC_OUT(Tbht_history_t)       ** out_PREDICT_BHT_HISTORY        ;
+  public    : SC_OUT(Tpht_history_t)       ** out_PREDICT_PHT_HISTORY        ;
+			
+    // Interface Branch_complete
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL        ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK        ;
+  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS    ;
+  public    : SC_IN (Tbht_history_t)       **  in_BRANCH_COMPLETE_BHT_HISTORY;
+  public    : SC_IN (Tpht_history_t)       **  in_BRANCH_COMPLETE_PHT_HISTORY;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION  ;
+
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_PREDICT_BHT_ACK            ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_PREDICT_PHT_ACK            ;
+  private   : SC_SIGNAL(Taddress_t)        ** signal_PREDICT_BHT_ADDRESS        ;
+  private   : SC_SIGNAL(Taddress_t)        ** signal_PREDICT_PHT_ADDRESS        ;
+
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_BHT_ACK    ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_PHT_ACK    ;
+  private   : SC_SIGNAL(Taddress_t)        ** signal_BRANCH_COMPLETE_BHT_ADDRESS; 
+  private   : SC_SIGNAL(Taddress_t)        ** signal_BRANCH_COMPLETE_PHT_ADDRESS;
+#endif
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  protected : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table  * component_Branch_History_Table;
+  protected : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Pattern_History_Table * component_Pattern_History_Table;
+  protected : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue * component_Two_Level_Branch_Predictor_Glue;
+
+    // -----[ methods ]---------------------------------------------------
+
+#ifdef SYSTEMC
+    SC_HAS_PROCESS (Two_Level_Branch_Predictor);
+#endif					       
+  public  :          Two_Level_Branch_Predictor              (
+#ifdef SYSTEMC
+							      sc_module_name                              name,
+#else					       
+							      string                                      name,
+#endif					       
+#ifdef STATISTICS
+							      morpheo::behavioural::Parameters_Statistics param_statistics,
+#endif
+							      Parameters                                  param );
+							      
+  public  :          Two_Level_Branch_Predictor              (Parameters param );
+  public  :          ~Two_Level_Branch_Predictor             (void);
+					       
+#ifdef SYSTEMC				       
+  private : void     allocation                (void);
+  private : void     deallocation              (void);
+					       
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+  public  : void     transition                (void);
+#endif
+#endif					       
+#ifdef STATISTICS
+  public  : string   statistics                (uint32_t depth);
+#endif
+					       
+#if VHDL				       
+  public  : void     vhdl                      (void);
+  private : void     vhdl_declaration          (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
+#endif					       
+#ifdef VHDL_TESTBENCH			       
+  private : void     vhdl_testbench_transition (void);
+#endif
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Types.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/include/Types.h	(revision 105)
@@ -0,0 +1,42 @@
+#ifdef SYSTEMC
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Type_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_two_level_branch_predictor_Type_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Types.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+  typedef uint32_t Taddress_t    ;
+  typedef uint32_t Tbht_history_t;
+  typedef uint32_t Tpht_history_t;
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters.cpp	(revision 105)
@@ -0,0 +1,138 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  Parameters::Parameters (bool     have_bht              ,
+			  uint32_t bht_size_shifter      ,
+			  uint32_t bht_nb_shifter        ,
+			  bool     have_pht              ,
+			  uint32_t pht_size_counter      ,
+			  uint32_t pht_nb_counter        ,
+			  uint32_t pht_size_address_share,
+			  uint32_t size_address          ,
+			  uint32_t nb_prediction         ,
+			  uint32_t nb_branch_complete    ) : 
+    _have_bht               (have_bht          ),
+    _bht_size_shifter       ((_have_bht == true)?bht_size_shifter:0),
+    _bht_nb_shifter         ((_have_bht == true)?bht_nb_shifter  :0),
+    _have_pht               (have_pht          ),
+    _pht_size_counter       ((_have_pht == true)?pht_size_counter:0),
+    _pht_nb_counter         ((_have_pht == true)?pht_nb_counter  :0),
+    _pht_size_address_share (((_have_bht and _have_pht) == true)?pht_size_address_share:0),
+    _size_address           (size_address      ),
+    _nb_prediction          (nb_prediction     ),
+    _nb_branch_complete     (nb_branch_complete),
+    _bht_size_address       (static_cast<uint32_t>(ceil(log2(bht_nb_shifter)))),
+    _pht_size_address       (static_cast<uint32_t>(ceil(log2(pht_nb_counter))))
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Parameters","Begin");
+    
+    if (_have_bht)
+    _param_branch_history_table  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table ::Parameters (_bht_size_shifter  ,
+																				       _bht_nb_shifter    ,
+																				       _nb_prediction     ,
+																				       _nb_branch_complete);
+    if (_have_pht)
+    _param_pattern_history_table = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters (_pht_size_counter  ,
+																				       _pht_nb_counter    ,
+																				       _nb_prediction     ,
+																				       _nb_branch_complete);
+    
+                                                     
+    _param_two_level_branch_predictor_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters (_have_bht              ,
+																							   _bht_size_shifter      ,
+																							   _bht_size_address      ,
+																							   _have_pht              ,
+																							   _pht_size_address      ,
+																							   _pht_size_address_share,
+																							   _size_address          ,
+																							   _nb_prediction         ,
+																							   _nb_branch_complete    );
+
+    test();
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Parameters","End");
+  };
+  
+  Parameters::Parameters (Parameters & param) :
+    _have_bht               (param._have_bht              ),
+    _bht_size_shifter       (param._bht_size_shifter      ),
+    _bht_nb_shifter         (param._bht_nb_shifter        ),
+    _have_pht               (param._have_pht              ),
+    _pht_size_counter       (param._pht_size_counter      ),
+    _pht_nb_counter         (param._pht_nb_counter        ),
+    _pht_size_address_share (param._pht_size_address_share),
+    _size_address           (param._size_address          ),
+    _nb_prediction          (param._nb_prediction         ),
+    _nb_branch_complete     (param._nb_branch_complete    ),
+    _bht_size_address       (param._bht_size_address      ),
+    _pht_size_address       (param._pht_size_address      )
+
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Parameters","Begin");
+
+    if (_have_bht)
+    _param_branch_history_table  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table ::Parameters (_bht_size_shifter  ,
+																				       _bht_nb_shifter    ,
+																				       _nb_prediction     ,
+																				       _nb_branch_complete);
+    if (_have_pht)
+    _param_pattern_history_table = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table::Parameters (_pht_size_counter  ,
+																				       _pht_nb_counter    ,
+																				       _nb_prediction     ,
+																				       _nb_branch_complete);
+
+    _param_two_level_branch_predictor_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Parameters (_have_bht              ,
+																							   _bht_size_shifter      ,
+																							   _bht_size_address      ,
+																							   _have_pht              ,
+																							   _pht_size_address      ,
+																							   _pht_size_address_share,
+																							   _size_address          ,
+																							   _nb_prediction         ,
+																							   _nb_branch_complete    );
+
+    test();
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Parameters","End");
+  };
+
+  Parameters::~Parameters () 
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"~Parameters","Begin");
+
+    if (_have_bht)
+    delete _param_branch_history_table;
+    if (_have_pht)
+    delete _param_pattern_history_table;
+    delete _param_two_level_branch_predictor_glue;
+    log_printf(FUNC,Two_Level_Branch_Predictor,"~Parameters","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters_msg_error.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters_msg_error.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters_msg_error.cpp	(revision 105)
@@ -0,0 +1,93 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Types.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+  string Parameters::msg_error(void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"msg_error","Begin");
+
+    string msg = "";
+
+    if (is_positive (_nb_prediction) == false)
+      {
+	msg += "  - nb_prediction must be > 0\n";
+	msg += "    * nb_prediction                   : " + toString(_nb_prediction) + "\n";
+      }
+
+    if (is_positive (_nb_branch_complete) == false)
+      {
+	msg += "  - nb_branch_complete must be > 0\n";
+	msg += "    * nb_branch_complete              : " + toString(_nb_branch_complete) + "\n";
+      }
+
+    if ((_have_bht or _have_pht) == false)
+      {
+	msg += "  - you have no Branch History Table and no Pattern History Table. You need a less of a BHT or a PHT\n";
+	msg += "    * have_bht                        : " + toString(_have_bht) + "\n";
+	msg += "    * have_pht                        : " + toString(_have_pht) + "\n";
+      }
+
+    if ( _have_bht and (_size_address < _bht_size_address))
+      {
+	msg += "  - the address's size must to large to the number of shifter in the Branch History Table.\n";
+	msg += "    * size_address                    : " + toString(_size_address    ) + "\n";
+	msg += "    * have_bht                        : " + toString(_have_bht        ) + "\n";
+	msg += "    * bht_size_address                : " + toString(_bht_size_address) + "\n";
+	msg += "      * bht_nb_shifter                : " + toString(_bht_nb_shifter  ) + "\n";
+      }
+
+    if (_have_pht and ( (_size_address < _pht_size_address) or
+			(_have_bht and (_pht_size_address < _bht_size_address))))
+      {
+	msg += "  - the address's size concate with shifter_out must to large to the number of counter in the Pattern History Table.\n";
+	msg += "    * size_address                    : " + toString(_size_address    ) + "\n";
+	msg += "    * have_bht                        : " + toString(_have_bht        ) + "\n";
+	msg += "    * bht_size_address                : " + toString(_bht_size_address) + "\n";
+	msg += "      * bht_nb_shifter                : " + toString(_bht_nb_shifter  ) + "\n";
+	msg += "    * have_pht                        : " + toString(_have_bht        ) + "\n";
+	msg += "    * pht_size_address                : " + toString(_pht_size_address) + "\n";
+	msg += "      * pht_nb_counter                : " + toString(_pht_nb_counter  ) + "\n";
+      }
+
+//     if ( not _have_bht and (_pht_size_address_share != 0))
+//     {
+// 	msg += "  - you have no Branch History Table but size_address_share is > 0\n";
+// 	msg += "    * have_bht                        : " + toString(_have_bht              ) + "\n";
+// 	msg += "    * pht_size_address_share          : " + toString(_pht_size_address_share) + "\n";
+//     }
+
+    return msg;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"msg_error","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Parameters_print.cpp	(revision 105)
@@ -0,0 +1,71 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  string Parameters::print (uint32_t depth)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"print","Begin");
+
+    string tab = string(depth,'\t');
+    ostringstream msg;
+    msg << tab << "<two_level_branch_predictor>" << endl
+	<< tab << "\t<have bht               value=\"" << _have_bht               << "\" /> <!-- size bht : " << _bht_size_shifter * _bht_nb_shifter << " bits -->" << endl
+	<< tab << "\t<bht_size_shifter       value=\"" << _bht_size_shifter       << "\" />" << endl
+	<< tab << "\t<bht_nb_shifter         value=\"" << _bht_nb_shifter         << "\" />" << endl
+	<< tab << "\t<have pht               value=\"" << _have_pht               << "\" /> <!-- size pht : " << _pht_size_counter * _pht_nb_counter << " bits -->" << endl
+	<< tab << "\t<pht_size_counter       value=\"" << _pht_size_counter       << "\" />" << endl
+	<< tab << "\t<pht_nb_counter         value=\"" << _pht_nb_counter         << "\" />" << endl
+	<< tab << "\t<pht_size_address_share value=\"" << _pht_size_address_share << "\" />" << endl
+	<< tab << "\t<size_address           value=\"" << _size_address           << "\" />" << endl
+	<< tab << "\t<nb_prediction          value=\"" << _nb_prediction          << "\" />" << endl
+	<< tab << "\t<nb_branch_complete     value=\"" << _nb_branch_complete     << "\" />" << endl;
+    if (_have_bht)
+    msg << _param_branch_history_table ->print(depth+1);
+    if (_have_pht)
+    msg << _param_pattern_history_table->print(depth+1);
+    msg << _param_two_level_branch_predictor_glue->print(depth+1);
+    msg << tab << "</two_level_branch_predictor>" << endl;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"print","End");
+    
+    return msg.str();
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters & x)
+  {
+    output_stream << x.print(0);
+    
+    return output_stream;
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics.cpp	(revision 105)
@@ -0,0 +1,53 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  Statistics::Statistics (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  ) :
+    morpheo::behavioural::Statistics(name                  ,
+				     parameters_statistics ),
+    _parameters(parameters)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Statistics","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Statistics","End");
+  };
+  
+  Statistics::~Statistics () 
+  { 
+    log_printf(FUNC,Two_Level_Branch_Predictor,"~Statistics","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor,"~Statistics","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_add.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_add.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_add.cpp	(revision 105)
@@ -0,0 +1,44 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  void Statistics::add ()
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"add","Begin");
+    log_printf(FUNC,Two_Level_Branch_Predictor,"add","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_print.cpp	(revision 105)
@@ -0,0 +1,69 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+  string Statistics::print (uint32_t depth,
+			    string   component_stat
+			    )
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"print","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "<two_level_branch_predictor name=\"" << _name << "\" >" << endl
+        << print_body(depth+1)
+	<< component_stat
+	<< tab << "</two_level_branch_predictor>" << endl;
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor,"print","End");
+
+    return msg.str();
+  };
+
+  string Statistics::print (uint32_t depth)
+  {
+    return print(depth,"");
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Statistics & x)
+  {
+    output_stream << x.print(0);
+
+    return output_stream;
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_print_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_print_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Statistics_print_body.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  string Statistics::print_body (uint32_t depth)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"print_body","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "";
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor,"print_body","End");
+
+    return msg.str();
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor.cpp	(revision 105)
@@ -0,0 +1,101 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+#ifdef SYSTEMC
+  Two_Level_Branch_Predictor::Two_Level_Branch_Predictor (sc_module_name name,
+#else
+  Two_Level_Branch_Predictor::Two_Level_Branch_Predictor (string name,
+#endif
+#ifdef STATISTICS
+			      morpheo::behavioural::Parameters_Statistics             param_statistics,
+#endif
+			      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters param ):
+			      _name              (name)
+			      ,_param            (param)
+#ifdef STATISTICS
+			      ,_param_statistics (param_statistics)
+#endif
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Two_Level_Branch_Predictor","Begin");
+
+#ifdef SYSTEMC
+    allocation ();
+#endif
+
+#ifdef STATISTICS
+    // Allocation of statistics
+    _stat = new Statistics (static_cast<string>(_name),
+			    param_statistics          ,
+			    param);
+#endif
+
+#ifdef VHDL
+    // generate the vhdl
+    vhdl();
+#endif
+
+#ifdef SYSTEMC
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+    SC_METHOD (transition);
+    dont_initialize ();
+    sensitive_pos << *(in_CLOCK);
+#endif
+
+//     SC_METHOD (genMoore);
+//     dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+#endif    
+
+#endif
+    log_printf(FUNC,Two_Level_Branch_Predictor,"Two_Level_Branch_Predictor","End");
+  };
+  
+  Two_Level_Branch_Predictor::~Two_Level_Branch_Predictor (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"~Two_Level_Branch_Predictor","Begin");
+
+#ifdef STATISTICS
+    _stat->generate_file(statistics(0));
+    
+    delete _stat;
+#endif
+
+#ifdef SYSTEMC
+    deallocation ();
+#endif
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"~Two_Level_Branch_Predictor","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp	(revision 105)
@@ -0,0 +1,312 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+  void Two_Level_Branch_Predictor::allocation (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin");
+
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Two_Level_Branch_Predictor"
+#ifdef POSITION
+					     ,MIXTE
+#endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      Interface * interface = _interfaces->set_interface(""
+#ifdef POSITION
+							 , IN  
+							 , SOUTH
+							 , "Generalist interface"
+#endif
+							 );
+      
+      in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
+    }
+    
+    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+     in_PREDICT_VAL                 = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
+    out_PREDICT_ACK                 = new SC_OUT(Tcontrol_t)     * [_param._nb_prediction     ];
+     in_PREDICT_ADDRESS             = new SC_IN (Taddress_t)     * [_param._nb_prediction     ];
+    if (_param._have_bht)
+    out_PREDICT_BHT_HISTORY         = new SC_OUT(Tbht_history_t) * [_param._nb_prediction     ];
+    if (_param._have_pht)
+    out_PREDICT_PHT_HISTORY         = new SC_OUT(Tpht_history_t) * [_param._nb_prediction     ];
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+								);
+
+	 in_PREDICT_VAL                 [i] = interface->set_signal_valack_in            ("val"    , VAL);
+	out_PREDICT_ACK                 [i] = interface->set_signal_valack_out           ("ack"    , ACK);
+	 in_PREDICT_ADDRESS             [i] = interface->set_signal_in  <Taddress_t>     ("address", _param._size_address);
+	if (_param._have_bht)
+	out_PREDICT_BHT_HISTORY         [i] = interface->set_signal_out <Tbht_history_t> ("bht_history", _param._bht_size_shifter);
+	if (_param._have_pht)
+	out_PREDICT_PHT_HISTORY         [i] = interface->set_signal_out <Tpht_history_t> ("pht_history", _param._pht_size_counter);
+      }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+     in_BRANCH_COMPLETE_VAL         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
+    out_BRANCH_COMPLETE_ACK         = new SC_OUT(Tcontrol_t)     * [_param._nb_branch_complete];
+     in_BRANCH_COMPLETE_ADDRESS     = new SC_IN (Taddress_t)     * [_param._nb_branch_complete];
+    if (_param._have_bht)
+     in_BRANCH_COMPLETE_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_branch_complete];
+    if (_param._have_pht)
+     in_BRANCH_COMPLETE_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_branch_complete];
+     in_BRANCH_COMPLETE_DIRECTION   = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, EAST
+								, "Interface branch complete"
+#endif
+								);
+
+	 in_BRANCH_COMPLETE_VAL         [i] = interface->set_signal_valack_in            ("val"        , VAL);		   
+	out_BRANCH_COMPLETE_ACK         [i] = interface->set_signal_valack_out           ("ack"        , ACK);		   
+	 in_BRANCH_COMPLETE_ADDRESS     [i] = interface->set_signal_in  <Taddress_t    > ("address"    , _param._size_address);
+	if (_param._have_bht)
+	 in_BRANCH_COMPLETE_BHT_HISTORY [i] = interface->set_signal_in  <Tbht_history_t> ("bht_history", _param._bht_size_shifter);
+	if (_param._have_pht)
+	 in_BRANCH_COMPLETE_PHT_HISTORY [i] = interface->set_signal_in  <Tpht_history_t> ("pht_history", _param._pht_size_counter);
+	 in_BRANCH_COMPLETE_DIRECTION   [i] = interface->set_signal_in  <Tcontrol_t    > ("direction"  , 1);
+      }
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    string name_component;
+
+    // =====[ component_Branch_History_Table ]============================    
+    if (_param._have_bht)
+      {
+	name_component = _name+"_Branch_History_Table";
+	
+	component_Branch_History_Table = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table (name_component.c_str()
+#ifdef STATISTICS
+																						       ,_param_statistics
+#endif
+																						       ,*(_param._param_branch_history_table));
+	
+	_component->set_component (component_Branch_History_Table->_component
+#ifdef POSITION
+				   , 75
+				   , 25
+				   , 10
+				   , 10
+#endif
+				   );
+      }
+    
+    // =====[ component_Pattern_History_Table ]===========================    
+    if (_param._have_pht)
+      {
+	name_component = _name+"_Pattern_History_Table";
+	
+	component_Pattern_History_Table = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::pattern_history_table ::Pattern_History_Table (name_component.c_str()
+#ifdef STATISTICS
+																							  ,_param_statistics
+#endif
+																							  ,*(_param._param_pattern_history_table));
+	
+	_component->set_component (component_Pattern_History_Table->_component
+#ifdef POSITION
+				   , 75
+				   , 75
+				   , 10
+				   , 10
+#endif
+				   );
+      }
+
+    // =====[ component_Two_Level_Branch_Predictor_Glue ]=================
+
+    name_component = _name+"_Two_Level_Branch_Predictor_Glue";
+
+    component_Two_Level_Branch_Predictor_Glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue (name_component.c_str()
+#ifdef STATISTICS
+																										   ,_param_statistics
+#endif
+																										   ,*(_param._param_two_level_branch_predictor_glue));
+    
+    _component->set_component (component_Two_Level_Branch_Predictor_Glue->_component
+#ifdef POSITION
+			       , 50
+			       , 75
+			       , 10
+			       , 10
+#endif
+			       );
+    
+    // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    // =====[ component_Branch_History_Table - Instanciation ]============
+    if (_param._have_bht)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_Branch_History_Table","",
+				   _name                        ,"");
+#endif
+	
+	_component->port_map(_name+"_Branch_History_Table", "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(_name+"_Branch_History_Table", "in_NRESET", _name,"in_NRESET");
+
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  {
+#ifdef POSITION
+	    _component->interface_map (_name+"_Branch_History_Table","predict_"+toString(i),
+				       _name                        ,"predict_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Branch_History_Table", "in_PREDICT_"+toString(i)+"_VAL"    , _name                                   , "in_PREDICT_"+toString(i)+"_VAL"        );
+	    _component->port_map(_name+"_Branch_History_Table","out_PREDICT_"+toString(i)+"_ACK"    , _name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_ACK"    );
+	    _component->port_map(_name+"_Branch_History_Table", "in_PREDICT_"+toString(i)+"_ADDRESS", _name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_BHT_ADDRESS");
+	    _component->port_map(_name+"_Branch_History_Table","out_PREDICT_"+toString(i)+"_HISTORY", _name                                   ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
+	  }
+	
+	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	  {
+#ifdef POSITION
+	    _component->interface_map (_name+"_Branch_History_Table","branch_complete_"+toString(i),
+				       _name                        ,"branch_complete_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"      , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"          );
+	    _component->port_map(_name+"_Branch_History_Table","out_BRANCH_COMPLETE_"+toString(i)+"_ACK"      , _name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK"      );
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"  , _name+"_Two_Level_Branch_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS"  );
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"  , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"  );
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION", _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"    );
+	  }
+      }
+    
+    // =====[ component_Pattern_History_Table - Instanciation ]===========
+    if (_param._have_pht)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_Pattern_History_Table","",
+				   _name                         ,"");
+#endif
+	
+	_component->port_map(_name+"_Pattern_History_Table", "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(_name+"_Pattern_History_Table", "in_NRESET", _name,"in_NRESET");
+
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  {
+#ifdef POSITION
+	    _component->interface_map (_name+"_Pattern_History_Table","predict_"+toString(i),
+				       _name                         ,"predict_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_VAL"    , _name                                   , "in_PREDICT_"+toString(i)+"_VAL"        );
+	    _component->port_map(_name+"_Pattern_History_Table","out_PREDICT_"+toString(i)+"_ACK"    , _name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PHT_ACK"    );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_ADDRESS", _name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_PHT_ADDRESS");
+	    _component->port_map(_name+"_Pattern_History_Table","out_PREDICT_"+toString(i)+"_HISTORY", _name                                   ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
+	  }
+
+	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	  {
+#ifdef POSITION
+	    _component->interface_map (_name+"_Pattern_History_Table","branch_complete_"+toString(i),
+				       _name                        ,"branch_complete_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"      , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"          );
+	    _component->port_map(_name+"_Pattern_History_Table","out_BRANCH_COMPLETE_"+toString(i)+"_ACK"      , _name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK"      );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"  , _name+"_Two_Level_Branch_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"  );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"  , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY"  );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION", _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"    );
+	  }
+      }
+
+    // =====[ component_Two_Level_Branch_Predictor_Glue - Instanciation ]=
+#ifdef POSITION
+	_component->interface_map (_name+"_Two_Level_Branch_Predictor_Glue","",
+				   _name                                   ,"");
+#endif
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_NRESET", _name,"in_NRESET");
+
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  {
+	if (_param._have_bht)
+	  {
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_PREDICT_"+toString(i)+"_BHT_ACK"    , _name+"_Branch_History_Table" , "out_PREDICT_"+toString(i)+"_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" ,  "in_PREDICT_"+toString(i)+"_ADDRESS");
+	  }
+	if (_param._have_pht)
+	  {
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_PREDICT_"+toString(i)+"_PHT_ACK"    , _name+"_Pattern_History_Table", "out_PREDICT_"+toString(i)+"_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table",  "in_PREDICT_"+toString(i)+"_ADDRESS");
+	  }
+	if (_param._have_bht and _param._have_pht)
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Branch_History_Table" ,"out_PREDICT_"+toString(i)+"_HISTORY");
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_ACK"         , _name                         ,"out_PREDICT_"+toString(i)+"_ACK");
+        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name                         , "in_PREDICT_"+toString(i)+"_ADDRESS");
+	  }
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	if (_param._have_bht)
+	  {
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK"    , _name+"_Branch_History_Table" , "out_BRANCH_COMPLETE_"+toString(i)+"_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" ,  "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
+	  }
+	if (_param._have_pht)
+	  {
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK"    , _name+"_Pattern_History_Table", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table",  "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
+	  }
+	if (_param._have_bht and _param._have_pht)
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name                         , "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY");
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name                         ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
+        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name                         , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
+      }
+#ifdef POSITION
+    _component->generate_file();
+#endif
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End");
+  };
+  
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp	(revision 105)
@@ -0,0 +1,70 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+  void Two_Level_Branch_Predictor::deallocation (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"deallocation","Begin");
+
+    delete in_CLOCK;
+    delete in_NRESET;
+
+    delete []  in_PREDICT_VAL        ;
+    delete [] out_PREDICT_ACK        ;
+    delete []  in_PREDICT_ADDRESS    ;
+    if (_param._have_bht)
+    delete [] out_PREDICT_BHT_HISTORY;
+    if (_param._have_pht)
+    delete [] out_PREDICT_PHT_HISTORY;
+
+    delete []  in_BRANCH_COMPLETE_VAL        ;
+    delete [] out_BRANCH_COMPLETE_ACK        ;
+    delete []  in_BRANCH_COMPLETE_ADDRESS    ;
+    if (_param._have_bht)
+    delete []  in_BRANCH_COMPLETE_BHT_HISTORY;
+    if (_param._have_pht)
+    delete []  in_BRANCH_COMPLETE_PHT_HISTORY;
+    delete []  in_BRANCH_COMPLETE_DIRECTION  ;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    if (_param._have_bht)
+    delete component_Branch_History_Table ;
+    if (_param._have_pht)
+    delete component_Pattern_History_Table;
+    delete component_Two_Level_Branch_Predictor_Glue;
+    delete _component;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"deallocation","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_statistics.cpp	(revision 105)
@@ -0,0 +1,54 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  string Two_Level_Branch_Predictor::statistics (uint32_t depth)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"statistics","Begin");
+
+    string stat_component_Branch_History_Table  = (_param._have_bht==false)?"":component_Branch_History_Table  ->statistics(depth+1);
+    string stat_component_Pattern_History_Table = (_param._have_pht==false)?"":component_Pattern_History_Table ->statistics(depth+1);
+
+    string txt = _stat->print(depth,
+			      stat_component_Branch_History_Table                            +
+			      stat_component_Pattern_History_Table                           +
+			      component_Two_Level_Branch_Predictor_Glue->statistics(depth+1)
+			      );
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"statistics","End");
+
+    return txt;
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef SYSTEMC
+#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  void Two_Level_Branch_Predictor::transition (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"transition","Begin");
+
+#ifdef STATISTICS
+    _stat->add();
+#endif    
+
+#ifdef VHDL_TESTBENCH
+    vhdl_testbench_transition ();
+#endif
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"transition","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp	(revision 105)
@@ -0,0 +1,56 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  void Two_Level_Branch_Predictor::vhdl (void)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl","Begin");
+
+    Vhdl * vhdl = new Vhdl (_name);
+
+    _interfaces->set_port     (vhdl);
+    _component ->vhdl_instance(vhdl);
+
+    vhdl_declaration (vhdl);
+    vhdl_body        (vhdl);
+
+    vhdl->generate_file();
+
+    delete vhdl;
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl","End");
+
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp	(revision 105)
@@ -0,0 +1,43 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  void Two_Level_Branch_Predictor::vhdl_body (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","Begin");
+
+    
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp	(revision 105)
@@ -0,0 +1,42 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  void Two_Level_Branch_Predictor::vhdl_declaration (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","Begin");
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp	(revision 105)
@@ -0,0 +1,46 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+namespace two_level_branch_predictor {
+
+
+  void Two_Level_Branch_Predictor::vhdl_testbench_transition ()
+  {
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_transition","Begin");
+
+//     sc_start(0);
+
+    _interfaces->testbench();
+
+    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_transition","End");
+  };
+
+}; // end namespace two_level_branch_predictor
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/Makefile
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/Makefile	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/Makefile	(revision 105)
@@ -0,0 +1,19 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT			= ..
+include				$(DIR_COMPONENT)/Makefile.defs
+
+#-----[ include ]------------------------------------------
+
+all				:
+				$(MAKE) all_documentation
+
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Common
+include				$(DIR_MORPHEO)/Behavioural/Makefile.Documentation
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/Meta_Predictor.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/Meta_Predictor.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/Meta_Predictor.tex	(revision 105)
@@ -0,0 +1,37 @@
+\documentclass[10pt,a4paper,twocolumn]{article}
+
+\def\dirdoc{tex}
+\def\dirschema{eps}
+
+% Package de variables d'environnement : Titre, command etc ...
+\usepackage{../../../../../../../../Behavioural/doc/sty/doc-style}
+\usepackage{sty/header}
+
+%------------------------------------------------------------------------------
+% Début document
+%------------------------------------------------------------------------------
+
+\pagestyle{empty}
+
+\begin{document}
+
+% Créez une page de titre
+\maketitle
+\thispagestyle{empty}
+
+%Table des matières et des figures
+%\tableofcontents
+%\newpage
+%\listoffigures
+
+%------------------------------------------------------------------------------
+% Ajout du corps du documents
+%------------------------------------------------------------------------------
+
+\input{tex/root}
+
+%------------------------------------------------------------------------------
+% Fin d'ajout du corps du document
+%------------------------------------------------------------------------------
+
+\end{document}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/sty/header.sty
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/sty/header.sty	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/sty/header.sty	(revision 105)
@@ -0,0 +1,12 @@
+\def\review{YYYY/MM/DD}
+%\def\review{\number\day/\number\month/\number\year\xspace}
+
+\title{Meta\_Predictor}
+ 
+\author{}
+
+\affiliation{}
+
+\email{}
+
+\date{\review}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/01_introduction.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/01_introduction.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/01_introduction.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Introduction}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/02_features.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/02_features.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/02_features.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Features}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/03_description.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/03_description.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/03_description.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Functional Description}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/04_pinout.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/04_pinout.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/04_pinout.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Pin out}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/05_parameters.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/05_parameters.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/05_parameters.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Parameters}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/06_performance.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/06_performance.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/06_performance.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Performance}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/07_details.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/07_details.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/07_details.tex	(revision 105)
@@ -0,0 +1,1 @@
+\Section{Details}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/08_history.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/08_history.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/08_history.tex	(revision 105)
@@ -0,0 +1,10 @@
+\Section{Revision History}
+
+\begin{tabular}{|c|c|c|}
+\hline
+Revision Date & By  & Modifications\\
+\hline
+\hline
+yyyy/mm/dd    & xxx & Initial document \\
+\hline
+\end{tabular}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/root.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/root.tex	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/doc/tex/root.tex	(revision 105)
@@ -0,0 +1,8 @@
+\input{\dirdoc/01_introduction}
+\input{\dirdoc/02_features}
+\input{\dirdoc/03_description}
+\input{\dirdoc/04_pinout}
+\input{\dirdoc/05_parameters}
+\input{\dirdoc/06_performance}
+\input{\dirdoc/07_details}
+\input{\dirdoc/08_history}
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Meta_Predictor.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Meta_Predictor.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Meta_Predictor.h	(revision 105)
@@ -0,0 +1,178 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Meta_Predictor_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Meta_Predictor_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#include <iostream>
+#include "Common/include/ToString.h"
+#include "Common/include/Debug.h"
+
+// Internal structure
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Meta_Predictor_Glue.h"
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Types.h"
+#ifdef STATISTICS
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Statistics.h"
+#endif
+#ifdef VHDL
+#include "Behavioural/include/Vhdl.h"
+#endif
+#include "Behavioural/include/Component.h"
+
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  class Meta_Predictor 
+#if SYSTEMC
+    : public sc_module
+#endif
+  {
+    // -----[ fields ]----------------------------------------------------
+    // Parameters
+  protected : const string     _name;
+
+  protected : const Parameters _param;
+#ifdef STATISTICS
+  protected : const morpheo::behavioural::Parameters_Statistics _param_statistics;
+#endif
+
+#ifdef STATISTICS
+  private   : Statistics                     * _stat;
+#endif
+
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
+
+#ifdef SYSTEMC
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Interface
+  public    : SC_CLOCK                      *  in_CLOCK        ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
+
+    // Interface Predict
+  public    : SC_IN (Tcontrol_t)           **  in_PREDICT_VAL                ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_ACK                ;
+  public    : SC_IN (Taddress_t)           **  in_PREDICT_ADDRESS            ;
+  public    : SC_OUT(Thistory_t)           ** out_PREDICT_HISTORY            ;
+  public    : SC_OUT(Tcontrol_t)           ** out_PREDICT_DIRECTION          ;
+			
+    // Interface Branch_complete
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_VAL        ;
+  public    : SC_OUT(Tcontrol_t)           ** out_BRANCH_COMPLETE_ACK        ;
+  public    : SC_IN (Taddress_t)           **  in_BRANCH_COMPLETE_ADDRESS    ;
+  public    : SC_IN (Thistory_t)           **  in_BRANCH_COMPLETE_HISTORY    ;
+  public    : SC_IN (Tcontrol_t)           **  in_BRANCH_COMPLETE_DIRECTION  ;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor * component_Two_Level_Branch_Predictor_0;
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor * component_Two_Level_Branch_Predictor_1;
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Two_Level_Branch_Predictor * component_Two_Level_Branch_Predictor_2;
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Meta_Predictor_Glue               * component_Meta_Predictor_Glue         ;
+
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    // Interface Predict
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_PREDICT_PREDICTOR_0_ACK ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_PREDICT_PREDICTOR_1_ACK ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_PREDICT_PREDICTOR_2_ACK ;
+
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tbht_history_t) ** signal_PREDICT_PREDICTOR_0_BHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tpht_history_t) ** signal_PREDICT_PREDICTOR_0_PHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tbht_history_t) ** signal_PREDICT_PREDICTOR_1_BHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tpht_history_t) ** signal_PREDICT_PREDICTOR_1_PHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tbht_history_t) ** signal_PREDICT_PREDICTOR_2_BHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tpht_history_t) ** signal_PREDICT_PREDICTOR_2_PHT_HISTORY;
+
+
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_PREDICTOR_0_ACK ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_PREDICTOR_1_ACK ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_PREDICTOR_2_VAL ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_PREDICTOR_2_ACK ;
+  private   : SC_SIGNAL(Tcontrol_t)        ** signal_BRANCH_COMPLETE_PREDICTOR_2_DIRECTION;
+
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tbht_history_t) ** signal_BRANCH_COMPLETE_PREDICTOR_0_BHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tpht_history_t) ** signal_BRANCH_COMPLETE_PREDICTOR_0_PHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tbht_history_t) ** signal_BRANCH_COMPLETE_PREDICTOR_1_BHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tpht_history_t) ** signal_BRANCH_COMPLETE_PREDICTOR_1_PHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tbht_history_t) ** signal_BRANCH_COMPLETE_PREDICTOR_2_BHT_HISTORY;
+  private   : SC_SIGNAL(morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Tpht_history_t) ** signal_BRANCH_COMPLETE_PREDICTOR_2_PHT_HISTORY;
+
+#endif
+
+    // -----[ methods ]---------------------------------------------------
+
+#ifdef SYSTEMC
+    SC_HAS_PROCESS (Meta_Predictor);
+#endif
+  public  :          Meta_Predictor              (
+#ifdef SYSTEMC
+					      sc_module_name                              name,
+#else					       
+					      string                                      name,
+#endif					       
+#ifdef STATISTICS
+					      morpheo::behavioural::Parameters_Statistics param_statistics,
+#endif
+					      Parameters                                  param );
+					       
+  public  :          Meta_Predictor              (Parameters param );
+  public  :          ~Meta_Predictor             (void);
+					       
+#ifdef SYSTEMC				       
+  private : void     allocation                (void);
+  private : void     deallocation              (void);
+				
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+  public  : void     transition                (void);
+#endif
+#endif					       
+#ifdef STATISTICS
+  public  : string   statistics                (uint32_t depth);
+#endif
+					       
+#if VHDL				       
+  public  : void     vhdl                      (void);
+  private : void     vhdl_declaration          (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
+#endif					       
+#ifdef VHDL_TESTBENCH			       
+  private : void     vhdl_testbench_transition (void);
+#endif
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Parameters.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Parameters.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Parameters.h	(revision 105)
@@ -0,0 +1,118 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Parameters_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Parameters_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/include/Parameters.h"
+#include <math.h>
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+  class Parameters : public morpheo::behavioural::Parameters
+  {
+    //-----[ fields ]------------------------------------------------------------
+  public : const bool     _have_meta_predictor               ;
+
+  public : const bool     _predictor_0_have_bht              ;
+  public : const uint32_t _predictor_0_bht_size_shifter      ;
+  public : const uint32_t _predictor_0_bht_nb_shifter        ;
+  public : const bool     _predictor_0_have_pht              ;
+  public : const uint32_t _predictor_0_pht_size_counter      ;
+  public : const uint32_t _predictor_0_pht_nb_counter        ;
+  public : const uint32_t _predictor_0_pht_size_address_share;
+
+  public : const bool     _predictor_1_have_bht              ;
+  public : const uint32_t _predictor_1_bht_size_shifter      ;
+  public : const uint32_t _predictor_1_bht_nb_shifter        ;
+  public : const bool     _predictor_1_have_pht              ;
+  public : const uint32_t _predictor_1_pht_size_counter      ;
+  public : const uint32_t _predictor_1_pht_nb_counter        ;
+  public : const uint32_t _predictor_1_pht_size_address_share;
+
+  public : const bool     _predictor_2_have_bht              ;
+  public : const uint32_t _predictor_2_bht_size_shifter      ;
+  public : const uint32_t _predictor_2_bht_nb_shifter        ;
+  public : const bool     _predictor_2_have_pht              ;
+  public : const uint32_t _predictor_2_pht_size_counter      ;
+  public : const uint32_t _predictor_2_pht_nb_counter        ;
+  public : const uint32_t _predictor_2_pht_size_address_share;
+
+  public : const uint32_t _size_address                      ;
+  public : const uint32_t _nb_prediction                     ;
+  public : const uint32_t _nb_branch_complete                ;
+
+  public : const uint32_t _size_history                      ;
+
+  public :       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters * _param_two_level_branch_predictor_0;
+  public :       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters * _param_two_level_branch_predictor_1;
+  public :       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters * _param_two_level_branch_predictor_2;
+  public :       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters        * _param_meta_predictor_glue;
+
+    //-----[ methods ]-----------------------------------------------------------
+  public : Parameters  (bool     have_meta_predictor               ,
+			
+			bool     predictor_0_have_bht              ,
+			uint32_t predictor_0_bht_size_shifter      ,
+			uint32_t predictor_0_bht_nb_shifter        ,
+			bool     predictor_0_have_pht              ,
+			uint32_t predictor_0_pht_size_counter      ,
+			uint32_t predictor_0_pht_nb_counter        ,
+			uint32_t predictor_0_pht_size_address_share,
+			
+			bool     predictor_1_have_bht              ,
+			uint32_t predictor_1_bht_size_shifter      ,
+			uint32_t predictor_1_bht_nb_shifter        ,
+			bool     predictor_1_have_pht              ,
+			uint32_t predictor_1_pht_size_counter      ,
+			uint32_t predictor_1_pht_nb_counter        ,
+			uint32_t predictor_1_pht_size_address_share,
+			
+			bool     predictor_2_have_bht              ,
+			uint32_t predictor_2_bht_size_shifter      ,
+			uint32_t predictor_2_bht_nb_shifter        ,
+			bool     predictor_2_have_pht              ,
+			uint32_t predictor_2_pht_size_counter      ,
+			uint32_t predictor_2_pht_nb_counter        ,
+			uint32_t predictor_2_pht_size_address_share,
+			
+			uint32_t size_address                      ,
+			uint32_t nb_prediction                     ,
+			uint32_t nb_branch_complete                );
+  public : Parameters  (Parameters & param) ;
+  public : ~Parameters () ;
+    
+  public : string msg_error (void);
+
+  public :        string   print      (uint32_t depth);
+  public : friend ostream& operator<< (ostream& output_stream,
+				       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters & x);
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Statistics.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Statistics.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Statistics.h	(revision 105)
@@ -0,0 +1,67 @@
+#ifdef STATISTICS
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Statistics_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Statistics_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Debug.h"
+#include "Behavioural/include/Statistics.h"
+#include "Behavioural/include/Parameters_Statistics.h"
+//#include "Behavioural/Generic/Group/include/Statistics.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h"
+
+//using namespace morpheo::behavioural::generic::group;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  class Statistics : public morpheo::behavioural::Statistics
+  {
+    // -----[ fields ]----------------------------------------------------
+  private  : const Parameters                                   _parameters;
+
+    // -----[ methods ]---------------------------------------------------
+  public   : Statistics  (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  );
+//public   : Statistics  (Statistics & stat);
+  public   : ~Statistics () ;
+    
+  public   : string   print_body (uint32_t depth);
+  public   : string   print      (uint32_t depth);
+  public   : string   print      (uint32_t depth, string component_stat);
+  public   : void     add        ();
+
+  public   : friend ostream& operator<< (ostream& output_stream,
+					 const Statistics & x);
+
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo
+
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Types.h	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/include/Types.h	(revision 105)
@@ -0,0 +1,37 @@
+#ifndef morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Type_h
+#define morpheo_behavioural_core_multi_front_end_front_end_prediction_unit_direction_meta_predictor_Type_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Common/include/Types.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+  typedef uint32_t Taddress_t;
+  typedef uint32_t Thistory_t;
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor.cpp	(revision 105)
@@ -0,0 +1,96 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+#ifdef SYSTEMC
+  Meta_Predictor::Meta_Predictor (sc_module_name name,
+#else
+  Meta_Predictor::Meta_Predictor (string name,
+#endif
+#ifdef STATISTICS
+			      morpheo::behavioural::Parameters_Statistics             param_statistics,
+#endif
+			      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters param ):
+			      _name              (name)
+			      ,_param            (param)
+#ifdef STATISTICS
+			      ,_param_statistics (param_statistics)
+#endif
+  {
+    log_printf(FUNC,Meta_Predictor,"Meta_Predictor","Begin");
+
+#ifdef SYSTEMC
+    allocation ();
+#endif
+
+#ifdef STATISTICS
+    // Allocation of statistics
+    _stat = new Statistics (static_cast<string>(_name),
+			    param_statistics          ,
+			    param);
+#endif
+
+#ifdef VHDL
+    // generate the vhdl
+    vhdl();
+#endif
+
+#ifdef SYSTEMC
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+    SC_METHOD (transition);
+    dont_initialize ();
+    sensitive_pos << *(in_CLOCK);
+#endif
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+#endif    
+
+#endif
+    log_printf(FUNC,Meta_Predictor,"Meta_Predictor","End");
+  };
+  
+  Meta_Predictor::~Meta_Predictor (void)
+  {
+    log_printf(FUNC,Meta_Predictor,"~Meta_Predictor","Begin");
+
+#ifdef STATISTICS
+    _stat->generate_file(statistics(0));
+    
+    delete _stat;
+#endif
+
+#ifdef SYSTEMC
+    deallocation ();
+#endif
+
+    log_printf(FUNC,Meta_Predictor,"~Meta_Predictor","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_allocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_allocation.cpp	(revision 105)
@@ -0,0 +1,446 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  void Meta_Predictor::allocation (void)
+  {
+    log_printf(FUNC,Meta_Predictor,"allocation","Begin");
+
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Meta_Predictor"
+#ifdef POSITION
+					     ,MIXTE
+#endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      Interface * interface = _interfaces->set_interface(""
+#ifdef POSITION
+							 , IN  
+							 , SOUTH
+							 , "Generalist interface"
+#endif
+							 );
+      
+      in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
+    }
+
+    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+     in_PREDICT_VAL                 = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
+    out_PREDICT_ACK                 = new SC_OUT(Tcontrol_t)     * [_param._nb_prediction     ];
+     in_PREDICT_ADDRESS             = new SC_IN (Taddress_t)     * [_param._nb_prediction     ];
+    out_PREDICT_HISTORY             = new SC_OUT(Thistory_t)     * [_param._nb_prediction     ];
+    out_PREDICT_DIRECTION           = new SC_OUT(Tcontrol_t)     * [_param._nb_prediction     ];
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+								);
+
+	 in_PREDICT_VAL                 [i] = interface->set_signal_valack_in        ("val"      , VAL);
+	out_PREDICT_ACK                 [i] = interface->set_signal_valack_out       ("ack"      , ACK);
+	 in_PREDICT_ADDRESS             [i] = interface->set_signal_in  <Taddress_t> ("address"  , _param._size_address);
+	out_PREDICT_HISTORY             [i] = interface->set_signal_out <Thistory_t> ("history"  , _param._size_history);
+	out_PREDICT_DIRECTION           [i] = interface->set_signal_out <Tcontrol_t> ("direction", 1);
+      }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+     in_BRANCH_COMPLETE_VAL         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
+    out_BRANCH_COMPLETE_ACK         = new SC_OUT(Tcontrol_t)     * [_param._nb_branch_complete];
+     in_BRANCH_COMPLETE_ADDRESS     = new SC_IN (Taddress_t)     * [_param._nb_branch_complete];
+     in_BRANCH_COMPLETE_HISTORY     = new SC_IN (Thistory_t)     * [_param._nb_branch_complete];
+     in_BRANCH_COMPLETE_DIRECTION   = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, EAST
+								, "Interface branch complete"
+#endif
+								);
+
+	 in_BRANCH_COMPLETE_VAL         [i] = interface->set_signal_valack_in        ("val"        , VAL);		   
+	out_BRANCH_COMPLETE_ACK         [i] = interface->set_signal_valack_out       ("ack"        , ACK);		   
+	 in_BRANCH_COMPLETE_ADDRESS     [i] = interface->set_signal_in  <Taddress_t> ("address"    , _param._size_address);
+	 in_BRANCH_COMPLETE_HISTORY     [i] = interface->set_signal_in  <Thistory_t> ("history"    , _param._size_history);
+	 in_BRANCH_COMPLETE_DIRECTION   [i] = interface->set_signal_in  <Tcontrol_t> ("direction"  , 1);
+      }
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    string name_component;
+
+    // =====[ component_Meta_Predictor_Glue ]=============================
+
+    name_component = _name+"_Meta_Predictor_Glue";
+    
+    log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
+    
+    component_Meta_Predictor_Glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Meta_Predictor_Glue (name_component.c_str()               ,
+#ifdef STATISTICS	
+																		   _param_statistics                    ,
+#endif
+																		   *(_param._param_meta_predictor_glue));
+    
+    
+    _component->set_component (component_Meta_Predictor_Glue->_component
+#ifdef POSITION
+			       , 75
+			       , 25
+			       , 10
+			       , 10
+#endif
+			       );
+    
+
+    // =====[ component_Two_Level_Branch_Predictor_2 ]====================    
+
+    name_component = _name+"_Two_Level_Branch_Predictor_2";
+    
+    log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
+    
+    component_Two_Level_Branch_Predictor_2 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
+#ifdef STATISTICS	
+																					   _param_statistics                    ,
+#endif
+																					   *(_param._param_two_level_branch_predictor_2));
+    
+
+    _component->set_component (component_Two_Level_Branch_Predictor_2->_component
+#ifdef POSITION
+			       , 75
+			       , 25
+			       , 10
+			       , 10
+#endif
+			       );
+    
+
+
+    if (_param._have_meta_predictor)
+      {
+    // =====[ component_Two_Level_Branch_Predictor_1 ]====================    
+
+    name_component = _name+"_Two_Level_Branch_Predictor_1";
+    
+    log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
+    
+    component_Two_Level_Branch_Predictor_1 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
+#ifdef STATISTICS	
+																					   _param_statistics                    ,
+#endif
+																					   *(_param._param_two_level_branch_predictor_1));
+
+    _component->set_component (component_Two_Level_Branch_Predictor_1->_component
+#ifdef POSITION
+			       , 75
+			       , 25
+			       , 10
+			       , 10
+#endif
+			       );
+
+    // =====[ component_Two_Level_Branch_Predictor_0 ]====================    
+
+    name_component = _name+"_Two_Level_Branch_Predictor_0";
+    
+    log_printf(INFO,Meta_Predictor,"allocation","Allocation : %s",name_component.c_str());
+    
+    component_Two_Level_Branch_Predictor_0 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor ::Two_Level_Branch_Predictor (name_component.c_str()               ,
+#ifdef STATISTICS	
+																					   _param_statistics                    ,
+#endif
+																					   *(_param._param_two_level_branch_predictor_0));
+    
+    _component->set_component (component_Two_Level_Branch_Predictor_0->_component
+#ifdef POSITION
+			       , 75
+			       , 25
+			       , 10
+			       , 10
+#endif
+			       );
+      
+      }
+
+    // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    // =====[ component_Meta_Predictor_Glue - Instanciation ]=============
+
+    name_component = _name+"_Meta_Predictor_Glue";
+
+    cout << "Instance : " << name_component << endl;
+
+#ifdef POSITION
+    _component->interface_map ("Meta_Predictor_Glue","",
+			       _name                ,"");
+#endif
+    
+    _component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
+    _component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
+    
+    // Interface Predict
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Meta_Predictor_Glue","predict_"+toString(i),
+				   _name                ,"predict_"+toString(i));
+#endif
+	
+	if (_param._have_meta_predictor)
+	  {
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK"        , _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_ACK");
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK"        , _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_ACK");
+	  }
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK"        , _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_ACK");
+	_component->port_map(name_component, "out_PREDICT_"+toString(i)+"_ACK"                    , _name , "out_PREDICT_"+toString(i)+"_ACK");
+	if (_param._have_meta_predictor)
+	  {									      		  	      
+	if (_param._predictor_0_have_bht)
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
+	if (_param._predictor_0_have_pht)
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_0" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
+	if (_param._predictor_1_have_bht)
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
+	if (_param._predictor_1_have_pht)
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_1" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
+	  }									      		  	      
+	if (_param._predictor_2_have_bht)
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY", _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
+	if (_param._predictor_2_have_pht)
+	_component->port_map(name_component,  "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY", _name+"_Two_Level_Branch_Predictor_2" ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
+	_component->port_map(name_component, "out_PREDICT_"+toString(i)+"_HISTORY"                , _name , "out_PREDICT_"+toString(i)+"_HISTORY");
+	_component->port_map(name_component, "out_PREDICT_"+toString(i)+"_DIRECTION"              , _name , "out_PREDICT_"+toString(i)+"_DIRECTION");
+      }
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Meta_Predictor_Glue","branch_complete_"+toString(i),
+				   _name                ,"branch_complete_"+toString(i));
+#endif
+
+	if (_param._have_meta_predictor)
+	  {
+	_component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL");
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL"         , _name+"_Two_Level_Branch_Predictor_2",  "in_BRANCH_COMPLETE_"+toString(i)+"_VAL");
+
+	_component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK"         , _name+"_Two_Level_Branch_Predictor_0", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
+	_component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK"         , _name+"_Two_Level_Branch_Predictor_1", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
+	  }					
+	_component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK"         , _name+"_Two_Level_Branch_Predictor_2", "out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_ACK"                     , _name ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
+						
+	if (_param._have_meta_predictor)	
+	  {					
+	if (_param._predictor_0_have_bht)
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_0",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" );
+	if (_param._predictor_0_have_pht)
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_0",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" );
+	if (_param._predictor_1_have_bht)
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_1",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" );
+	if (_param._predictor_1_have_pht)
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_1",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" );
+	  }					
+	if (_param._predictor_2_have_bht)
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_2",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" );
+	if (_param._predictor_2_have_pht)
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY" , _name+"_Two_Level_Branch_Predictor_2",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" );
+	_component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"                 , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY");
+	if (_param._have_meta_predictor)	
+	  {
+	_component->port_map(name_component,  "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               , _name , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");
+	_component->port_map(name_component, "out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION"   , _name+"_Two_Level_Branch_Predictor_2" , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION");
+	  }
+      }
+
+    // =====[ component_Two_Level_Branch_Predictor_2 - Instanciation ]====
+    name_component = _name+"_Two_Level_Branch_Predictor_2";
+
+    cout << "Instance : " << name_component << endl;
+
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_2","",
+				   _name         ,"");
+#endif
+	
+	_component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_2","predict_"+toString(i),
+				   _name         ,"predict_"+toString(i));
+#endif
+
+	_component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL"         , _name, "in_PREDICT_"+toString(i)+"_VAL");
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_ACK");
+	_component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
+	if (_param._predictor_2_have_bht)					       				       
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY");
+	if (_param._predictor_2_have_pht)
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY");
+      }
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_2","branch_complete_"+toString(i),
+				   _name         ,"branch_complete_"+toString(i));
+#endif
+	if (_param._have_meta_predictor)
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_VAL"         );
+	else
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     );
+	_component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_ACK"         );
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"                 );
+	if (_param._predictor_2_have_bht)						       					
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_BHT_HISTORY" );
+	if (_param._predictor_2_have_pht)						       					
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_PHT_HISTORY" );
+	if (_param._have_meta_predictor)
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_2_DIRECTION"   );
+	else
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               );	 
+      }
+
+    if (_param._have_meta_predictor)
+      {
+    // =====[ component_Two_Level_Branch_Predictor_1 - Instanciation ]====
+
+    name_component = _name+"_Two_Level_Branch_Predictor_1";
+
+    cout << "Instance : " << name_component << endl;
+
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_1","",
+				   _name         ,"");
+#endif
+	
+	_component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_1","predict_"+toString(i),
+				   _name         ,"predict_"+toString(i));
+#endif
+
+	_component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL"         , _name, "in_PREDICT_"+toString(i)+"_VAL");
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_ACK");
+	_component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
+	if (_param._predictor_1_have_bht)					       				       
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY");
+	if (_param._predictor_1_have_pht)
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY");
+      }
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_1","branch_complete_"+toString(i),
+				   _name         ,"branch_complete_"+toString(i));
+#endif
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     );
+	_component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_ACK"         );
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"                 );
+	if (_param._predictor_1_have_bht)						       					
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_BHT_HISTORY" );
+	if (_param._predictor_1_have_pht)						       					
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_1_PHT_HISTORY" );
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               );	 
+      }
+    // =====[ component_Two_Level_Branch_Predictor_0 - Instanciation ]====
+
+    name_component = _name+"_Two_Level_Branch_Predictor_0";
+
+    cout << "Instance : " << name_component << endl;
+
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_0","",
+				   _name         ,"");
+#endif
+	
+	_component->port_map(name_component, "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(name_component, "in_NRESET", _name,"in_NRESET");
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_0","predict_"+toString(i),
+				   _name         ,"predict_"+toString(i));
+#endif
+
+	_component->port_map(name_component, "in_PREDICT_"+toString(i)+"_VAL"         , _name, "in_PREDICT_"+toString(i)+"_VAL");
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_ACK");
+	_component->port_map(name_component, "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name, "in_PREDICT_"+toString(i)+"_ADDRESS");
+	if (_param._predictor_0_have_bht)					       				       
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY");
+	if (_param._predictor_0_have_pht)
+	_component->port_map(name_component,"out_PREDICT_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY");
+      }
+    
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+#ifdef POSITION
+	_component->interface_map ("Two_Level_Branch_Predictor_0","branch_complete_"+toString(i),
+				   _name         ,"branch_complete_"+toString(i));
+#endif
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"         , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"                     );
+	_component->port_map(name_component,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name+"_Meta_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_ACK"         );
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"                 );
+	if (_param._predictor_0_have_bht)						       					
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_BHT_HISTORY" );
+	if (_param._predictor_0_have_pht)						       					
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY" , _name+"_Meta_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTOR_0_PHT_HISTORY" );
+	_component->port_map(name_component, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"   , _name, "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"               );	 
+      }
+      }
+
+    log_printf(FUNC,Meta_Predictor,"allocation","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_deallocation.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_deallocation.cpp	(revision 105)
@@ -0,0 +1,65 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+  void Meta_Predictor::deallocation (void)
+  {
+    log_printf(FUNC,Meta_Predictor,"deallocation","Begin");
+
+    delete     in_CLOCK;
+    delete     in_NRESET;
+
+    delete []  in_PREDICT_VAL        ;
+    delete [] out_PREDICT_ACK        ;
+    delete []  in_PREDICT_ADDRESS    ;
+    delete [] out_PREDICT_HISTORY    ;
+    delete [] out_PREDICT_DIRECTION  ;
+
+    delete []  in_BRANCH_COMPLETE_VAL        ;
+    delete [] out_BRANCH_COMPLETE_ACK        ;
+    delete []  in_BRANCH_COMPLETE_ADDRESS    ;
+    delete []  in_BRANCH_COMPLETE_HISTORY    ;
+    delete []  in_BRANCH_COMPLETE_DIRECTION  ;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    if (_param._have_meta_predictor)
+      {
+    delete component_Two_Level_Branch_Predictor_0;
+    delete component_Two_Level_Branch_Predictor_1;
+      }
+    delete component_Two_Level_Branch_Predictor_2;
+    delete component_Meta_Predictor_Glue         ;
+    delete _component;
+
+    log_printf(FUNC,Meta_Predictor,"deallocation","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_statistics.cpp	(revision 105)
@@ -0,0 +1,53 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  string Meta_Predictor::statistics (uint32_t depth)
+  {
+    log_printf(FUNC,Meta_Predictor,"statistics","Begin");
+
+    string stat_component_Two_Level_Branch_Predictor_0 = (_param._have_meta_predictor==false)?"":component_Two_Level_Branch_Predictor_0->statistics(depth+1);
+    string stat_component_Two_Level_Branch_Predictor_1 = (_param._have_meta_predictor==false)?"":component_Two_Level_Branch_Predictor_1->statistics(depth+1);
+    string stat_component_Two_Level_Branch_Predictor_2 =                                         component_Two_Level_Branch_Predictor_2->statistics(depth+1);
+    string stat_component_Meta_Predictor_Glue          =                                         component_Meta_Predictor_Glue         ->statistics(depth+1);
+
+    string txt = _stat->print(depth,
+			      stat_component_Two_Level_Branch_Predictor_0 + 
+			      stat_component_Two_Level_Branch_Predictor_1 + 
+			      stat_component_Two_Level_Branch_Predictor_2 + 
+			      stat_component_Meta_Predictor_Glue          );
+    
+    log_printf(FUNC,Meta_Predictor,"statistics","End");
+
+    return txt;
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_transition.cpp	(revision 105)
@@ -0,0 +1,50 @@
+#ifdef SYSTEMC
+#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  void Meta_Predictor::transition (void)
+  {
+    log_printf(FUNC,Meta_Predictor,"transition","Begin");
+
+#ifdef STATISTICS
+    _stat->add();
+#endif    
+
+#ifdef VHDL_TESTBENCH
+    vhdl_testbench_transition ();
+#endif
+
+    log_printf(FUNC,Meta_Predictor,"transition","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl.cpp	(revision 105)
@@ -0,0 +1,54 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  void Meta_Predictor::vhdl (void)
+  {
+    log_printf(FUNC,Meta_Predictor,"vhdl","Begin");
+
+    Vhdl * vhdl = new Vhdl (_name);
+
+    _interfaces->set_port     (vhdl);
+    _component ->vhdl_instance(vhdl);
+
+    vhdl_declaration (vhdl);
+    vhdl_body        (vhdl);
+
+    vhdl->generate_file();
+
+    delete vhdl;
+
+    log_printf(FUNC,Meta_Predictor,"vhdl","End");
+
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_body.cpp	(revision 105)
@@ -0,0 +1,40 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  void Meta_Predictor::vhdl_body (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Meta_Predictor,"vhdl_body","Begin");
+
+    log_printf(FUNC,Meta_Predictor,"vhdl_body","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_declaration.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_declaration.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_declaration.cpp	(revision 105)
@@ -0,0 +1,40 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  void Meta_Predictor::vhdl_declaration (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Meta_Predictor,"vhdl_declaration","Begin");
+
+    log_printf(FUNC,Meta_Predictor,"vhdl_declaration","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_port.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_port.cpp	(revision 105)
@@ -0,0 +1,52 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace stage_1_ifetch {
+namespace predictor {
+namespace meta_predictor {
+
+
+  void Meta_Predictor::vhdl_port (Vhdl & vhdl)
+  {
+    log_printf(FUNC,Meta_Predictor,"vhdl_port","Begin");
+
+    vhdl.set_port (" in_CLOCK ", IN, 1);
+    vhdl.set_port (" in_NRESET", IN, 1);
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	vhdl.set_port (" in_PREDICT_VAL_"+toString(i)+"                ", IN, 1);
+	vhdl.set_port ("out_PREDICT_ACK_"+toString(i)+"                ",OUT, 1);
+	vhdl.set_port (" in_PREDICT_ADDRESS_"+toString(i)+"            ", IN,_param._size_address);
+	vhdl.set_port ("out_PREDICT_HISTORY_"+toString(i)+"            ",OUT,_param._size_history);
+    	vhdl.set_port ("out_PREDICT_DIRECTION_"+toString(i)+"          ",OUT,1);
+      }
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	vhdl.set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", IN, 1);
+	vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ",OUT, 1);
+	vhdl.set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ", IN,_param._size_address);
+	vhdl.set_port (" in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"    ", IN,_param._size_history);
+	vhdl.set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", IN, 1);
+      }
+    
+    log_printf(FUNC,Meta_Predictor,"vhdl_port","End");
+  };
+
+}; // end namespace meta_predictor
+}; // end namespace predictor
+}; // end namespace stage_1_ifetch
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_label.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_label.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_label.cpp	(revision 105)
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace stage_1_ifetch {
+namespace predictor {
+namespace meta_predictor {
+
+
+  void Meta_Predictor::vhdl_testbench_label (string label)
+  {
+    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_label","Begin");
+
+#ifdef VHDL_TESTBENCH
+    _vhdl_testbench->add_label(label);
+#endif
+    
+    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_label","End");
+  };
+
+}; // end namespace meta_predictor
+}; // end namespace predictor
+}; // end namespace stage_1_ifetch
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_port.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_port.cpp	(revision 105)
@@ -0,0 +1,51 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace stage_1_ifetch {
+namespace predictor {
+namespace meta_predictor {
+
+
+  void Meta_Predictor::vhdl_testbench_port ()
+  {
+    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_port","Begin");
+
+    _vhdl_testbench->set_port (" in_NRESET", IN, 1);
+
+    for (uint32_t i=0; i<_param._nb_prediction; i++)
+      {
+	_vhdl_testbench->set_port (" in_PREDICT_VAL_"+toString(i)+"                ", IN, 1);
+	_vhdl_testbench->set_port ("out_PREDICT_ACK_"+toString(i)+"                ",OUT, 1);
+	_vhdl_testbench->set_port (" in_PREDICT_ADDRESS_"+toString(i)+"            ", IN,_param._size_address);
+	_vhdl_testbench->set_port ("out_PREDICT_HISTORY_"+toString(i)+"            ",OUT,_param._size_history);
+    	_vhdl_testbench->set_port ("out_PREDICT_DIRECTION_"+toString(i)+"          ",OUT,1);
+      }
+
+    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+      {
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", IN, 1);
+	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ",OUT, 1);
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ", IN,_param._size_address);
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_HISTORY_"+toString(i)+"    ", IN,_param._size_history);
+	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", IN, 1);
+      }
+
+    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_port","End");
+  };
+
+}; // end namespace meta_predictor
+}; // end namespace predictor
+}; // end namespace stage_1_ifetch
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_transition.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Meta_Predictor_vhdl_testbench_transition.cpp	(revision 105)
@@ -0,0 +1,44 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Meta_Predictor.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  void Meta_Predictor::vhdl_testbench_transition ()
+  {
+    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","Begin");
+
+//  sc_start(0);
+
+    _interfaces->testbench();
+
+    log_printf(FUNC,Meta_Predictor,"vhdl_testbench_transition","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters.cpp	(revision 105)
@@ -0,0 +1,260 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+  Parameters::Parameters (bool     have_meta_predictor               ,
+			  
+			  bool     predictor_0_have_bht              ,
+			  uint32_t predictor_0_bht_size_shifter      ,
+			  uint32_t predictor_0_bht_nb_shifter        ,
+			  bool     predictor_0_have_pht              ,
+			  uint32_t predictor_0_pht_size_counter      ,
+			  uint32_t predictor_0_pht_nb_counter        ,
+			  uint32_t predictor_0_pht_size_address_share,
+			  
+			  bool     predictor_1_have_bht              ,
+			  uint32_t predictor_1_bht_size_shifter      ,
+			  uint32_t predictor_1_bht_nb_shifter        ,
+			  bool     predictor_1_have_pht              ,
+			  uint32_t predictor_1_pht_size_counter      ,
+			  uint32_t predictor_1_pht_nb_counter        ,
+			  uint32_t predictor_1_pht_size_address_share,
+			  
+			  bool     predictor_2_have_bht              ,
+			  uint32_t predictor_2_bht_size_shifter      ,
+			  uint32_t predictor_2_bht_nb_shifter        ,
+			  bool     predictor_2_have_pht              ,
+			  uint32_t predictor_2_pht_size_counter      ,
+			  uint32_t predictor_2_pht_nb_counter        ,
+			  uint32_t predictor_2_pht_size_address_share,
+			  
+			  uint32_t size_address                      ,
+			  uint32_t nb_prediction                     ,
+			  uint32_t nb_branch_complete                ):
+    _have_meta_predictor                (have_meta_predictor               ),
+
+    _predictor_0_have_bht               ((have_meta_predictor==false)?false:predictor_0_have_bht              ),
+    _predictor_0_bht_size_shifter       ((_predictor_0_have_bht==false)?0:predictor_0_bht_size_shifter      ),
+    _predictor_0_bht_nb_shifter         ((_predictor_0_have_bht==false)?0:predictor_0_bht_nb_shifter        ),
+    _predictor_0_have_pht               ((have_meta_predictor==false)?false:predictor_0_have_pht              ),
+    _predictor_0_pht_size_counter       ((_predictor_0_have_pht==false)?0:predictor_0_pht_size_counter      ),
+    _predictor_0_pht_nb_counter         ((_predictor_0_have_pht==false)?0:predictor_0_pht_nb_counter        ),
+    _predictor_0_pht_size_address_share (predictor_0_pht_size_address_share),
+
+    _predictor_1_have_bht               ((have_meta_predictor==false)?false:predictor_1_have_bht              ),
+    _predictor_1_bht_size_shifter       ((_predictor_1_have_bht==false)?0:predictor_1_bht_size_shifter      ),
+    _predictor_1_bht_nb_shifter         ((_predictor_1_have_bht==false)?0:predictor_1_bht_nb_shifter        ),
+    _predictor_1_have_pht               ((have_meta_predictor==false)?false:predictor_1_have_pht              ),
+    _predictor_1_pht_size_counter       ((_predictor_1_have_pht==false)?0:predictor_1_pht_size_counter      ),
+    _predictor_1_pht_nb_counter         ((_predictor_1_have_pht==false)?0:predictor_1_pht_nb_counter        ),
+    _predictor_1_pht_size_address_share (predictor_1_pht_size_address_share),
+
+    _predictor_2_have_bht               (predictor_2_have_bht              ),
+    _predictor_2_bht_size_shifter       ((_predictor_2_have_bht==false)?0:predictor_2_bht_size_shifter      ),
+    _predictor_2_bht_nb_shifter         ((_predictor_2_have_bht==false)?0:predictor_2_bht_nb_shifter        ),
+    _predictor_2_have_pht               (predictor_2_have_pht              ),
+    _predictor_2_pht_size_counter       ((_predictor_2_have_pht==false)?0:predictor_2_pht_size_counter      ),
+    _predictor_2_pht_nb_counter         ((_predictor_2_have_pht==false)?0:predictor_2_pht_nb_counter        ),
+    _predictor_2_pht_size_address_share (predictor_2_pht_size_address_share),
+
+    _size_address                       (size_address                      ),
+    _nb_prediction                      (nb_prediction                     ),
+    _nb_branch_complete                 (nb_branch_complete                ),
+
+    _size_history                       (_predictor_0_bht_size_shifter + _predictor_0_pht_size_counter +
+					 _predictor_1_bht_size_shifter + _predictor_1_pht_size_counter +
+					 _predictor_2_bht_size_shifter + _predictor_2_pht_size_counter )
+  {
+    log_printf(FUNC,Meta_Predictor,"Parameters","Begin");
+    
+    if (_have_meta_predictor)
+      {
+    _param_two_level_branch_predictor_0 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters (_predictor_0_have_bht              ,
+																		      _predictor_0_bht_size_shifter      ,
+																		      _predictor_0_bht_nb_shifter        ,
+																		      _predictor_0_have_pht              ,
+																		      _predictor_0_pht_size_counter      ,
+																		      _predictor_0_pht_nb_counter        ,
+																		      _predictor_0_pht_size_address_share,
+																		      _size_address                      ,
+																		      _nb_prediction                     ,
+																		      _nb_branch_complete                );
+
+    _param_two_level_branch_predictor_1 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters (_predictor_1_have_bht              ,
+																		      _predictor_1_bht_size_shifter      ,
+																		      _predictor_1_bht_nb_shifter        ,
+																		      _predictor_1_have_pht              ,
+																		      _predictor_1_pht_size_counter      ,
+																		      _predictor_1_pht_nb_counter        ,
+																		      _predictor_1_pht_size_address_share,
+																		      _size_address                      ,
+																		      _nb_prediction                     ,
+																		      _nb_branch_complete                );
+      }
+
+    _param_two_level_branch_predictor_2 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters (_predictor_2_have_bht              ,
+																		      _predictor_2_bht_size_shifter      ,
+																		      _predictor_2_bht_nb_shifter        ,
+																		      _predictor_2_have_pht              ,
+																		      _predictor_2_pht_size_counter      ,
+																		      _predictor_2_pht_nb_counter        ,
+																		      _predictor_2_pht_size_address_share,
+																		      _size_address                      ,
+																		      _nb_prediction                     ,
+																		      _nb_branch_complete                );
+
+
+    _param_meta_predictor_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters (_have_meta_predictor               ,
+																       _predictor_0_have_bht              ,
+																       _predictor_0_bht_size_shifter      ,
+																       _predictor_0_have_pht              ,
+																       _predictor_0_pht_size_counter      ,
+																       _predictor_1_have_bht              ,
+																       _predictor_1_bht_size_shifter      ,
+																       _predictor_1_have_pht              ,
+																       _predictor_1_pht_size_counter      ,
+																       _predictor_2_have_bht              ,
+																       _predictor_2_bht_size_shifter      ,
+																       _predictor_2_have_pht              ,
+																       _predictor_2_pht_size_counter      ,
+																       _nb_prediction                     ,
+																       _nb_branch_complete                );
+
+    test();
+    
+    log_printf(FUNC,Meta_Predictor,"Parameters","End");
+  };
+  
+  Parameters::Parameters (Parameters & param):
+    _have_meta_predictor                (param._have_meta_predictor               ),
+
+    _predictor_0_have_bht               (param._predictor_0_have_bht              ),
+    _predictor_0_bht_size_shifter       (param._predictor_0_bht_size_shifter      ),
+    _predictor_0_bht_nb_shifter         (param._predictor_0_bht_nb_shifter        ),
+    _predictor_0_have_pht               (param._predictor_0_have_pht              ),
+    _predictor_0_pht_size_counter       (param._predictor_0_pht_size_counter      ),
+    _predictor_0_pht_nb_counter         (param._predictor_0_pht_nb_counter        ),
+    _predictor_0_pht_size_address_share (param._predictor_0_pht_size_address_share),
+
+    _predictor_1_have_bht               (param._predictor_1_have_bht              ),
+    _predictor_1_bht_size_shifter       (param._predictor_1_bht_size_shifter      ),
+    _predictor_1_bht_nb_shifter         (param._predictor_1_bht_nb_shifter        ),
+    _predictor_1_have_pht               (param._predictor_1_have_pht              ),
+    _predictor_1_pht_size_counter       (param._predictor_1_pht_size_counter      ),
+    _predictor_1_pht_nb_counter         (param._predictor_1_pht_nb_counter        ),
+    _predictor_1_pht_size_address_share (param._predictor_1_pht_size_address_share),
+
+    _predictor_2_have_bht               (param._predictor_2_have_bht              ),
+    _predictor_2_bht_size_shifter       (param._predictor_2_bht_size_shifter      ),
+    _predictor_2_bht_nb_shifter         (param._predictor_2_bht_nb_shifter        ),
+    _predictor_2_have_pht               (param._predictor_2_have_pht              ),
+    _predictor_2_pht_size_counter       (param._predictor_2_pht_size_counter      ),
+    _predictor_2_pht_nb_counter         (param._predictor_2_pht_nb_counter        ),
+    _predictor_2_pht_size_address_share (param._predictor_2_pht_size_address_share),
+
+    _size_address                       (param._size_address                      ),
+    _nb_prediction                      (param._nb_prediction                     ),
+    _nb_branch_complete                 (param._nb_branch_complete                ),
+    
+    _size_history                       (param._size_history                      )
+  {
+    log_printf(FUNC,Meta_Predictor,"Parameters","Begin");
+
+
+    if (_have_meta_predictor)
+      {
+    _param_two_level_branch_predictor_0 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters (_predictor_0_have_bht              ,
+																		      _predictor_0_bht_size_shifter      ,
+																		      _predictor_0_bht_nb_shifter        ,
+																		      _predictor_0_have_pht              ,
+																		      _predictor_0_pht_size_counter      ,
+																		      _predictor_0_pht_nb_counter        ,
+																		      _predictor_0_pht_size_address_share,
+																		      _size_address                      ,
+																		      _nb_prediction                     ,
+																		      _nb_branch_complete                );
+
+    _param_two_level_branch_predictor_1 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters (_predictor_1_have_bht              ,
+																		      _predictor_1_bht_size_shifter      ,
+																		      _predictor_1_bht_nb_shifter        ,
+																		      _predictor_1_have_pht              ,
+																		      _predictor_1_pht_size_counter      ,
+																		      _predictor_1_pht_nb_counter        ,
+																		      _predictor_1_pht_size_address_share,
+																		      _size_address                      ,
+																		      _nb_prediction                     ,
+																		      _nb_branch_complete                );
+      }
+
+    _param_two_level_branch_predictor_2 = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::two_level_branch_predictor::Parameters (_predictor_2_have_bht              ,
+																		      _predictor_2_bht_size_shifter      ,
+																		      _predictor_2_bht_nb_shifter        ,
+																		      _predictor_2_have_pht              ,
+																		      _predictor_2_pht_size_counter      ,
+																		      _predictor_2_pht_nb_counter        ,
+																		      _predictor_2_pht_size_address_share,
+																		      _size_address                      ,
+																		      _nb_prediction                     ,
+																		      _nb_branch_complete                );
+    
+    _param_meta_predictor_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters (_have_meta_predictor               ,
+																       _predictor_0_have_bht              ,
+																       _predictor_0_bht_size_shifter      ,
+																       _predictor_0_have_pht              ,
+																       _predictor_0_pht_size_counter      ,
+																       _predictor_1_have_bht              ,
+																       _predictor_1_bht_size_shifter      ,
+																       _predictor_1_have_pht              ,
+																       _predictor_1_pht_size_counter      ,
+																       _predictor_2_have_bht              ,
+																       _predictor_2_bht_size_shifter      ,
+																       _predictor_2_have_pht              ,
+																       _predictor_2_pht_size_counter      ,
+																       _nb_prediction                     ,
+																       _nb_branch_complete                );
+
+    test();
+    log_printf(FUNC,Meta_Predictor,"Parameters","End");
+  };
+
+  Parameters::~Parameters () 
+  {
+    log_printf(FUNC,Meta_Predictor,"~Parameters","Begin");
+
+    if (_have_meta_predictor)
+      {
+    delete _param_two_level_branch_predictor_0;
+    delete _param_two_level_branch_predictor_1;
+      }
+    delete _param_two_level_branch_predictor_2;
+    delete _param_meta_predictor_glue;
+
+    log_printf(FUNC,Meta_Predictor,"~Parameters","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters_msg_error.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters_msg_error.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters_msg_error.cpp	(revision 105)
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Types.h"
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  string Parameters::msg_error(void)
+  {
+    log_printf(FUNC,Meta_Predictor,"msg_error","Begin");
+
+    string msg = "";
+
+    // note : size_shifter and size_counter is set at 0 if not need
+    if ((8*sizeof(Thistory_t)) < _size_history)
+      {
+        msg += "  - type \"Thistory_t\" is too little to the total size of history (shifter's size and counter's size)\n";
+        msg +=  "    * predictor_0_bht_size_shifter    : " + toString(_predictor_0_bht_size_shifter) + "\n";
+        msg +=  "    * predictor_0_pht_size_counter    : " + toString(_predictor_0_pht_size_counter) + "\n";
+        msg +=  "    * predictor_1_bht_size_shifter    : " + toString(_predictor_1_bht_size_shifter) + "\n";
+        msg +=  "    * predictor_1_pht_size_counter    : " + toString(_predictor_1_pht_size_counter) + "\n";
+        msg +=  "    * predictor_2_bht_size_shifter    : " + toString(_predictor_2_bht_size_shifter) + "\n";
+        msg +=  "    * predictor_2_pht_size_counter    : " + toString(_predictor_2_pht_size_counter) + "\n";
+	msg +=  "    * Thistory_t                (bits): " + toString(8*(sizeof(Thistory_t))) + "\n";
+      }
+
+    return msg;
+
+    log_printf(FUNC,Meta_Predictor,"msg_error","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Parameters_print.cpp	(revision 105)
@@ -0,0 +1,154 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Parameters.h"
+#include "Behavioural/include/XML.h"
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  string Parameters::print (uint32_t depth)
+  {
+    log_printf(FUNC,Meta_Predictor,"print","Begin");
+
+    uint32_t size_predictor_0 = _predictor_0_bht_size_shifter*_predictor_0_bht_nb_shifter+_predictor_0_pht_size_counter*_predictor_0_pht_nb_counter;
+    uint32_t size_predictor_1 = _predictor_1_bht_size_shifter*_predictor_1_bht_nb_shifter+_predictor_1_pht_size_counter*_predictor_1_pht_nb_counter;
+    uint32_t size_predictor_2 = _predictor_2_bht_size_shifter*_predictor_2_bht_nb_shifter+_predictor_2_pht_size_counter*_predictor_2_pht_nb_counter;
+    uint32_t size_predictor   = size_predictor_0+size_predictor_1+size_predictor_2;
+
+    XML xml ("meta_predictor");
+    xml.balise_open("meta_predictor");
+
+    xml.  text("");
+    xml.  comment("size predictor   : "+toString(size_predictor  )+" bits");
+    xml.  comment("size predictor_0 : "+toString(size_predictor_0)+" bits");
+    xml.  comment("size predictor_1 : "+toString(size_predictor_1)+" bits");
+    xml.  comment("size predictor_2 : "+toString(size_predictor_2)+" bits");
+    xml.  text("");
+
+    xml.  singleton_begin("have_meta_predictor               ");               
+    xml.    attribut("value",toString(_have_meta_predictor               ));
+    xml.  singleton_end();
+
+    xml.  singleton_begin("predictor_0_have_bht              ");        	
+    xml.    attribut("value",toString(_predictor_0_have_bht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_bht_size_shifter      ");	
+    xml.    attribut("value",toString(_predictor_0_bht_size_shifter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_bht_nb_shifter        ");        
+    xml.    attribut("value",toString(_predictor_0_bht_nb_shifter        ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_have_pht              ");              
+    xml.    attribut("value",toString(_predictor_0_have_pht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_pht_size_counter      ");      
+    xml.    attribut("value",toString(_predictor_0_pht_size_counter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_pht_nb_counter        ");        
+    xml.    attribut("value",toString(_predictor_0_pht_nb_counter        ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_0_pht_size_address_share");
+    xml.    attribut("value",toString(_predictor_0_pht_size_address_share));
+    xml.  singleton_end();
+
+    xml.  singleton_begin("predictor_1_have_bht              ");        	
+    xml.    attribut("value",toString(_predictor_1_have_bht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_bht_size_shifter      ");	
+    xml.    attribut("value",toString(_predictor_1_bht_size_shifter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_bht_nb_shifter        ");        
+    xml.    attribut("value",toString(_predictor_1_bht_nb_shifter        ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_have_pht              ");              
+    xml.    attribut("value",toString(_predictor_1_have_pht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_pht_size_counter      ");      
+    xml.    attribut("value",toString(_predictor_1_pht_size_counter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_pht_nb_counter        ");        
+    xml.    attribut("value",toString(_predictor_1_pht_nb_counter        ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_1_pht_size_address_share");
+    xml.    attribut("value",toString(_predictor_1_pht_size_address_share));
+    xml.  singleton_end();
+    
+    xml.  singleton_begin("predictor_2_have_bht              ");        	
+    xml.    attribut("value",toString(_predictor_2_have_bht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_bht_size_shifter      ");	
+    xml.    attribut("value",toString(_predictor_2_bht_size_shifter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_bht_nb_shifter        ");        
+    xml.    attribut("value",toString(_predictor_2_bht_nb_shifter        ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_have_pht              ");              
+    xml.    attribut("value",toString(_predictor_2_have_pht              ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_pht_size_counter      ");      
+    xml.    attribut("value",toString(_predictor_2_pht_size_counter      ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_pht_nb_counter        ");        
+    xml.    attribut("value",toString(_predictor_2_pht_nb_counter        ));
+    xml.  singleton_end();
+    xml.  singleton_begin("predictor_2_pht_size_address_share");
+    xml.    attribut("value",toString(_predictor_2_pht_size_address_share));
+    xml.  singleton_end();
+        
+    xml.  singleton_begin("size_address                      ");                      
+    xml.    attribut("value",toString(_size_address          ));
+    xml.  singleton_end();
+    xml.  singleton_begin("nb_prediction                     ");                     
+    xml.    attribut("value",toString(_nb_prediction         ));
+    xml.  singleton_end();
+    xml.  singleton_begin("nb_branch_complete                ");                
+    xml.    attribut("value",toString(_nb_branch_complete    ));
+    xml.  singleton_end();
+    
+    if (_have_meta_predictor)
+      {
+    xml.  text(_param_two_level_branch_predictor_0->print(depth+1));
+    xml.  text(_param_two_level_branch_predictor_1->print(depth+1));
+      }
+    xml.  text(_param_two_level_branch_predictor_2->print(depth+1));
+    xml.  text(_param_meta_predictor_glue         ->print(depth+1));
+
+    xml.balise_close();
+
+    log_printf(FUNC,Meta_Predictor,"print","End");
+    
+    return xml.get_body(depth);
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Parameters & x)
+  {
+    output_stream << x.print(0);
+    
+    return output_stream;
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics.cpp	(revision 105)
@@ -0,0 +1,51 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Statistics.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  Statistics::Statistics (string                                      name                       ,
+			  morpheo::behavioural::Parameters_Statistics parameters_statistics      ,
+			  Parameters                                  parameters
+			  ) :
+    morpheo::behavioural::Statistics(name                  ,
+				     parameters_statistics ),
+    _parameters(parameters)
+  {
+    log_printf(FUNC,Meta_Predictor,"Statistics","Begin");
+    log_printf(FUNC,Meta_Predictor,"Statistics","End");
+  };
+  
+  Statistics::~Statistics () 
+  { 
+    log_printf(FUNC,Meta_Predictor,"~Statistics","Begin");
+    log_printf(FUNC,Meta_Predictor,"~Statistics","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_add.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_add.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_add.cpp	(revision 105)
@@ -0,0 +1,42 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  void Statistics::add ()
+  {
+    log_printf(FUNC,Meta_Predictor,"add","Begin");
+    log_printf(FUNC,Meta_Predictor,"add","End");
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_print.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_print.cpp	(revision 105)
@@ -0,0 +1,67 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  string Statistics::print (uint32_t depth,
+			    string   component_stat)
+  {
+    log_printf(FUNC,Meta_Predictor,"print","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "<meta_predictor name=\"" << _name << "\" >" << endl
+        << print_body(depth+1) << endl
+	<< component_stat
+	<< tab << "</meta_predictor>" << endl;
+    
+    log_printf(FUNC,Meta_Predictor,"print","End");
+
+    return msg.str();
+  };
+
+  string Statistics::print (uint32_t depth)
+  {
+    return print(depth,"");
+  };
+
+  ostream& operator<< (ostream& output_stream ,
+		       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::Statistics & x)
+  {
+    output_stream << x.print(0);
+
+    return output_stream;
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_print_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_print_body.cpp	(revision 105)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor.save/src/Statistics_print_body.cpp	(revision 105)
@@ -0,0 +1,50 @@
+#ifdef STATISTICS
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/include/Statistics.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace direction {
+
+namespace meta_predictor {
+
+
+  string Statistics::print_body (uint32_t depth)
+  {
+    log_printf(FUNC,Meta_Predictor,"print_body","Begin");
+
+    string        tab = string(depth,'\t');
+    ostringstream msg;
+
+    msg << tab << "";
+    
+    log_printf(FUNC,Meta_Predictor,"print_body","End");
+
+    return msg.str();
+  };
+
+}; // end namespace meta_predictor
+
+}; // end namespace core
+}; // end namespace multi_front_end
+}; // end namespace front_end
+}; // end namespace prediction_unit
+}; // end namespace direction
+
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 105)
@@ -266,4 +266,5 @@
   const  int32_t percent_transaction_update          = 75;
   const  int32_t percent_transaction_branch_event    = 75;
+  const  int32_t percent_transaction_event           = 75;
 
   const bool     test1 = true;
@@ -271,4 +272,5 @@
   const bool     test3 = true;
   const bool     test4 = true;
+  const bool     test5 = true;
 
   std::list<request_t> ufpt;
@@ -961,5 +963,5 @@
           SC_START(1);
           in_EVENT_VAL   [context]->write(1);
-          in_EVENT_TYPE  [context]->write(EVENT_TYPE_MISS_SPECULATION);
+          in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
 
           SC_START(1);
@@ -1407,5 +1409,5 @@
           SC_START(1);
           in_EVENT_VAL   [context]->write(1);
-          in_EVENT_TYPE  [context]->write(EVENT_TYPE_MISS_SPECULATION);
+          in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
 
           SC_START(1);
@@ -2036,5 +2038,5 @@
             SC_START(1);
             in_EVENT_VAL   [context]->write(1);
-            in_EVENT_TYPE  [context]->write(EVENT_TYPE_MISS_SPECULATION);
+            in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
             
             SC_START(1);
@@ -2128,4 +2130,662 @@
               }
             
+          }
+        }
+
+      //---------------------------------------------------------------------
+      //---------------------------------------------------------------------
+      // COMMIT MISS : with RAS in UPFT and UPT
+      //---------------------------------------------------------------------
+      //---------------------------------------------------------------------
+      if (test5)
+        {
+          uint32_t context = rand() % _param->_nb_context;
+          uint32_t have_ufpt_ras = false;
+          uint32_t have_upt_ras  = false;
+          
+          {
+            LABEL("PREDICT - fill the queue");
+            uint32_t port = rand() % _param->_nb_inst_predict;
+            
+            LABEL("  * context : %d",context);
+            LABEL("  * port    : %d",port);
+            
+            for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
+              {
+                request_t request;
+                request.context          = context;
+                request.address_src      = rand();
+                request.address_dest     = rand();                                   
+                
+                request.condition        = (rand()%2)?BRANCH_CONDITION_READ_STACK:BRANCH_CONDITION_FLAG_SET;
+
+                request.take             = 1;                                              
+                request.take_good        = 1;                                              
+                request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+                request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
+                request.is_accurate      = true ;
+                request.miss_ifetch      = false;
+                request.miss_decod       = false;
+                request.miss_commit      = false;
+                request.history          = i;                                              
+                request.ras_address      = rand();                                   
+                request.ras_index        = rand()%_param->_size_ras_index[context];
+                request.ufpt_ptr         = ufpt_top [context];
+//              request.upt_ptr;
+                
+                bool have_transaction = false;
+                do
+                  {
+                    in_PREDICT_VAL              [port]->write((rand()%100)<percent_transaction_predict);
+                    in_PREDICT_CONTEXT_ID       [port]->write(request.context     );
+                    in_PREDICT_BTB_ADDRESS_SRC  [port]->write(request.address_src );
+                    in_PREDICT_BTB_ADDRESS_DEST [port]->write(request.address_dest);
+                    in_PREDICT_BTB_CONDITION    [port]->write(request.condition   );
+                    in_PREDICT_BTB_LAST_TAKE    [port]->write(request.take        );
+                    in_PREDICT_BTB_IS_ACCURATE  [port]->write(request.is_accurate );
+                    in_PREDICT_DIR_HISTORY      [port]->write(request.history     );
+                    in_PREDICT_RAS_ADDRESS      [port]->write(request.ras_address );
+                    in_PREDICT_RAS_INDEX        [port]->write(request.ras_index   );
+                    
+                    if (_param->_have_port_depth)
+                      {
+                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+                      }
+                    SC_START(0); // fct melay
+                    
+                    LABEL("PREDICT         [%d] %d - %d (accurate : %d).",
+                          port,
+                          in_PREDICT_VAL [port]->read(),
+                          out_PREDICT_ACK [port]->read(),
+                          in_PREDICT_BTB_IS_ACCURATE [port]->read());
+                    
+                    if (in_PREDICT_VAL [port]->read() and out_PREDICT_ACK [port]->read())
+                      {
+                        LABEL("PREDICT         [%d] - Transaction accepted",port);
+                        have_transaction = true;
+                        
+                        if (_param->_have_port_depth)
+                          TEST(Tprediction_ptr_t,out_PREDICT_UPDATE_PREDICTION_ID [port]->read(),ufpt_top [context]);
+                        
+                        ufpt_top [context] = (ufpt_top [context]+1)%_param->_size_ufpt_queue[context];
+                      }
+                    
+                    SC_START(1); // transition
+                    
+                  } while (not have_transaction);
+                
+                ufpt.push_back(request); // to update
+                
+                in_PREDICT_VAL [port]->write(0);
+                
+                if (_param->_have_port_depth)
+                  {
+                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+                  }
+              }
+          }
+	
+          {
+            LABEL("DECOD");
+            uint32_t port = rand() % _param->_nb_inst_decod;
+            
+            LABEL("  * context : %d",context);
+            LABEL("  * port    : %d",port);
+            
+            for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
+              {
+                request_t request = ufpt.front();
+                
+                bool have_transaction = false;
+                do
+                  {
+                    in_DECOD_VAL                  [port]->write((rand()%100)<percent_transaction_decod);
+                    in_DECOD_CONTEXT_ID           [port]->write(request.context     );
+                    in_DECOD_BTB_ADDRESS_SRC      [port]->write(request.address_src );
+                    in_DECOD_BTB_ADDRESS_DEST     [port]->write(request.address_dest);
+                    in_DECOD_BTB_CONDITION        [port]->write(request.condition   );
+                    in_DECOD_BTB_LAST_TAKE        [port]->write(request.take        );
+                    in_DECOD_RAS_ADDRESS          [port]->write(request.ras_address );
+                    in_DECOD_RAS_INDEX            [port]->write(request.ras_index   );
+                    in_DECOD_UPDATE_PREDICTION_ID [port]->write(request.ufpt_ptr    );
+                    in_DECOD_MISS_IFETCH          [port]->write(request.miss_ifetch );
+                    in_DECOD_MISS_DECOD           [port]->write(request.miss_decod  );
+                    in_DECOD_IS_ACCURATE          [port]->write(request.is_accurate );
+          
+                    have_upt_ras |= (update_ras(request.condition));
+          
+                    SC_START(0); // fct melay
+                    
+                    LABEL("DECOD           [%d] %d - %d",
+                          port,
+                          in_DECOD_VAL [port]->read(),
+                          out_DECOD_ACK [port]->read());
+                    
+                    if (in_DECOD_VAL [port]->read() and out_DECOD_ACK [port]->read())
+                      {
+                        LABEL("DECOD          [%d] - Transaction accepted",port);
+                        have_transaction = true;
+                        
+                        request.upt_ptr = upt_top [context];
+                        upt.push_back(request);
+                        ufpt.pop_front();
+                        
+                        upt_top [context] = (upt_top [context]+1)%_param->_size_upt_queue[context];
+                      }
+                    
+                    SC_START(1); // transition
+                    
+                  } while (not have_transaction);
+                
+                in_DECOD_VAL              [port]->write(0);
+                
+                if (_param->_have_port_depth)
+                  {
+                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+                  }
+              }
+          }
+
+          {
+            LABEL("PREDICT - fill the queue");
+            uint32_t port = rand() % _param->_nb_inst_predict;
+            
+            LABEL("  * context : %d",context);
+            LABEL("  * port    : %d",port);
+            
+            for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
+              {
+                request_t request;
+                request.context          = context;
+                request.address_src      = rand();
+                request.address_dest     = rand();                                   
+                request.address_good     = request.address_dest;
+                request.condition        = (rand()%2)?BRANCH_CONDITION_NONE_WITH_WRITE_STACK:BRANCH_CONDITION_FLAG_SET;
+                
+                have_ufpt_ras |= (update_ras(request.condition));
+                
+                request.take             = 1;                                              
+                request.take_good        = 1;                                              
+                request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+                request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
+                request.is_accurate      = true ;
+                request.miss_ifetch      = false;
+                request.miss_decod       = false;
+                request.miss_commit      = true;
+                request.history          = i;                                              
+                request.ras_address      = rand();                                   
+                request.ras_index        = rand()%_param->_size_ras_index[context];
+                request.ufpt_ptr         = ufpt_top [context];
+//              request.upt_ptr;
+                
+                bool have_transaction = false;
+                do
+                  {
+                    in_PREDICT_VAL              [port]->write((rand()%100)<percent_transaction_predict);
+                    in_PREDICT_CONTEXT_ID       [port]->write(request.context     );
+                    in_PREDICT_BTB_ADDRESS_SRC  [port]->write(request.address_src );
+                    in_PREDICT_BTB_ADDRESS_DEST [port]->write(request.address_dest);
+                    in_PREDICT_BTB_CONDITION    [port]->write(request.condition   );
+                    in_PREDICT_BTB_LAST_TAKE    [port]->write(request.take        );
+                    in_PREDICT_BTB_IS_ACCURATE  [port]->write(request.is_accurate );
+                    in_PREDICT_DIR_HISTORY      [port]->write(request.history     );
+                    in_PREDICT_RAS_ADDRESS      [port]->write(request.ras_address );
+                    in_PREDICT_RAS_INDEX        [port]->write(request.ras_index   );
+                    
+                    if (_param->_have_port_depth)
+                      {
+                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+                      }
+                    SC_START(0); // fct melay
+                    
+                    LABEL("PREDICT         [%d] %d - %d (accurate : %d).",
+                          port,
+                          in_PREDICT_VAL [port]->read(),
+                          out_PREDICT_ACK [port]->read(),
+                          in_PREDICT_BTB_IS_ACCURATE [port]->read());
+                    
+                    if (in_PREDICT_VAL [port]->read() and out_PREDICT_ACK [port]->read())
+                      {
+                        LABEL("PREDICT         [%d] - Transaction accepted",port);
+                        have_transaction = true;
+                        
+                        if (_param->_have_port_depth)
+                          TEST(Tprediction_ptr_t,out_PREDICT_UPDATE_PREDICTION_ID [port]->read(),ufpt_top [context]);
+                        
+                        ufpt_top [context] = (ufpt_top [context]+1)%_param->_size_ufpt_queue[context];
+                      }
+                    
+                    SC_START(1); // transition
+                    
+                  } while (not have_transaction);
+                
+                ufpt.push_back(request); // to update
+                
+                in_PREDICT_VAL [port]->write(0);
+                
+                if (_param->_have_port_depth)
+                  {
+                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+                  }
+              }
+          }
+
+          uint32_t nb_branch_before_event = 0;
+          {
+            // middle
+            std::list<request_t>::iterator it_event = upt.begin();
+            for (uint32_t i=0; i < (upt.size()>>1); ++i)
+              {
+                nb_branch_before_event ++;
+                it_event ++;
+              }
+            for (std::list<request_t>::iterator it = it_event; it != upt.end(); ++it)
+              it->miss_commit = true;
+
+            bool have_transaction = false;
+            
+            do
+              {
+                PORT_WRITE(in_EVENT_VAL   [context],(rand()%100)<percent_transaction_event);
+                PORT_WRITE(in_EVENT_TYPE  [context],EVENT_TYPE_LOAD_MISS_SPECULATION);
+                PORT_WRITE(in_EVENT_DEPTH [context],it_event->upt_ptr);
+                
+                SC_START(0);
+                
+                if (PORT_READ(in_EVENT_VAL [context]) and PORT_READ(out_EVENT_ACK [context]))
+                  {
+                    LABEL("EVENT [%d] - Transaction accepted",context);
+                    
+                    have_transaction = true;
+                  }
+                
+                SC_START(1);
+              }
+            while (not have_transaction);
+            PORT_WRITE(in_EVENT_VAL   [context],0);
+
+            upt_top_event [it_event->context] = upt_top [it_event->context];
+            upt_top       [it_event->context] = it_event->upt_ptr;
+          }
+          
+          {
+            LABEL("BRANCH_COMPLETE - Hit ifetch");
+            
+            uint32_t port = rand() % _param->_nb_inst_branch_complete;
+            
+            LABEL("  * port    : %d",port);
+            
+            std::list<request_t>::iterator it_upt = upt.begin();
+            
+            for (uint32_t i=0; i<nb_branch_before_event; ++i)
+              {
+	      bool have_transaction = false;
+              
+	      do
+		{
+		  in_BRANCH_COMPLETE_VAL        [port]->write((rand()%100)<percent_transaction_branch_complete);
+		  in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(it_upt->context     );
+		  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_upt->upt_ptr     );
+		  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_upt->address_dest);
+		  in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence );
+
+                  if (_param->_have_port_depth)
+                    {
+                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+                    }
+		  SC_START(0);
+		  
+		  LABEL("BRANCH_COMPLETE [%d] %d - %d.",port,in_BRANCH_COMPLETE_VAL [port]->read(),out_BRANCH_COMPLETE_ACK [port]->read());
+		  
+		  if (in_BRANCH_COMPLETE_VAL [port]->read() and out_BRANCH_COMPLETE_ACK [port]->read())
+		    {
+		      LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port);
+                      LABEL("  * CONTEXT_ID  : %d"  ,it_upt->context     );
+                      LABEL("  * DEPTH       : %d"  ,it_upt->upt_ptr     );
+                      LABEL("  * CONDITION   : %d"  ,it_upt->condition   );
+                      LABEL("  * ADDRESS     : %.8x",it_upt->address_dest);
+                      LABEL("  * FLAG        : %d"  ,it_upt->flag        );
+                      LABEL("  * NO_SEQUENCE : %d"  ,it_upt->no_sequence );
+
+		      have_transaction = true;
+		      
+		      TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit );
+		      TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE           [port]->read(),it_upt->take        );
+                      it_upt->take_good = it_upt->take;
+		      TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC    [port]->read(),it_upt->address_src );
+		      TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST   [port]->read(),it_upt->address_dest);
+
+                      it_upt++;
+		    }
+		  
+		  SC_START(1);
+                  
+		} while (not have_transaction);
+              
+	      in_BRANCH_COMPLETE_VAL [port]->write(0);
+	      
+              if (_param->_have_port_depth)
+                {
+              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+                }
+            }
+          }
+          
+          if (have_ufpt_ras)
+            {
+              LABEL("UPDATE - Update UPFT");
+              
+              uint32_t port = 0;
+              
+              LABEL("  * port    : %d",port);
+              std::list<request_t>::iterator it_ufpt = ufpt.end();
+              -- it_ufpt;
+              
+              for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
+                {
+                  bool have_transaction = false;
+                  
+                  do
+                    {
+                      in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
+                      
+//                    if (_param->_have_port_depth)
+//                    TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), ufpt_bottom [context]);
+//                    TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), ufpt_top [context]);
+		  
+                      SC_START(0);
+                      
+                      LABEL("UPDATE [%d] %d - %d.",port,out_UPDATE_VAL [port]->read(),in_UPDATE_ACK [port]->read());
+                      
+                      if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
+                        {
+                          LABEL("UPDATE [%d] - Transaction accepted",port);
+                          have_transaction = true;
+                          
+                          if (_param->_have_port_context_id)
+                          TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(),it_ufpt->context);
+                          TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(),(it_ufpt->miss_ifetch or
+                                                                                                    it_ufpt->miss_decod  or
+                                                                                                    it_ufpt->miss_commit ));
+//                        if (update_btb(it_ufpt->condition) or
+//                            update_dir(it_ufpt->condition))
+//                        TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(),it_ufpt->take_good);
+                          TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(),0);
+//                        if (update_btb(it_ufpt->condition))
+//                          {
+//                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(),it_ufpt->address_src);
+//                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(),it_ufpt->address_dest);
+//                        TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(),it_ufpt->condition);
+//                          }
+                          TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(),0);
+
+//                        if (update_dir(it_ufpt->condition))
+//                        if (_param->_have_port_history)
+//                        TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(),it_ufpt->history);
+//                        TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(),update_ras(it_ufpt->condition));
+                          if (update_ras(it_ufpt->condition))
+                            {
+//                            TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
+                              TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_ufpt->condition));
+                              TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_ufpt->ras_address);
+                              TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_ufpt->ras_index);
+                              TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(),not it_ufpt->miss_ifetch);
+                            }
+                        }
+                      
+                      SC_START(1);
+                    } while (not have_transaction);
+                  
+                  -- it_ufpt;
+                  
+                  
+                  in_UPDATE_ACK [port]->write(0);
+//                if (_param->_have_port_depth)
+//                TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), ufpt_bottom [context]);
+//                TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), ufpt_top [context]);
+                }
+            }
+          ufpt.clear();
+
+          {
+            LABEL("UPDATE - upt (after event)");
+            
+            uint32_t port = 0;
+            
+            LABEL("  * port                   : %d",port);
+
+            std::list<request_t>::iterator it_upt = upt.end();
+
+//             for (uint32_t i=0; i<upt.size(); i++)
+
+            uint32_t size = upt.size();
+
+            LABEL("  * size                   : %d",size);
+            LABEL("  * nb_branch_before_event : %d",nb_branch_before_event);
+
+            for (uint32_t i=nb_branch_before_event; i<size; ++i)
+              {
+                --it_upt;
+                
+                bool have_transaction = false;
+                
+                if (need_update(it_upt->condition))
+                do
+                  {
+                    in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
+
+//                   if (_param->_have_port_depth)
+//                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+//                   TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+		  
+                    SC_START(0);
+                    
+                    LABEL("UPDATE [%d] %d - %d.",port,out_UPDATE_VAL [port]->read(),in_UPDATE_ACK [port]->read());
+                    
+                    if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
+                      {
+                        LABEL("UPDATE [%d] - Transaction accepted",port);
+                        LABEL("  * address_src                : %.8x",it_upt->address_src);
+                        LABEL("  * out_UPDATE_BTB_ADDRESS_SRC : %.8x",out_UPDATE_BTB_ADDRESS_SRC[port]->read());
+
+                        have_transaction = true;
+
+                        bool btb_val = ((update_btb(it_upt->condition)));
+                        bool dir_val = (update_dir(it_upt->condition) and 
+                                        not (it_upt->miss_ifetch or it_upt->miss_decod));
+                        bool ras_val = update_ras(it_upt->condition);
+
+                        if (_param->_have_port_context_id)
+                        TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(),it_upt->context);
+                        TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(),it_upt->miss_commit);
+//                         TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(),btb_val);
+
+//                         if (btb_val)
+//                           {
+//                         TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(),it_upt->address_src);
+//                         TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(),it_upt->address_dest);
+//                         TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(),it_upt->condition);
+//                           }
+//                         TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(),dir_val);
+                        
+//                         if (dir_val)
+//                           {
+//                         TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(),it_upt->take_good);
+//                         if (_param->_have_port_history)
+//                         TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(),it_upt->history);
+//                           }
+                        TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(),ras_val);
+
+                        if (ras_val)
+                          {
+//                      TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
+                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_upt->condition));
+                        TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_upt->ras_address);
+                        TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_upt->ras_index);
+                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(),not it_upt->miss_ifetch);
+                          }
+//                         -- it_upt;
+                      }
+                    
+                    SC_START(1);
+                  } while (not have_transaction);
+              
+                upt.pop_back();
+                in_UPDATE_ACK [port]->write(0);
+//               if (_param->_have_port_depth)
+//               TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+//               TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+              }
+          }
+
+          /*
+          {
+            LABEL("BRANCH_EVENT - have miss decod");
+            
+            uint32_t port = context;
+            
+            {
+              bool have_transaction = false;
+              
+              do
+                {
+                  in_BRANCH_EVENT_ACK [port]->write((rand()%100)<percent_transaction_branch_event);
+                  
+                  SC_START(0);
+                  
+                  LABEL("BRANCH_EVENT [%d] %d - %d.",port,out_BRANCH_EVENT_VAL [port]->read(),in_BRANCH_EVENT_ACK [port]->read());
+                  
+                  if (out_BRANCH_EVENT_VAL [port]->read() and in_BRANCH_EVENT_ACK [port]->read())
+                    {
+                      LABEL("BRANCH_EVENT [%d] - Transaction accepted",port);
+                      have_transaction = true;
+                      
+                      LABEL("  * event.address_src  : %.8x,",event.address_src );
+                      LABEL("  * event.address_good : %.8x,",event.address_good);
+                      LABEL("  * event.take         : %.8x,",event.take        );
+                      
+                      TEST(Tdepth_t  ,out_BRANCH_EVENT_DEPTH            [port]->read(),event.upt_ptr);
+                      TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC      [port]->read(),event.address_src);
+                      TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take_good);
+                      if (event.take_good)
+                      TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_DEST     [port]->read(),event.address_good);
+                      
+                      event.address_src  = 0;
+                      event.take         = 0;
+                      event.address_dest = 0;
+                    }
+                  
+                  SC_START(1);
+                } while (not have_transaction);
+              
+	      in_BRANCH_EVENT_ACK [port]->write(0);
+            }
+          }
+
+          {
+            LABEL("EVENT_STATE");
+            
+            SC_START(1);
+            in_EVENT_VAL   [context]->write(1);
+            in_EVENT_TYPE  [context]->write(EVENT_TYPE_BRANCH_MISS_SPECULATION);
+            
+            SC_START(1);
+            in_EVENT_VAL   [context]->write(0);
+            in_EVENT_TYPE  [context]->write(EVENT_TYPE_NONE            );
+          }
+          */
+
+          {
+            LABEL("UPDATE - upt (before event)");
+            
+            uint32_t port = 0;
+            
+            LABEL("  * port    : %d",port);
+            LABEL("  * size    : %d",upt.size());
+            std::list<request_t>::iterator it_upt = upt.begin();
+
+            for (uint32_t i=0; i<upt.size(); i++)
+              {
+                bool have_transaction = false;
+
+                do
+                  {
+                    in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
+
+//                   if (_param->_have_port_depth)
+//                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+//                   TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+		  
+                    SC_START(0);
+                    
+                    LABEL("UPDATE [%d] %d - %d.",port,out_UPDATE_VAL [port]->read(),in_UPDATE_ACK [port]->read());
+                    
+                    if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
+                      {
+                        LABEL("UPDATE [%d] - Transaction accepted",port);
+                        have_transaction = true;
+                        
+                        if (_param->_have_port_context_id)
+                        TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(),it_upt->context);
+                        TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(),it_upt->miss_commit);
+                        TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(),it_upt->take_good);
+                        TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(),update_btb(it_upt->condition));
+                        if (update_btb(it_upt->condition))
+                          {
+                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(),it_upt->address_src);
+                        TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(),it_upt->address_dest);
+                        TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(),it_upt->condition);
+                          }
+                        TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(),update_dir(it_upt->condition) and not (it_upt->miss_ifetch or it_upt->miss_decod));
+                        
+                        if (update_dir(it_upt->condition))
+                        if (_param->_have_port_history)
+                        TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(),it_upt->history);
+                        TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(),update_ras(it_upt->condition));
+                        if (update_ras(it_upt->condition))
+                          {
+//                      TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
+                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_upt->condition));
+                        TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_upt->ras_address);
+                        TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_upt->ras_index);
+                        TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(),not it_upt->miss_ifetch);
+                          }
+
+                        ++ it_upt;
+                      }
+                    
+                    SC_START(1);
+                  } while (not have_transaction);
+                
+                in_UPDATE_ACK [port]->write(0);
+//               if (_param->_have_port_depth)
+//               TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
+//               TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
+              }
+          }
+
+          upt.clear();
+
+          // Wait Garbage Collector
+          {
+            LABEL("GARBAGE COLLECTOR");
+            LABEL(" * upt bottom : %d",upt_bottom [context]);
+            LABEL(" * upt top    : %d",upt_top    [context]);
+
+            upt_top    [context] = (upt_top_event [context]);
+            upt_bottom [context] = (upt_top       [context]);
+
+            while ((upt_bottom [context] != out_DEPTH_MIN [context]->read()) or
+                   (upt_top    [context] != out_DEPTH_MAX [context]->read()))
+              {
+                SC_START(1);
+              }
           }
         }
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h	(revision 105)
@@ -21,10 +21,13 @@
   typedef enum
     {
-      EVENT_STATE_OK                    , // Can predict
-      EVENT_STATE_FLUSH_UFPT            , // in decod  stage, detect a miss, continue to execute but flush ufpt
-      EVENT_STATE_FLUSH_UFPT_AND_UPT    , // in commit stage, detect a miss, stop context and flush ufpt and upt
-      EVENT_STATE_FLUSH_UPT             , // in commit stage, detect a miss, context is stop and ufpt is flush, update RAS
-      EVENT_STATE_UPDATE_CONTEXT        , // prediction unit is update, send signal to context manager
-      EVENT_STATE_WAIT_END_EVENT          // prediction unit is ok, wait the end of event (send by Context State)
+      EVENT_STATE_OK                      , // Can predict
+      EVENT_STATE_MISS_FLUSH_UFPT         , // in decod  stage, detect a miss  , continue to execute but flush ufpt
+      EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT , // in commit stage, detect a miss  , stop context and flush ufpt and upt
+      EVENT_STATE_MISS_FLUSH_UPT          , // in commit stage, detect a miss  , context is stop and ufpt is flush, update RAS
+      EVENT_STATE_EVENT_FLUSH_UFPT        , // in commit stage, detect an event, continue to execute but flush ufpt
+      EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT, // in commit stage, detect an event, stop context and flush ufpt and upt
+      EVENT_STATE_EVENT_FLUSH_UPT         , // in commit stage, detect an event, context is stop and ufpt is flush, update RAS
+      EVENT_STATE_UPDATE_CONTEXT          , // prediction unit is update, send signal to context manager
+      EVENT_STATE_WAIT_END_EVENT            // prediction unit is ok, wait the end of event (send by Context State)
     } event_state_t;
 
@@ -116,11 +119,14 @@
     switch (x)
       {
-      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_OK                      : return "ok"                     ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UFPT              : return "flush_ufpt"             ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UFPT_AND_UPT      : return "flush_ufpt_and_upt"     ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UPT               : return "flush_upt"              ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_UPDATE_CONTEXT          : return "update_context"         ; break;
-      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT          : return "wait_and_event"         ; break;
-      default    : return ""      ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_OK                      : return "ok"                      ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_MISS_FLUSH_UFPT         : return "miss_flush_ufpt"         ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT : return "miss_flush_ufpt_and_upt" ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_MISS_FLUSH_UPT          : return "miss_flush_upt"          ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UPT         : return "event_flush_upt"         ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UFPT        : return "event_flush_ufpt"        ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT: return "event_flush_ufpt_and_upt"; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_UPDATE_CONTEXT          : return "update_context"          ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_WAIT_END_EVENT          : return "wait_and_event"          ; break;
+      default    : return ""; break; 
       }
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h	(revision 105)
@@ -178,4 +178,7 @@
   private   : bool                          * reg_IS_ACCURATE                    ; //[nb_context]
 
+  private   : bool                          * reg_EVENT_VAL                      ; //[nb_context]
+  private   : uint32_t                      * reg_EVENT_UPT_PTR                  ; //[nb_context]
+
   private   : event_state_t                 * reg_EVENT_STATE                    ; //[nb_context]
   private   : Tdepth_t                      * reg_EVENT_DEPTH                    ; //[nb_context]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 105)
@@ -205,4 +205,7 @@
     ALLOC1(reg_UPT_EMPTY                    ,bool         ,_param->_nb_context);
 
+    ALLOC1(reg_EVENT_VAL                    ,bool         ,_param->_nb_context);
+    ALLOC1(reg_EVENT_UPT_PTR                ,uint32_t     ,_param->_nb_context);
+
     ALLOC1(reg_EVENT_STATE                  ,event_state_t,_param->_nb_context);
     ALLOC1(reg_EVENT_DEPTH                  ,Tdepth_t     ,_param->_nb_context);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp	(revision 105)
@@ -158,4 +158,7 @@
         DELETE1(reg_UPT_EMPTY                    ,_param->_nb_context);
         
+        DELETE1(reg_EVENT_VAL                    ,_param->_nb_context);
+        DELETE1(reg_EVENT_UPT_PTR                ,_param->_nb_context);
+
         DELETE1(reg_EVENT_STATE                  ,_param->_nb_context);
         DELETE1(reg_EVENT_DEPTH                  ,_param->_nb_context);
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 104)
+++ /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 105)
@@ -50,6 +50,6 @@
                                             is_accurate and
 //                                             (
-                                             (event_state == EVENT_STATE_OK            )//  or
-//                                              (event_state == EVENT_STATE_FLUSH_UFPT    ) or
+                                             (event_state == EVENT_STATE_OK)//  or
+//                                              (event_state == EVENT_STATE_MISS_FLUSH_UFPT    ) or
 //                                              (event_state == EVENT_STATE_UPDATE_CONTEXT))
                                             );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 105)
@@ -40,5 +40,7 @@
         //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
 
-        PORT_WRITE(out_DEPTH_VAL     [i],(reg_UPDATE_PREDICTION_TABLE [i][reg_UPT_TOP [i]]._state == UPDATE_PREDICTION_STATE_EMPTY));
+        PORT_WRITE(out_DEPTH_VAL     [i],((reg_UPDATE_PREDICTION_TABLE [i][reg_UPT_TOP [i]]._state == UPDATE_PREDICTION_STATE_EMPTY) 
+                                          and (reg_EVENT_STATE [i] == EVENT_STATE_OK)
+                                          ));
 	if (_param->_have_port_depth)
           {
@@ -59,4 +61,5 @@
     bool     retire_ras_from_ufpt [_param->_nb_context]; // event ufpt -> restore RAS, else update upt
     bool     retire_ras_from_upt  [_param->_nb_context]; // event upt  -> restore RAS, else restore others structure
+//     bool     have_event           [_param->_nb_context];
     bool     ufpt_update          [_param->_nb_context];
     bool     upt_update           [_param->_nb_context];
@@ -68,7 +71,12 @@
         event_state_t event_state = reg_EVENT_STATE [i];
 
-        retire_ras_from_ufpt [i] = ((event_state == EVENT_STATE_FLUSH_UFPT            ) or
-                                    (event_state == EVENT_STATE_FLUSH_UFPT_AND_UPT));
-        retire_ras_from_upt  [i] = (event_state == EVENT_STATE_FLUSH_UPT);
+        retire_ras_from_ufpt [i] = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT         ) or
+                                    (event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
+                                    (event_state == EVENT_STATE_EVENT_FLUSH_UFPT        ) or
+                                    (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT));
+        retire_ras_from_upt  [i] = ((event_state == EVENT_STATE_MISS_FLUSH_UPT) or
+                                    (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
+
+//         have_event           [i] = (event_state == EVENT_STATE_EVENT_FLUSH_UPT);
 
         ufpt_update          [i] = true;
@@ -168,5 +176,8 @@
                                                                 (state == UPDATE_PREDICTION_STATE_KO   ));
                 Tcontrol_t          state_is_event           = ((state == UPDATE_PREDICTION_STATE_KO   ) or
-                                                                (state == UPDATE_PREDICTION_STATE_EVENT));
+                                                                (state == UPDATE_PREDICTION_STATE_EVENT)//  or
+//                                                                 ((have_event[context])?(state == UPDATE_PREDICTION_STATE_OK):false)
+                                                                );
+                
                 Tcontrol_t          state_is_event_update    = state_is_event and     need_update(condition);
                 Tcontrol_t          state_is_event_no_update = state_is_event and not need_update(condition);
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 105)
@@ -50,4 +50,5 @@
             reg_IS_ACCURATE          [i] = true;
             
+            reg_EVENT_VAL            [i] = false;
             reg_EVENT_STATE          [i] = EVENT_STATE_OK;
           }
@@ -55,7 +56,9 @@
     else
       {
-        bool flush_UFPT [_param->_nb_context];
+        bool flush_UFPT    [_param->_nb_context];
 	for (uint32_t i=0; i<_param->_nb_context; i++)
-          flush_UFPT [i] = false;
+          {
+            flush_UFPT    [i] = false;
+          }
 
 	// ===================================================================
@@ -66,5 +69,5 @@
         //   * Update state -> new status is "empty"
         //   * Update pointer (bottom and accurate)
-        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * GARBAGE COLLECTOR");
+        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * GARBAGE COLLECTOR (BEGIN)");
 	for (uint32_t i=0; i<_param->_nb_context; i++)
 	  {
@@ -113,9 +116,14 @@
 //                   if (bottom = reg_UPT_UPDATE [i])
 //                     reg_UPT_UPDATE [i] = reg_UPT_BOTTOM [i];
-                  if (end_ko) // free
+
+                  if (reg_EVENT_VAL [i] and (reg_EVENT_UPT_PTR [i] == bottom))
+//                   if (end_ko) // free
                     {
+                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * END EVENT");
+                      
+                      reg_EVENT_VAL  [i] = false;
                       reg_UPT_TOP    [i] = reg_UPT_TOP_EVENT [i];
                       reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i];
-
+                      
                       if (reg_UPT_BOTTOM [i] != reg_UPT_TOP [i])
                         reg_UPT_EMPTY [i] = false;
@@ -124,4 +132,5 @@
             }
 	  }
+        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * GARBAGE COLLECTOR (END)");
 
 	// ===================================================================
@@ -218,6 +227,6 @@
                   else
                     {
-                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT (decod - miss - flush ufpt)",context);
-                      reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT;
+                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT (decod - miss - flush ufpt)",context);
+                      reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT;
                     }
 
@@ -273,5 +282,5 @@
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_ras       = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._address_ras ;
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._index_ras         = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._index_ras   ;
-                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._ifetch_prediction = true; // prediction from ifetch
+                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._ifetch_prediction = true ; // prediction from ifetch
 
                   // Update pointer
@@ -283,5 +292,4 @@
 
               // All case !!!
-
 #ifdef DEBUG_TEST
               if (reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._state != UPDATE_PREDICTION_STATE_EMPTY)
@@ -352,5 +360,5 @@
 
                   if (reg_UPT_BOTTOM [context] == reg_UPT_TOP [context])
-                    reg_UPT_EMPTY [i] = true;
+                    reg_UPT_EMPTY [context] = true;
 
 #ifdef DEBUG_TEST
@@ -364,22 +372,25 @@
                   Taddress_t    address_src         = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;
                   event_state_t event_state         = reg_EVENT_STATE [context];
-                  bool          previous_update_ras = (event_state == EVENT_STATE_FLUSH_UPT);
-                  bool          update_ras          = (new_update != depth);
-
-                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
+                  bool          previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
+                                                       (event_state == EVENT_STATE_MISS_FLUSH_UPT          ) or
+                                                       (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or
+                                                       (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
+//                   bool          update_ras          = (new_update != depth);
+
+//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
 
                   if (reg_UFPT_NB_NEED_UPDATE [context] > 0)
                     {
-                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context);
-                      reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT_AND_UPT;
+                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context);
+                      reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT;
                     }
                   else
                     {
-                      if (not previous_update_ras)
+//                       if (not previous_update_ras)
                         {
                           // have ras prediction ?
-                          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UPT (branch_complete - miss)",context);
-
-                          reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UPT;
+                          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UPT (branch_complete - miss)",context);
+
+                          reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UPT;
              
                         }
@@ -442,7 +453,9 @@
                         switch (reg_EVENT_STATE [context])
                           {
-                          case EVENT_STATE_FLUSH_UFPT             : reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT; break;
+                          case EVENT_STATE_MISS_FLUSH_UFPT         : reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT; break;
                             // impossible to have an update on ufpt and reg_upt_update>reg_upt_top
-                          case EVENT_STATE_FLUSH_UFPT_AND_UPT : reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UPT ; break;
+                          case EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT : reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UPT ; break;
+                          case EVENT_STATE_EVENT_FLUSH_UFPT        : reg_EVENT_STATE [context] = EVENT_STATE_OK             ; break;
+                          case EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT: reg_EVENT_STATE [context] = EVENT_STATE_EVENT_FLUSH_UPT; break;
                           default : break;
                           }
@@ -478,5 +491,5 @@
                         {
                           if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_EVENT) and
-                              (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_KO   ))
+                              (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_KO   ) )
                             throw ERRORMORPHEO(FUNCTION,_("Update : invalid upt state."));
                         }
@@ -507,4 +520,7 @@
                           
                           reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
+
+                          reg_EVENT_VAL     [context] = true;
+                          reg_EVENT_UPT_PTR [context] = depth;
 
 #ifdef STATISTICS
@@ -541,6 +557,12 @@
                           if (end_event)
                             {
-                              reg_UPT_UPDATE [context] = reg_UPT_BOTTOM[context];
-                              reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT;
+//                               reg_UPT_UPDATE [context] = reg_UPT_BOTTOM[context];
+
+                              if (reg_EVENT_STATE [context] == EVENT_STATE_EVENT_FLUSH_UPT)
+                                {
+                                  reg_EVENT_STATE [context] = EVENT_STATE_OK;
+                                }
+                              else
+                                reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT;
                             }
                           else
@@ -593,4 +615,6 @@
           if (PORT_READ(in_EVENT_VAL [i]) and internal_EVENT_ACK [i])
             {
+              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * EVENT");
+
               //----------------------------------------------------------------
               // Cases
@@ -606,37 +630,147 @@
               
               Tevent_type_t  event_type  = PORT_READ(in_EVENT_TYPE  [i]);
-//            Tdepth_t       depth       = PORT_READ(in_EVENT_DEPTH [i]);
-            
+
               // Test if end of miss -> all previous branch is complete
               //                     -> all next     branch is finish
-              if (event_type  == EVENT_TYPE_MISS_SPECULATION)
+
+              switch (event_type)
                 {
-                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * EVENT");
-                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * type  : EVENT_TYPE_MISS_SPECULATION");
-                  
-#ifdef DEBUG_TEST
-                  if (reg_EVENT_STATE [i] != EVENT_STATE_WAIT_END_EVENT)
-                    throw ERRORMORPHEO(FUNCTION,_("Event : invalid event state."));
-#endif
-                  
-                  // Change state
-                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_OK (event)",i);
-                  
-                  reg_EVENT_STATE [i] = EVENT_STATE_OK;
-                  reg_IS_ACCURATE [i] = true;
-
-//                   Tdepth_t depth = reg_UPT_TOP [i];
-
-#ifdef DEBUG_TEST
-//                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO_WAIT_END)
-//                     throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
-//                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO)
-//                     throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
-#endif
-                  
-//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",i,depth);
+                case EVENT_TYPE_BRANCH_MISS_SPECULATION :
+                  {
+                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * type  : EVENT_TYPE_BRANCH_MISS_SPECULATION");
+                    
+#ifdef DEBUG_TEST
+                    if (reg_EVENT_STATE [i] != EVENT_STATE_WAIT_END_EVENT)
+                      throw ERRORMORPHEO(FUNCTION,_("Event : invalid event state."));
+#endif
+                    
+                    // Change state
+                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_OK (event)",i);
+                    
+                    reg_EVENT_STATE [i] = EVENT_STATE_OK;
+                    reg_IS_ACCURATE [i] = true;
+                    
+//                  Tdepth_t depth = reg_UPT_TOP [i];
+
+#ifdef DEBUG_TEST
+//                  if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO_WAIT_END)
+//                    throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
+//                  if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO)
+//                    throw ERRORMORPHEO(FUNCTION,_("Event : invalid upt event state."));
+#endif
+                  
+//                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END_KO (update)",i,depth);
                           
-//                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
-
+//                  reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
+
+                    break;
+                  }
+                case EVENT_TYPE_LOAD_MISS_SPECULATION :
+                case EVENT_TYPE_EXCEPTION             :
+                  {
+                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * type  : EVENT_TYPE_LOAD_MISS_SPECULATION");
+
+                    // Have a miss !!!
+                    // Flush UPFT
+                    flush_UFPT [i] = true;
+                    
+                    // Flush UPT
+                    Tdepth_t depth      = (_param->_have_port_depth)?PORT_READ(in_EVENT_DEPTH [i]):0;
+                    uint32_t top        = reg_UPT_TOP    [i];
+                    uint32_t bottom     = reg_UPT_BOTTOM [i];
+                    uint32_t new_update = ((top==0)?_param->_size_upt_queue[i]:top)-1; 
+                    uint32_t full       = ((depth == top) and (top == bottom) and not reg_UPT_EMPTY [i]);
+                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top        : %d",top);
+                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth      : %d",depth);
+                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * new_update : %d",new_update);
+
+                    
+#ifdef DEBUG_TEST
+                    if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
+                      throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
+#endif
+
+                    // flush all slot after the event
+                    for (uint32_t j=depth;
+                         j!=top; 
+                         j=(j+1)%_param->_size_upt_queue[i])
+                      reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EVENT;
+                      
+                    // test full :
+                    if (full)
+                      reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
+              
+//                  reg_UPT_BOTTOM    [i];
+                    // TODO : special case : event is an exception on branch, also depth is not valid
+                    reg_UPT_TOP       [i] = depth; // depth is again valid
+                    reg_UPT_TOP_EVENT [i] = top;
+
+                    if (bottom == reg_UPT_TOP [i])
+                      reg_UPT_EMPTY [i] = true;
+
+                    reg_EVENT_VAL     [i] = true;
+                    reg_EVENT_UPT_PTR [i] = depth;
+                    event_state_t event_state         = reg_EVENT_STATE [i];
+                    bool          previous_update_ras = ((event_state == EVENT_STATE_MISS_FLUSH_UFPT_AND_UPT ) or
+                                                         (event_state == EVENT_STATE_MISS_FLUSH_UPT          ) or
+                                                         (event_state == EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT) or
+                                                         (event_state == EVENT_STATE_EVENT_FLUSH_UPT));
+                    bool          update_ras          = (top != depth) or full;
+
+                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * update_ras : %d",update_ras);
+                    
+                    // new state :
+                    //   * test if ufpt is empty
+                    //     * ok : flush upft and upt
+                    //     * ko : test if have previous flush upt
+                    //            * ok : nothing
+                    //            * ko : flush upt
+                    if (reg_UFPT_NB_NEED_UPDATE [i] > 0)
+                      {
+                        if (update_ras)
+                          {
+                            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT (branch_complete - miss)",i);
+                            reg_EVENT_STATE [i] = EVENT_STATE_EVENT_FLUSH_UFPT_AND_UPT;
+                          }
+                        else
+                          {
+                            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_EVENT_FLUSH_UFPT (branch_complete - miss)",i);
+                            reg_EVENT_STATE [i] = EVENT_STATE_EVENT_FLUSH_UFPT;
+                          }                          
+                      }
+                    else
+                      {
+//                         if (not previous_update_ras)
+                        if (update_ras)
+                          {
+                            // have ras prediction ?
+                            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_EVENT_FLUSH_UPT (branch_complete - miss)",i);
+                            
+                            reg_EVENT_STATE [i] = EVENT_STATE_EVENT_FLUSH_UPT;
+                          }
+                        else
+                          {
+                            reg_EVENT_STATE [i] = EVENT_STATE_OK;
+                          }
+                      }
+                    
+                    if (not previous_update_ras and update_ras)
+                      {
+                        reg_UPT_UPDATE [i]  = new_update;
+                      }
+                    // else no update
+                    
+                    reg_EVENT_DEPTH           [i] = depth;
+//                  reg_EVENT_ADDRESS_SRC     [i] = address_src; // delay_slot is compute in I_State
+//                  reg_EVENT_ADDRESS_DEST_VAL[i] = good_take;
+//                  reg_EVENT_ADDRESS_DEST    [i] = good_addr;
+
+                    break;
+                  }
+                default :
+                  {
+                    // nothing
+                    break;
+                  }
                 }
             }
@@ -706,4 +840,6 @@
       {
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_IS_ACCURATE           : %d",reg_IS_ACCURATE        [i]);
+        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_VAL             : %d"  ,reg_EVENT_VAL             [i]);
+        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_UPT_PTR         : %d"  ,reg_EVENT_UPT_PTR         [i]);
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_STATE           : %s"  ,toString(reg_EVENT_STATE [i]).c_str());
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_DEPTH           : %d"  ,reg_EVENT_DEPTH           [i]);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp	(revision 105)
@@ -68,5 +68,5 @@
   ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE               ,"out_DECOD_NO_EXECUTE               ",Tcontrol_t           ,_param->_sum_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT            ,"out_DECOD_IS_DELAY_SLOT            ",Tcontrol_t           ,_param->_sum_inst_decod);
-  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                  ,"out_DECOD_ADDRESS                  ",Tgeneral_data_t      ,_param->_sum_inst_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,"out_DECOD_ADDRESS_NEXT             ",Tgeneral_data_t      ,_param->_sum_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,"out_DECOD_HAS_IMMEDIAT             ",Tcontrol_t           ,_param->_sum_inst_decod);
   ALLOC1_SC_SIGNAL(out_DECOD_IMMEDIAT                 ,"out_DECOD_IMMEDIAT                 ",Tgeneral_data_t      ,_param->_sum_inst_decod);
@@ -97,4 +97,5 @@
   ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_IS_DELAY_SLOT     ," in_COMMIT_EVENT_IS_DELAY_SLOT     ",Tcontrol_t           );
   ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS           ," in_COMMIT_EVENT_ADDRESS           ",Taddress_t           );
+  ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ," in_COMMIT_EVENT_ADDRESS_EPCR_VAL  ",Tcontrol_t           );
   ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR      ," in_COMMIT_EVENT_ADDRESS_EPCR      ",Taddress_t           );
   ALLOC0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ," in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ",Tcontrol_t           );
@@ -155,5 +156,5 @@
   INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_NO_EXECUTE               ,_param->_sum_inst_decod);
   INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_IS_DELAY_SLOT            ,_param->_sum_inst_decod);
-  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS                  ,_param->_sum_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_ADDRESS_NEXT             ,_param->_sum_inst_decod);
   INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_HAS_IMMEDIAT             ,_param->_sum_inst_decod);
   INSTANCE1_SC_SIGNAL(_Front_end,out_DECOD_IMMEDIAT                 ,_param->_sum_inst_decod);
@@ -188,4 +189,5 @@
   INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_IS_DELAY_SLOT     );
   INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS           );
+  INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
   INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS_EPCR      );
   INSTANCE0_SC_SIGNAL(_Front_end, in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
@@ -315,5 +317,5 @@
   DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE               ,_param->_sum_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT            ,_param->_sum_inst_decod);
-  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                  ,_param->_sum_inst_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT             ,_param->_sum_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT             ,_param->_sum_inst_decod);
   DELETE1_SC_SIGNAL(out_DECOD_IMMEDIAT                 ,_param->_sum_inst_decod);
@@ -344,4 +346,5 @@
   DELETE0_SC_SIGNAL( in_COMMIT_EVENT_IS_DELAY_SLOT     );
   DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS           );
+  DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR_VAL  );
   DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR      );
   DELETE0_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h	(revision 105)
@@ -94,5 +94,5 @@
   public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_NO_EXECUTE                ;//[sum_inst_decod]
   public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_IS_DELAY_SLOT             ;//[sum_inst_decod]
-  public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_ADDRESS                   ;//[sum_inst_decod]
+  public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_ADDRESS_NEXT              ;//[sum_inst_decod]
   public    : SC_OUT(Tcontrol_t           ) ** out_DECOD_HAS_IMMEDIAT              ;//[sum_inst_decod]
   public    : SC_OUT(Tgeneral_data_t      ) ** out_DECOD_IMMEDIAT                  ;//[sum_inst_decod]
@@ -127,4 +127,5 @@
   public    : SC_IN (Tcontrol_t           )  *  in_COMMIT_EVENT_IS_DELAY_SLOT       ;
   public    : SC_IN (Taddress_t           )  *  in_COMMIT_EVENT_ADDRESS             ;
+  public    : SC_IN (Tcontrol_t           )  *  in_COMMIT_EVENT_ADDRESS_EPCR_VAL    ;
   public    : SC_IN (Taddress_t           )  *  in_COMMIT_EVENT_ADDRESS_EPCR        ;
   public    : SC_IN (Tcontrol_t           )  *  in_COMMIT_EVENT_ADDRESS_EEAR_VAL    ;
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp	(revision 105)
@@ -97,5 +97,5 @@
       ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE                 ,"NO_EXECUTE"       ,Tcontrol_t           ,1                                   );
       ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT              ,"IS_DELAY_SLOT"    ,Tcontrol_t           ,1                                   );
-      ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"ADDRESS"          ,Tgeneral_data_t      ,_param->_size_instruction_address   );
+      ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS_NEXT               ,"ADDRESS_NEXT"     ,Tgeneral_data_t      ,_param->_size_instruction_address   );
       ALLOC1_SIGNAL_OUT (out_DECOD_HAS_IMMEDIAT               ,"HAS_IMMEDIAT"     ,Tcontrol_t           ,1                                   );
       ALLOC1_SIGNAL_OUT (out_DECOD_IMMEDIAT                   ,"IMMEDIAT"         ,Tgeneral_data_t      ,_param->_size_general_data          );
@@ -138,4 +138,5 @@
       ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_IS_DELAY_SLOT       ,"IS_DELAY_SLOT"    ,Tcontrol_t           ,1                       );
       ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS             ,"ADDRESS"          ,Taddress_t           ,_param->_size_instruction_address   );
+      ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL    ,"ADDRESS_EPCR_VAL" ,Tcontrol_t           ,1                       );
       ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EPCR        ,"ADDRESS_EPCR"     ,Taddress_t           ,_param->_size_instruction_address   );
       ALLOC_SIGNAL_IN   ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,"ADDRESS_EEAR_VAL" ,Tcontrol_t           ,1                       );
@@ -698,6 +699,6 @@
           PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT",
                               dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT");
-          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS"      ,
-                              dest,"out_DECOD_"+toString(x)+"_ADDRESS"      );
+          PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS_NEXT" ,
+                              dest,"out_DECOD_"+toString(x)+"_ADDRESS_NEXT" );
           PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAS_IMMEDIAT" ,
                               dest,"out_DECOD_"+toString(x)+"_HAS_IMMEDIAT" );
@@ -919,4 +920,6 @@
         PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS"         ,
                             dest, "in_COMMIT_EVENT_ADDRESS"         );
+        PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR_VAL",
+                            dest, "in_COMMIT_EVENT_ADDRESS_EPCR_VAL");
         PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR"    ,
                             dest, "in_COMMIT_EVENT_ADDRESS_EPCR"    );
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 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp	(revision 105)
@@ -49,5 +49,5 @@
         DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                 ,_param->_sum_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT              ,_param->_sum_inst_decod,1                                   );
-        DELETE1_SIGNAL(out_DECOD_ADDRESS                    ,_param->_sum_inst_decod,_param->_size_instruction_address   );
+        DELETE1_SIGNAL(out_DECOD_ADDRESS_NEXT               ,_param->_sum_inst_decod,_param->_size_instruction_address   );
         DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT               ,_param->_sum_inst_decod,1                                   );
         DELETE1_SIGNAL(out_DECOD_IMMEDIAT                   ,_param->_sum_inst_decod,_param->_size_general_data          );
@@ -80,4 +80,5 @@
         DELETE_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT       ,1                       );
         DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS             ,_param->_size_instruction_address   );
+        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL    ,1                       );
         DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR        ,_param->_size_instruction_address   );
         DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,1                       );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp	(revision 105)
@@ -68,5 +68,5 @@
   ALLOC2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ," in_INSERT_NO_EXECUTE              ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   ALLOC2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ," in_INSERT_IS_DELAY_SLOT           ",Tcontrol_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
-  ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS                 ," in_INSERT_ADDRESS                 ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+  ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ," in_INSERT_ADDRESS_NEXT            ",Taddress_t        ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION               ," in_INSERT_EXCEPTION               ",Texception_t      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION_USE           ," in_INSERT_EXCEPTION_USE           ",Texception_t      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
@@ -153,4 +153,5 @@
   ALLOC_SC_SIGNAL (out_UPDATE_IS_DELAY_SLOT            ,"out_UPDATE_IS_DELAY_SLOT            ",Tcontrol_t        );
   ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS                  ,"out_UPDATE_ADDRESS                  ",Taddress_t        );
+  ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR_VAL         ,"out_UPDATE_ADDRESS_EPCR_VAL         ",Tcontrol_t        );
   ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR             ,"out_UPDATE_ADDRESS_EPCR             ",Taddress_t        );
   ALLOC_SC_SIGNAL (out_UPDATE_ADDRESS_EEAR_VAL         ,"out_UPDATE_ADDRESS_EEAR_VAL         ",Tcontrol_t        );
@@ -205,5 +206,5 @@
   INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
-  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+  INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
@@ -302,4 +303,5 @@
   INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_IS_DELAY_SLOT            );
   INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS                  );
+  INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS_EPCR_VAL         );
   INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS_EPCR             );
   INSTANCE_SC_SIGNAL (_Commit_unit,out_UPDATE_ADDRESS_EEAR_VAL         );
@@ -418,5 +420,5 @@
 		  in_INSERT_IS_DELAY_SLOT           [i][j]->write(0);
 		  in_INSERT_NO_EXECUTE              [i][j]->write(0);
-		  in_INSERT_ADDRESS                 [i][j]->write(addr);
+		  in_INSERT_ADDRESS_NEXT            [i][j]->write(addr);
 		  in_INSERT_EXCEPTION               [i][j]->write(0);
 		  in_INSERT_EXCEPTION_USE           [i][j]->write(0);
@@ -615,5 +617,5 @@
   DELETE2_SC_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   DELETE2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
-  DELETE2_SC_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+  DELETE2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
   DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
@@ -698,4 +700,5 @@
   DELETE_SC_SIGNAL (out_UPDATE_IS_DELAY_SLOT            );
   DELETE_SC_SIGNAL (out_UPDATE_ADDRESS                  );
+  DELETE_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR_VAL         );
   DELETE_SC_SIGNAL (out_UPDATE_ADDRESS_EPCR             );
   DELETE_SC_SIGNAL (out_UPDATE_ADDRESS_EEAR_VAL         );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h	(revision 105)
@@ -83,5 +83,5 @@
   public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_NO_EXECUTE                ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_IS_DELAY_SLOT             ;//[nb_rename_unit][nb_inst_insert]
-  public    : SC_IN (Taddress_t         ) ***  in_INSERT_ADDRESS                   ;//[nb_rename_unit][nb_inst_insert]
+  public    : SC_IN (Taddress_t         ) ***  in_INSERT_ADDRESS_NEXT              ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_IN (Texception_t       ) ***  in_INSERT_EXCEPTION                 ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_IN (Texception_t       ) ***  in_INSERT_EXCEPTION_USE             ;//[nb_rename_unit][nb_inst_insert]
@@ -179,4 +179,5 @@
   public    : SC_OUT(Tcontrol_t         )   * out_UPDATE_IS_DELAY_SLOT             ;
   public    : SC_OUT(Taddress_t         )   * out_UPDATE_ADDRESS                   ;
+  public    : SC_OUT(Tcontrol_t         )   * out_UPDATE_ADDRESS_EPCR_VAL          ;
   public    : SC_OUT(Taddress_t         )   * out_UPDATE_ADDRESS_EPCR              ;
   public    : SC_OUT(Tcontrol_t         )   * out_UPDATE_ADDRESS_EEAR_VAL          ;
@@ -229,5 +230,5 @@
   private   : bool                         ** reg_EVENT_FLUSH                      ;//[nb_front_end][nb_context]
 
-  private   : Taddress_t                   ** reg_PC_PREVIOUS                      ;//[nb_front_end][nb_context]
+//private   : Taddress_t                   ** reg_PC_PREVIOUS                      ;//[nb_front_end][nb_context]
   private   : Taddress_t                   ** reg_PC_CURRENT                       ;//[nb_front_end][nb_context]
   private   : Taddress_t                   ** reg_PC_CURRENT_IS_DS                 ;//[nb_front_end][nb_context]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h	(revision 105)
@@ -42,7 +42,11 @@
       ROB_END_BRANCH_MISS_SPECULATIVE, // 
       ROB_END_BRANCH_MISS            , // 
+      ROB_END_LOAD_MISS_SPECULATIVE  , // 
+      ROB_END_LOAD_MISS_UPDATE       , // 
+      ROB_END_LOAD_MISS              , // 
       ROB_END_MISS                   , // 
       ROB_END_EXCEPTION_WAIT_HEAD    , // 
-      ROB_END_EXCEPTION               // 
+      ROB_END_EXCEPTION_UPDATE       , // 
+      ROB_END_EXCEPTION                // 
     } rob_state_t;
 
@@ -58,5 +62,5 @@
   public  : Toperation_t       operation               ;
   public  : Tcontrol_t         is_delay_slot           ;
-  public  : Tgeneral_data_t    address                 ;
+//public  : Tgeneral_data_t    address                 ;
   public  : Tcontrol_t         use_store_queue         ;
   public  : Tcontrol_t         use_load_queue          ;
@@ -86,5 +90,6 @@
   public  : Tspecial_data_t    flags                   ;
   public  : Tcontrol_t         no_sequence             ;
-  public  : Tgeneral_data_t    data_commit             ; // branch's destination
+//public  : Tgeneral_data_t    data_commit             ; // branch's destination
+  public  : Taddress_t         address_next            ;
 
 //   public  : entry_t (uint32_t           ptr                     ,
@@ -177,6 +182,10 @@
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_BRANCH_MISS_SPECULATIVE: return "ROB_END_BRANCH_MISS_SPECULATIVE" ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_BRANCH_MISS            : return "ROB_END_BRANCH_MISS"             ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_LOAD_MISS_SPECULATIVE  : return "ROB_END_LOAD_MISS_SPECULATIVE"   ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_LOAD_MISS_UPDATE       : return "ROB_END_LOAD_MISS_UPDATE"        ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_LOAD_MISS              : return "ROB_END_LOAD_MISS"               ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_MISS                   : return "ROB_END_MISS"                    ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION_WAIT_HEAD    : return "ROB_END_EXCEPTION_WAIT_HEAD"     ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION_UPDATE       : return "ROB_END_EXCEPTION_UPDATE"        ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION              : return "ROB_END_EXCEPTION"               ; break;
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 105)
@@ -71,5 +71,5 @@
       _ALLOC2_SIGNAL_IN ( in_INSERT_NO_EXECUTE              ,"no_execute"           ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_IN ( in_INSERT_IS_DELAY_SLOT           ,"is_delay_slot"        ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
-      _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS                 ,"address"              ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+      _ALLOC2_SIGNAL_IN ( in_INSERT_ADDRESS_NEXT            ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION               ,"exception"            ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_IN ( in_INSERT_EXCEPTION_USE           ,"exception_use"        ,Texception_t      ,_param->_size_exception             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
@@ -192,4 +192,5 @@
       ALLOC_SIGNAL_OUT(out_UPDATE_IS_DELAY_SLOT            ,"is_delay_slot"   ,Tcontrol_t         ,1);
       ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS                  ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
+      ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS_EPCR_VAL         ,"address_epcr_val",Tcontrol_t         ,1);
       ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS_EPCR             ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
       ALLOC_SIGNAL_OUT(out_UPDATE_ADDRESS_EEAR_VAL         ,"address_eear_val",Tcontrol_t         ,1);
@@ -284,5 +285,5 @@
     ALLOC2(reg_EVENT_FLUSH          ,bool          ,_param->_nb_front_end,_param->_nb_context [it1]);
 
-    ALLOC2(reg_PC_PREVIOUS          ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
+//  ALLOC2(reg_PC_PREVIOUS          ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     ALLOC2(reg_PC_CURRENT           ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
     ALLOC2(reg_PC_CURRENT_IS_DS     ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp	(revision 105)
@@ -39,5 +39,5 @@
         DELETE2_SIGNAL( in_INSERT_NO_EXECUTE              ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
         DELETE2_SIGNAL( in_INSERT_IS_DELAY_SLOT           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                                   );
-        DELETE2_SIGNAL( in_INSERT_ADDRESS                 ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
+        DELETE2_SIGNAL( in_INSERT_ADDRESS_NEXT            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_instruction_address               );
         DELETE2_SIGNAL( in_INSERT_EXCEPTION               ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
         DELETE2_SIGNAL( in_INSERT_EXCEPTION_USE           ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_exception             );
@@ -129,4 +129,5 @@
         DELETE_SIGNAL (out_UPDATE_IS_DELAY_SLOT            ,1                         );
         DELETE_SIGNAL (out_UPDATE_ADDRESS                  ,_param->_size_instruction_address     );
+        DELETE_SIGNAL (out_UPDATE_ADDRESS_EPCR_VAL         ,1                         );
         DELETE_SIGNAL (out_UPDATE_ADDRESS_EPCR             ,_param->_size_instruction_address     );
         DELETE_SIGNAL (out_UPDATE_ADDRESS_EEAR_VAL         ,1                         );
@@ -188,5 +189,5 @@
         DELETE2(reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
         DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
-        DELETE2(reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
+//      DELETE2(reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
         DELETE2(reg_PC_CURRENT           ,_param->_nb_front_end,_param->_nb_context [it1]);
         DELETE2(reg_PC_CURRENT_IS_DS     ,_param->_nb_front_end,_param->_nb_context [it1]);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp	(revision 105)
@@ -80,4 +80,5 @@
 		    (state == ROB_END_KO         ) or 
 		    (state == ROB_END_BRANCH_MISS) or 
+		    (state == ROB_END_LOAD_MISS  ) or 
 		    (state == ROB_END_MISS       )//  or 
 // 		    (state == ROB_END_EXCEPTION)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp	(revision 105)
@@ -99,5 +99,5 @@
 		      if (_param->_have_port_depth)
 		      PORT_WRITE(out_BRANCH_COMPLETE_DEPTH        [i], entry->depth           );
-		      PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS      [i], entry->data_commit     );
+		      PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS      [i], entry->address_next    );
 // 		      PORT_WRITE(out_BRANCH_COMPLETE_FLAG         [i],(entry->flags&FLAG_F)!=0);
 		      PORT_WRITE(out_BRANCH_COMPLETE_NO_SEQUENCE  [i], entry->no_sequence     );
@@ -117,18 +117,67 @@
     // ===================================================================
     {
-      Tcontrol_t val = false;
-
-      if (not _rob[reg_NUM_BANK_HEAD].empty())
-	{
-	  entry_t    * entry = _rob [reg_NUM_BANK_HEAD].front();
-	  rob_state_t  state = entry->state;
-
-	  val   = (state == ROB_END_EXCEPTION);
-	  
-	  if (val)
-	    {
-	      throw ERRORMORPHEO(FUNCTION,_("Moore : exception is not yet supported (Coming Soon).\n"));
-	    }
-	}
+      internal_UPDATE_VAL = 0;
+      internal_UPDATE_NUM_BANK = reg_NUM_BANK_HEAD;
+
+      if (not _rob[internal_UPDATE_NUM_BANK].empty())
+	{
+          log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE");
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank : %d",internal_UPDATE_NUM_BANK);
+
+	  entry_t * entry = _rob [internal_UPDATE_NUM_BANK].front();
+
+          switch (entry->state)
+            {
+            case ROB_END_EXCEPTION_UPDATE :
+              {
+                internal_UPDATE_VAL = 1;
+                throw ERRORMORPHEO(FUNCTION,_("Moore : exception is not yet supported (Coming Soon).\n"));
+                break;
+              }
+            case ROB_END_LOAD_MISS_UPDATE :
+              {
+                log_printf(TRACE,Commit_unit,FUNCTION,"    * ROB_END_LOAD_MISS_UPDATE");
+
+                internal_UPDATE_VAL = 1;
+
+                Tcontext_t front_end_id = entry->front_end_id;
+                Tcontext_t context_id   = entry->context_id  ;
+
+                log_printf(TRACE,Commit_unit,FUNCTION,"      * front_end_id : %d",front_end_id);
+                log_printf(TRACE,Commit_unit,FUNCTION,"      * context_id   : %d",context_id  );
+
+                if (_param->_have_port_front_end_id)
+                PORT_WRITE(out_UPDATE_FRONT_END_ID    ,front_end_id);
+                if (_param->_have_port_context_id)
+                PORT_WRITE(out_UPDATE_CONTEXT_ID      ,context_id  );
+                if (_param->_have_port_depth)
+                PORT_WRITE(out_UPDATE_DEPTH           ,entry->depth);
+                PORT_WRITE(out_UPDATE_TYPE            ,EVENT_TYPE_LOAD_MISS_SPECULATION);
+//                 PORT_WRITE(out_UPDATE_IS_DELAY_SLOT   ,reg_PC_CURRENT_IS_DS      [front_end_id][context_id]);
+//                 PORT_WRITE(out_UPDATE_ADDRESS         ,reg_PC_CURRENT            [front_end_id][context_id]);
+//                 PORT_WRITE(out_UPDATE_ADDRESS_EPCR_VAL,reg_PC_CURRENT_IS_DS_TAKE [front_end_id][context_id]);
+//                 PORT_WRITE(out_UPDATE_ADDRESS_EPCR    ,reg_PC_NEXT               [front_end_id][context_id]);
+//                 PORT_WRITE(out_UPDATE_ADDRESS_EEAR_VAL,0);
+// //              PORT_WRITE(out_UPDATE_ADDRESS_EEAR    ,);
+
+                PORT_WRITE(out_UPDATE_IS_DELAY_SLOT   ,0);
+                PORT_WRITE(out_UPDATE_ADDRESS         ,reg_PC_NEXT [front_end_id][context_id]);
+                PORT_WRITE(out_UPDATE_ADDRESS_EPCR_VAL,0);
+//              PORT_WRITE(out_UPDATE_ADDRESS_EPCR    ,);
+                PORT_WRITE(out_UPDATE_ADDRESS_EEAR_VAL,0);
+//              PORT_WRITE(out_UPDATE_ADDRESS_EEAR    ,);
+
+                break;
+              }
+            default :
+              {
+//                 internal_UPDATE_VAL = 0; 
+              }
+            }
+	}
+      
+      PORT_WRITE(out_UPDATE_VAL, internal_UPDATE_VAL);
+
+      log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE (end)");
     }
  
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 105)
@@ -51,5 +51,5 @@
               reg_PC_CURRENT_IS_DS      [i][j] = 0;
               reg_PC_CURRENT_IS_DS_TAKE [i][j] = 0;
-//            reg_PC_NEXT               [i][j] = (0x100+4)>>2;
+              reg_PC_NEXT               [i][j] = (0x100+4)>>2;
 	    }
 
@@ -138,5 +138,5 @@
 		  entry->operation               = operation;
 		  entry->is_delay_slot           = PORT_READ(in_INSERT_IS_DELAY_SLOT         [x][y]);
-		  entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
+// 		  entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
 		  entry->exception               = exception;
 		  entry->exception_use           = PORT_READ(in_INSERT_EXCEPTION_USE         [x][y]);
@@ -162,4 +162,6 @@
 		  entry->num_reg_re_phy_old      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_OLD    [x][y]);
 		  entry->num_reg_re_phy_new      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW    [x][y]);
+                  entry->no_sequence             = type == TYPE_BRANCH;
+		  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
 
                   // Test if exception :
@@ -295,5 +297,5 @@
                       case ROB_MISS_WAIT_END   : {state = ROB_END_KO_SPECULATIVE; break;}
                         // Store OK, Load and other instruction
-                      case ROB_OTHER_WAIT_END  : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:((have_miss_speculation)?ROB_END_MISS:ROB_END_OK_SPECULATIVE); break;}
+                      case ROB_OTHER_WAIT_END  : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:((have_miss_speculation)?ROB_END_LOAD_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE); break;}
                       default :
                         {
@@ -304,9 +306,13 @@
 
 		    // update Re Order Buffer
-		    entry->state       = state;
-		    entry->exception   = exception;
-		    entry->flags       = PORT_READ(in_COMMIT_FLAGS       [x]);
-		    entry->no_sequence = PORT_READ(in_COMMIT_NO_SEQUENCE [x]);
-		    entry->data_commit = PORT_READ(in_COMMIT_ADDRESS     [x]);
+		    entry->state        = state;
+		    entry->exception    = exception;
+		    entry->flags        = PORT_READ(in_COMMIT_FLAGS       [x]);
+		    entry->no_sequence  = PORT_READ(in_COMMIT_NO_SEQUENCE [x]);
+                    // jalr, jr : address_dest is in register
+                    if ((entry->type      == TYPE_BRANCH) and
+                        (entry->operation == OPERATION_BRANCH_L_JALR) and
+                        (entry->read_rb))
+		    entry->address_next = PORT_READ(in_COMMIT_ADDRESS     [x]);
 		  }
 	      }
@@ -345,10 +351,24 @@
 	      Ttype_t    type         = entry->type        ;
 
-              if (state == ROB_END_BRANCH_MISS)
+              if ((state == ROB_END_OK         ) or // LOAD_MISS
+// 		  (state == ROB_END_KO         ) or 
+		  (state == ROB_END_BRANCH_MISS)//  or 
+// 		  (state == ROB_END_LOAD_MISS  ) or 
+// 		  (state == ROB_END_MISS       ) or 
+// 		  (state == ROB_END_EXCEPTION  )
+		  )
+                {
+//                reg_PC_PREVIOUS           [front_end_id][context_id] = reg_PC_CURRENT [front_end_id][context_id];
+                  reg_PC_CURRENT            [front_end_id][context_id] = reg_PC_NEXT    [front_end_id][context_id];
+                  reg_PC_CURRENT_IS_DS      [front_end_id][context_id] = entry->type == TYPE_BRANCH;
+                  reg_PC_CURRENT_IS_DS_TAKE [front_end_id][context_id] = entry->no_sequence;
+                  reg_PC_NEXT               [front_end_id][context_id] = (entry->no_sequence)?(entry->address_next):(reg_PC_CURRENT [front_end_id][context_id]+1);
+                }
+
+              if ((state == ROB_END_BRANCH_MISS) or
+                  (state == ROB_END_LOAD_MISS))
                 {
                   reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_EVENT;
                   reg_EVENT_FLUSH [front_end_id][context_id] = true;
-
-                  // TODO Compute address !!!!!!!!!!!
                 }
 	      
@@ -412,7 +432,33 @@
 	// =====[ UPDATE ]====================================================
 	// ===================================================================
-        {
-          // Not yet implemented
-        }
+        if (internal_UPDATE_VAL and PORT_READ(in_UPDATE_ACK))
+          {
+            log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE");
+
+            entry_t * entry = _rob [internal_UPDATE_NUM_BANK].front();
+
+            switch (entry->state)
+              {
+//               case ROB_END_EXCEPTION_UPDATE :
+//                 {
+//                   entry->state = ROB_END_KO;
+//                   throw ERRORMORPHEO(FUNCTION,_("Moore : exception is not yet supported (Coming Soon).\n"));
+//                   break;
+//                 }
+              case ROB_END_LOAD_MISS_UPDATE :
+                {
+                  log_printf(TRACE,Commit_unit,FUNCTION,"    * ROB_END_LOAD_MISS_UPDATE");
+
+                  entry->state = ROB_END_LOAD_MISS;
+                  break;
+                }
+              default :
+                {
+                  throw ERRORMORPHEO(FUNCTION,_("Update : invalid state.\n"));
+                  break;
+                }
+              }
+
+          }
 
 	// ===================================================================
@@ -438,6 +484,6 @@
 
               Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
-//               Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
-//               Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
+              Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
+              Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
               
               // is a valid instruction ?
@@ -455,18 +501,21 @@
               // ....... max ...X... min ....... KO
               
-//               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))));
-
               bool         flush         = reg_EVENT_FLUSH [front_end_id][context_id];
-              Tcontrol_t   is_valid      = ((depth == depth_min) and not flush);
+
+              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))))
+                                             and not flush);
+
+//            Tcontrol_t   is_valid      = ((depth == depth_min) and not flush);
 
               log_printf(TRACE,Commit_unit,FUNCTION,"  * HEAD              [%d]",i);
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d",is_valid);
+              log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d ((depth == depth_min) and not flush)",is_valid);
               log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
               log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
-//               log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
+              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
+              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_full      : %d",depth_full);
               log_printf(TRACE,Commit_unit,FUNCTION,"    * flush           : %d",flush);
 
@@ -481,4 +530,5 @@
 		    case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS     ; break;}
                     case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS     ; break;}
+                    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS     ; break;}
 		    case ROB_STORE_WAIT_HEAD_OK          : {state = ROB_STORE_HEAD_KO; break;}
 		  //case ROB_STORE_WAIT_HEAD_KO          : {state = ; break;}
@@ -498,4 +548,7 @@
 		    case ROB_END_KO                      :
                     case ROB_END_BRANCH_MISS             :
+                    case ROB_END_LOAD_MISS_UPDATE        :
+                    case ROB_END_LOAD_MISS               :
+		    case ROB_END_EXCEPTION_UPDATE        :
 		    case ROB_END_EXCEPTION               :
 		    default                              : 
@@ -517,4 +570,5 @@
 		    case ROB_END_KO_SPECULATIVE          : {state = ROB_END_KO                 ; break;}
 		    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_BRANCH_MISS        ; break;}
+		    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_LOAD_MISS_UPDATE   ; break;}
 		    default : {break;}
 		  }
@@ -528,6 +582,6 @@
 		  switch (state)
 		    {
-		    case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK; break;}
-		    case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION; break;}
+		    case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK;        break;}
+		    case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION_UPDATE; break;}
 		    default : {break;}
 		    }
@@ -549,6 +603,9 @@
       for (uint32_t j=0; j<_param->_nb_context [i]; j++)
         {
-          log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] num_inst_all : %d, num_inst_mem : %d",i,j,reg_NB_INST_COMMIT_ALL[i][j],reg_NB_INST_COMMIT_MEM[i][j]);
           log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] state        : %s",i,j,toString(reg_EVENT_STATE [i][j]).c_str());
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst_all : %d",reg_NB_INST_COMMIT_ALL[i][j]);
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * num_inst_mem : %d",reg_NB_INST_COMMIT_MEM[i][j]);
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * PC_CURRENT   : %.8x - %d %d",reg_PC_CURRENT [i][j], reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]);
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * PC_NEXT      : %.8x",reg_PC_NEXT [i][j]);
         }
 	
@@ -567,5 +624,5 @@
 	     it++)
 	  {
-            log_printf(TRACE,Commit_unit,FUNCTION,"      [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.8x (%.8x) %.1d, %.1d %.4d, %.1d %.4d, %s - %d",
+            log_printf(TRACE,Commit_unit,FUNCTION,"      [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s - %d",
                        x,
                        (*it)->front_end_id            ,
@@ -575,6 +632,6 @@
                        (*it)->type                    ,
                        (*it)->operation               ,
-                       (*it)->address                 ,
-                       (*it)->address << 2            ,
+//                     (*it)->address                 ,
+//                     (*it)->address << 2            ,
                        (*it)->is_delay_slot           ,
                        (*it)->use_store_queue         ,
@@ -603,10 +660,11 @@
                        (*it)->num_reg_re_phy_new      );
             
-            log_printf(TRACE,Commit_unit,FUNCTION,"             %.2d %.2d %.1d %.1d %.8x",
+            log_printf(TRACE,Commit_unit,FUNCTION,"             %.2d %.2d %.1d %.1d %.8x (%.8x)",
                        (*it)->exception_use ,
                        (*it)->exception     ,
                        (*it)->flags         ,
                        (*it)->no_sequence   ,
-                       (*it)->data_commit   
+                       (*it)->address_next  ,
+                       (*it)->address_next<<2
                        );
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp	(revision 105)
@@ -59,5 +59,5 @@
   ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE    ," in_RENAME_IN_NO_EXECUTE    ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ," in_RENAME_IN_IS_DELAY_SLOT ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
-  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS       ," in_RENAME_IN_ADDRESS       ",Taddress_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
+  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT  ," in_RENAME_IN_ADDRESS_NEXT  ",Taddress_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT  ," in_RENAME_IN_HAS_IMMEDIAT  ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IN_IMMEDIAT      ," in_RENAME_IN_IMMEDIAT      ",Tgeneral_data_t   ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
@@ -84,5 +84,5 @@
   ALLOC1_SC_SIGNAL(out_RENAME_OUT_NO_EXECUTE   ,"out_RENAME_OUT_NO_EXECUTE   ",Tcontrol_t        ,_param->_nb_inst_rename);
   ALLOC1_SC_SIGNAL(out_RENAME_OUT_IS_DELAY_SLOT,"out_RENAME_OUT_IS_DELAY_SLOT",Tcontrol_t        ,_param->_nb_inst_rename);
-  ALLOC1_SC_SIGNAL(out_RENAME_OUT_ADDRESS      ,"out_RENAME_OUT_ADDRESS      ",Taddress_t        ,_param->_nb_inst_rename);
+  ALLOC1_SC_SIGNAL(out_RENAME_OUT_ADDRESS_NEXT ,"out_RENAME_OUT_ADDRESS_NEXT ",Taddress_t        ,_param->_nb_inst_rename);
   ALLOC1_SC_SIGNAL(out_RENAME_OUT_HAS_IMMEDIAT ,"out_RENAME_OUT_HAS_IMMEDIAT ",Tcontrol_t        ,_param->_nb_inst_rename);
   ALLOC1_SC_SIGNAL(out_RENAME_OUT_IMMEDIAT     ,"out_RENAME_OUT_IMMEDIAT     ",Tgeneral_data_t   ,_param->_nb_inst_rename);
@@ -121,5 +121,5 @@
   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NO_EXECUTE    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
-  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS       ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
+  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS_NEXT  ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_HAS_IMMEDIAT  ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
@@ -149,5 +149,5 @@
   INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_NO_EXECUTE   ,_param->_nb_inst_rename);
   INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_IS_DELAY_SLOT,_param->_nb_inst_rename);
-  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_ADDRESS      ,_param->_nb_inst_rename);
+  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_ADDRESS_NEXT ,_param->_nb_inst_rename);
   INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_HAS_IMMEDIAT ,_param->_nb_inst_rename);
   INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_IMMEDIAT     ,_param->_nb_inst_rename);
@@ -213,5 +213,5 @@
 	    in_RENAME_IN_NO_EXECUTE   [i][j]->write(rand()%2);
 	    in_RENAME_IN_IS_DELAY_SLOT[i][j]->write(rand()%2);
-	    in_RENAME_IN_ADDRESS      [i][j]->write(address++                                                             );
+	    in_RENAME_IN_ADDRESS_NEXT [i][j]->write(address++                                                             );
 	    in_RENAME_IN_HAS_IMMEDIAT [i][j]->write(range<Tcontrol_t        >(rand(),1                                   ));
 	    in_RENAME_IN_IMMEDIAT     [i][j]->write(range<Tgeneral_data_t   >(rand(),_param->_size_general_data          ));
@@ -259,5 +259,5 @@
 
 	      // Test
-	      address = out_RENAME_OUT_ADDRESS [i]->read();
+	      address = out_RENAME_OUT_ADDRESS_NEXT [i]->read();
 
 	      TEST(bool, address<nb_rename_in, true);
@@ -269,5 +269,5 @@
 	      for (uint32_t x=0; x<_param->_nb_front_end; x++)
 		for (uint32_t y=0; y<_param->_nb_inst_decod[x]; y++)
-		  if (in_RENAME_IN_ADDRESS [x][y]->read() == address)
+		  if (in_RENAME_IN_ADDRESS_NEXT [x][y]->read() == address)
 		    {
 		      find = true;
@@ -329,5 +329,5 @@
   delete []  in_RENAME_IN_NO_EXECUTE    ;
   delete []  in_RENAME_IN_IS_DELAY_SLOT ;
-  delete []  in_RENAME_IN_ADDRESS       ;
+  delete []  in_RENAME_IN_ADDRESS_NEXT  ;
   delete []  in_RENAME_IN_HAS_IMMEDIAT  ;
   delete []  in_RENAME_IN_IMMEDIAT      ;
@@ -354,5 +354,5 @@
   delete [] out_RENAME_OUT_NO_EXECUTE   ;
   delete [] out_RENAME_OUT_IS_DELAY_SLOT;
-  delete [] out_RENAME_OUT_ADDRESS      ;
+  delete [] out_RENAME_OUT_ADDRESS_NEXT ;
   delete [] out_RENAME_OUT_HAS_IMMEDIAT ;
   delete [] out_RENAME_OUT_IMMEDIAT     ;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h	(revision 105)
@@ -76,5 +76,5 @@
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_NO_EXECUTE    ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_IS_DELAY_SLOT ;//[nb_front_end][nb_inst_decod]
-  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS       ;//[nb_front_end][nb_inst_decod]
+  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS_NEXT  ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_HAS_IMMEDIAT  ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tgeneral_data_t   )  ***  in_RENAME_IN_IMMEDIAT      ;//[nb_front_end][nb_inst_decod]
@@ -102,5 +102,5 @@
   public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_NO_EXECUTE   ;//[nb_inst_rename]
   public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_IS_DELAY_SLOT;//[nb_inst_rename]
-  public    : SC_OUT(Taddress_t        )   ** out_RENAME_OUT_ADDRESS      ;//[nb_inst_rename]
+  public    : SC_OUT(Taddress_t        )   ** out_RENAME_OUT_ADDRESS_NEXT ;//[nb_inst_rename]
   public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_HAS_IMMEDIAT ;//[nb_inst_rename]
   public    : SC_OUT(Tgeneral_data_t   )   ** out_RENAME_OUT_IMMEDIAT     ;//[nb_inst_rename]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp	(revision 105)
@@ -97,5 +97,5 @@
 			<< (*(in_RENAME_IN_NO_EXECUTE    [i][j]))
 			<< (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]))
-			<< (*(in_RENAME_IN_ADDRESS       [i][j]))
+			<< (*(in_RENAME_IN_ADDRESS_NEXT  [i][j]))
 			<< (*(in_RENAME_IN_HAS_IMMEDIAT  [i][j]))
 			<< (*(in_RENAME_IN_IMMEDIAT      [i][j]))
@@ -163,6 +163,6 @@
 		  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_VAL           [i][j]));
 		  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]));
-		  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_VAL           [i][j]));
-		  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_ADDRESS       [i][j]));
+		  (*(out_RENAME_OUT_ADDRESS_NEXT  [x])) (*(in_RENAME_IN_VAL           [i][j]));
+		  (*(out_RENAME_OUT_ADDRESS_NEXT  [x])) (*(in_RENAME_IN_ADDRESS_NEXT  [i][j]));
 		  (*(out_RENAME_OUT_HAS_IMMEDIAT  [x])) (*(in_RENAME_IN_VAL           [i][j]));
 		  (*(out_RENAME_OUT_HAS_IMMEDIAT  [x])) (*(in_RENAME_IN_HAS_IMMEDIAT  [i][j]));
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp	(revision 105)
@@ -69,5 +69,5 @@
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
-      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT  ,"address_next" ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
@@ -99,5 +99,5 @@
       ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_RENAME_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS       ,"address"      ,Taddress_t        ,_param->_size_instruction_address   );
+      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS_NEXT  ,"address_next" ,Taddress_t        ,_param->_size_instruction_address   );
       ALLOC1_SIGNAL_OUT(out_RENAME_OUT_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_RENAME_OUT_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp	(revision 105)
@@ -40,5 +40,5 @@
 	delete []  in_RENAME_IN_NO_EXECUTE    ;
 	delete []  in_RENAME_IN_IS_DELAY_SLOT ;
-	delete []  in_RENAME_IN_ADDRESS       ;
+	delete []  in_RENAME_IN_ADDRESS_NEXT  ;
 	delete []  in_RENAME_IN_HAS_IMMEDIAT  ;
 	delete []  in_RENAME_IN_IMMEDIAT      ;
@@ -66,5 +66,5 @@
 	delete [] out_RENAME_OUT_TYPE         ;
 	delete [] out_RENAME_OUT_OPERATION    ;
-	delete [] out_RENAME_OUT_ADDRESS      ;
+	delete [] out_RENAME_OUT_ADDRESS_NEXT ;
 	delete [] out_RENAME_OUT_HAS_IMMEDIAT ;
 	delete [] out_RENAME_OUT_IMMEDIAT     ;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp	(revision 105)
@@ -75,5 +75,5 @@
 		PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],PORT_READ(in_RENAME_IN_NO_EXECUTE    [x][y]));
 		PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y]));
-		PORT_WRITE(out_RENAME_OUT_ADDRESS      [i],PORT_READ(in_RENAME_IN_ADDRESS       [x][y]));
+		PORT_WRITE(out_RENAME_OUT_ADDRESS_NEXT [i],PORT_READ(in_RENAME_IN_ADDRESS_NEXT  [x][y]));
 		PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT  [x][y]));
 		PORT_WRITE(out_RENAME_OUT_IMMEDIAT     [i],PORT_READ(in_RENAME_IN_IMMEDIAT      [x][y]));
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp	(revision 105)
@@ -57,5 +57,5 @@
   ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE        ," in_RENAME_IN_NO_EXECUTE        ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT     ," in_RENAME_IN_IS_DELAY_SLOT     ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
-  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS           ," in_RENAME_IN_ADDRESS           ",Tgeneral_data_t   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
+  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT      ," in_RENAME_IN_ADDRESS_NEXT      ",Tgeneral_data_t   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ," in_RENAME_IN_HAS_IMMEDIAT      ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IN_IMMEDIAT          ," in_RENAME_IN_IMMEDIAT          ",Tgeneral_data_t   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
@@ -81,5 +81,5 @@
   ALLOC1_SC_SIGNAL(out_INSERT_NO_EXECUTE           ,"out_INSERT_NO_EXECUTE           ",Tcontrol_t        ,_param->_nb_inst_insert);
   ALLOC1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,"out_INSERT_IS_DELAY_SLOT        ",Tcontrol_t        ,_param->_nb_inst_insert);
-  ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS              ,"out_INSERT_ADDRESS              ",Tgeneral_data_t   ,_param->_nb_inst_insert);
+  ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT         ,"out_INSERT_ADDRESS_NEXT         ",Tgeneral_data_t   ,_param->_nb_inst_insert);
   ALLOC1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,"out_INSERT_HAS_IMMEDIAT         ",Tcontrol_t        ,_param->_nb_inst_insert);
   ALLOC1_SC_SIGNAL(out_INSERT_IMMEDIAT             ,"out_INSERT_IMMEDIAT             ",Tgeneral_data_t   ,_param->_nb_inst_insert);
@@ -155,5 +155,5 @@
   INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
-  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_ADDRESS           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
+  INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_ADDRESS_NEXT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_HAS_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_IMMEDIAT          ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
@@ -183,5 +183,5 @@
   INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert);
   INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert);
-  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_ADDRESS              ,_param->_nb_inst_insert);
+  INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_ADDRESS_NEXT         ,_param->_nb_inst_insert);
   INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_HAS_IMMEDIAT         ,_param->_nb_inst_insert);
   INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IMMEDIAT             ,_param->_nb_inst_insert);
@@ -297,5 +297,5 @@
   DELETE2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   DELETE2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
-  DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
+  DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   DELETE2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
   DELETE2_SC_SIGNAL( in_RENAME_IN_IMMEDIAT          ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
@@ -322,5 +322,5 @@
   DELETE1_SC_SIGNAL(out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert);
   DELETE1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert);
-  DELETE1_SC_SIGNAL(out_INSERT_ADDRESS              ,_param->_nb_inst_insert);
+  DELETE1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT         ,_param->_nb_inst_insert);
   DELETE1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,_param->_nb_inst_insert);
   DELETE1_SC_SIGNAL(out_INSERT_IMMEDIAT             ,_param->_nb_inst_insert);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h	(revision 105)
@@ -78,5 +78,5 @@
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_NO_EXECUTE        ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_IS_DELAY_SLOT     ;//[nb_front_end][nb_inst_decod]
-  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS           ;//[nb_front_end][nb_inst_decod]
+  public    : SC_IN (Taddress_t        )  ***  in_RENAME_IN_ADDRESS_NEXT      ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_HAS_IMMEDIAT      ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tgeneral_data_t   )  ***  in_RENAME_IN_IMMEDIAT          ;//[nb_front_end][nb_inst_decod]
@@ -104,5 +104,5 @@
   public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_NO_EXECUTE           ;//[nb_inst_insert]
   public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_IS_DELAY_SLOT        ;//[nb_inst_insert]
-  public    : SC_OUT(Taddress_t        )   ** out_INSERT_ADDRESS              ;//[nb_inst_insert]
+  public    : SC_OUT(Taddress_t        )   ** out_INSERT_ADDRESS_NEXT         ;//[nb_inst_insert]
   public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_HAS_IMMEDIAT         ;//[nb_inst_insert]
   public    : SC_OUT(Tgeneral_data_t   )   ** out_INSERT_IMMEDIAT             ;//[nb_inst_insert]
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp	(revision 105)
@@ -69,5 +69,5 @@
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
-      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT  ,"address_next" ,Taddress_t        ,_param->_size_instruction_address   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
@@ -99,5 +99,5 @@
       ALLOC1_SIGNAL_OUT(out_INSERT_NO_EXECUTE           ,"no_execute"           ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_INSERT_IS_DELAY_SLOT        ,"is_delay_slot"        ,Tcontrol_t        ,1                                   );
-      ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS              ,"address"              ,Taddress_t        ,_param->_size_instruction_address   );
+      ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS_NEXT         ,"address_next"         ,Taddress_t        ,_param->_size_instruction_address   );
       ALLOC1_SIGNAL_OUT(out_INSERT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_INSERT_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data          );
@@ -301,6 +301,6 @@
 	    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT",
 		                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT");
-	    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS"      ,
-		                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS"      );
+	    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" ,
+		                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" );
 	    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" ,
 		                dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" );
@@ -349,6 +349,6 @@
 	  PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_DEPTH"       ,
 		              dest,"out_INSERT_"    +toString(i)+"_DEPTH"       );
-	  PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS"     ,
-		              dest,"out_INSERT_"    +toString(i)+"_ADDRESS"     );
+	  PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS_NEXT",
+		              dest,"out_INSERT_"    +toString(i)+"_ADDRESS_NEXT");
 	  PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_HAS_IMMEDIAT",
 		              dest,"out_INSERT_"    +toString(i)+"_HAS_IMMEDIAT");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp	(revision 105)
@@ -37,5 +37,5 @@
         DELETE2_SIGNAL( in_RENAME_IN_NO_EXECUTE        ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1                                   );
         DELETE2_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT     ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1                                   );
-        DELETE2_SIGNAL( in_RENAME_IN_ADDRESS           ,_param->_nb_front_end, _param->_nb_inst_decod[it1],_param->_size_general_data          );
+        DELETE2_SIGNAL( in_RENAME_IN_ADDRESS_NEXT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1],_param->_size_instruction_address   );
         DELETE2_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1],1                                   );
         DELETE2_SIGNAL( in_RENAME_IN_IMMEDIAT          ,_param->_nb_front_end, _param->_nb_inst_decod[it1],_param->_size_general_data          );
@@ -62,5 +62,5 @@
         DELETE1_SIGNAL(out_INSERT_NO_EXECUTE           ,_param->_nb_inst_insert,1                                   );
         DELETE1_SIGNAL(out_INSERT_IS_DELAY_SLOT        ,_param->_nb_inst_insert,1                                   );
-        DELETE1_SIGNAL(out_INSERT_ADDRESS              ,_param->_nb_inst_insert,_param->_size_general_data          );
+        DELETE1_SIGNAL(out_INSERT_ADDRESS_NEXT         ,_param->_nb_inst_insert,_param->_size_instruction_address   );
         DELETE1_SIGNAL(out_INSERT_HAS_IMMEDIAT         ,_param->_nb_inst_insert,1                                   );
         DELETE1_SIGNAL(out_INSERT_IMMEDIAT             ,_param->_nb_inst_insert,_param->_size_general_data          );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp	(revision 105)
@@ -57,5 +57,5 @@
   ALLOC2_SC_SIGNAL( in_RENAME_NO_EXECUTE                ," in_RENAME_NO_EXECUTE                ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IS_DELAY_SLOT             ," in_RENAME_IS_DELAY_SLOT             ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
-  ALLOC2_SC_SIGNAL( in_RENAME_ADDRESS                   ," in_RENAME_ADDRESS                   ",Taddress_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
+  ALLOC2_SC_SIGNAL( in_RENAME_ADDRESS_NEXT              ," in_RENAME_ADDRESS_NEXT              ",Taddress_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_HAS_IMMEDIAT              ," in_RENAME_HAS_IMMEDIAT              ",Tcontrol_t        ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   ALLOC2_SC_SIGNAL( in_RENAME_IMMEDIAT                  ," in_RENAME_IMMEDIAT                  ",Tgeneral_data_t   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
@@ -143,4 +143,5 @@
   ALLOC_SC_SIGNAL (out_COMMIT_EVENT_IS_DELAY_SLOT       ,"out_COMMIT_EVENT_IS_DELAY_SLOT       ",Tcontrol_t        );
   ALLOC_SC_SIGNAL (out_COMMIT_EVENT_ADDRESS             ,"out_COMMIT_EVENT_ADDRESS             ",Taddress_t        );
+  ALLOC_SC_SIGNAL (out_COMMIT_EVENT_ADDRESS_EPCR_VAL    ,"out_COMMIT_EVENT_ADDRESS_EPCR_VAL    ",Tcontrol_t        );
   ALLOC_SC_SIGNAL (out_COMMIT_EVENT_ADDRESS_EPCR        ,"out_COMMIT_EVENT_ADDRESS_EPCR        ",Taddress_t        );
   ALLOC_SC_SIGNAL (out_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,"out_COMMIT_EVENT_ADDRESS_EEAR_VAL    ",Tcontrol_t        );
@@ -193,5 +194,5 @@
   INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_NO_EXECUTE                ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_IS_DELAY_SLOT             ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
-  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_ADDRESS                   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
+  INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_ADDRESS_NEXT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_HAS_IMMEDIAT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   INSTANCE2_SC_SIGNAL(_OOO_Engine, in_RENAME_IMMEDIAT                  ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
@@ -292,4 +293,5 @@
   INSTANCE_SC_SIGNAL (_OOO_Engine,out_COMMIT_EVENT_IS_DELAY_SLOT       );
   INSTANCE_SC_SIGNAL (_OOO_Engine,out_COMMIT_EVENT_ADDRESS             );
+  INSTANCE_SC_SIGNAL (_OOO_Engine,out_COMMIT_EVENT_ADDRESS_EPCR_VAL    );
   INSTANCE_SC_SIGNAL (_OOO_Engine,out_COMMIT_EVENT_ADDRESS_EPCR        );
   INSTANCE_SC_SIGNAL (_OOO_Engine,out_COMMIT_EVENT_ADDRESS_EEAR_VAL    );
@@ -376,5 +378,5 @@
   DELETE2_SC_SIGNAL( in_RENAME_NO_EXECUTE                ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   DELETE2_SC_SIGNAL( in_RENAME_IS_DELAY_SLOT             ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
-  DELETE2_SC_SIGNAL( in_RENAME_ADDRESS                   ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
+  DELETE2_SC_SIGNAL( in_RENAME_ADDRESS_NEXT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   DELETE2_SC_SIGNAL( in_RENAME_HAS_IMMEDIAT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
   DELETE2_SC_SIGNAL( in_RENAME_IMMEDIAT                  ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
@@ -462,4 +464,5 @@
   DELETE_SC_SIGNAL  (out_COMMIT_EVENT_IS_DELAY_SLOT       );
   DELETE_SC_SIGNAL  (out_COMMIT_EVENT_ADDRESS             );
+  DELETE_SC_SIGNAL  (out_COMMIT_EVENT_ADDRESS_EPCR_VAL    );
   DELETE_SC_SIGNAL  (out_COMMIT_EVENT_ADDRESS_EPCR        );
   DELETE_SC_SIGNAL  (out_COMMIT_EVENT_ADDRESS_EEAR_VAL    );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h	(revision 105)
@@ -77,5 +77,5 @@
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_NO_EXECUTE                ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IS_DELAY_SLOT             ;//[nb_front_end][nb_inst_decod]
-  public    : SC_IN (Taddress_t        )  ***  in_RENAME_ADDRESS                   ;//[nb_front_end][nb_inst_decod]
+  public    : SC_IN (Taddress_t        )  ***  in_RENAME_ADDRESS_NEXT              ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_HAS_IMMEDIAT              ;//[nb_front_end][nb_inst_decod]
   public    : SC_IN (Tgeneral_data_t   )  ***  in_RENAME_IMMEDIAT                  ;//[nb_front_end][nb_inst_decod]
@@ -169,4 +169,5 @@
   public    : SC_OUT(Tcontrol_t        )    * out_COMMIT_EVENT_IS_DELAY_SLOT       ;
   public    : SC_OUT(Taddress_t        )    * out_COMMIT_EVENT_ADDRESS             ;
+  public    : SC_OUT(Tcontrol_t        )    * out_COMMIT_EVENT_ADDRESS_EPCR_VAL    ;
   public    : SC_OUT(Taddress_t        )    * out_COMMIT_EVENT_ADDRESS_EPCR        ;
   public    : SC_OUT(Tcontrol_t        )    * out_COMMIT_EVENT_ADDRESS_EEAR_VAL    ;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp	(revision 105)
@@ -66,5 +66,5 @@
       _ALLOC2_SIGNAL_IN ( in_RENAME_NO_EXECUTE                ,"NO_EXECUTE"                ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IS_DELAY_SLOT             ,"IS_DELAY_SLOT"             ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
-      _ALLOC2_SIGNAL_IN ( in_RENAME_ADDRESS                   ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RENAME_ADDRESS_NEXT              ,"ADDRESS_NEXT"              ,Taddress_t        ,_param->_size_instruction_address    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_HAS_IMMEDIAT              ,"HAS_IMMEDIAT"              ,Tcontrol_t        ,1                                    ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
       _ALLOC2_SIGNAL_IN ( in_RENAME_IMMEDIAT                  ,"IMMEDIAT"                  ,Tgeneral_data_t   ,_param->_size_general_data           ,_param->_nb_front_end,_param->_nb_inst_decod[it1]);
@@ -182,4 +182,5 @@
       ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_IS_DELAY_SLOT       ,"IS_DELAY_SLOT"             ,Tcontrol_t        ,1                                    );
       ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS             ,"ADDRESS"                   ,Taddress_t        ,_param->_size_instruction_address    );
+      ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS_EPCR_VAL    ,"ADDRESS_EPCR_VAL"          ,Tcontrol_t        ,1                                    );
       ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS_EPCR        ,"ADDRESS_EPCR"              ,Taddress_t        ,_param->_size_instruction_address    );
       ALLOC_SIGNAL_OUT  (out_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,"ADDRESS_EEAR_VAL"          ,Tcontrol_t        ,1                                    );
@@ -412,6 +413,6 @@
                     PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_IS_DELAY_SLOT",
                                         dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT");
-                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ADDRESS"      ,
-                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_ADDRESS"      );
+                    PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_ADDRESS_NEXT" ,
+                                        dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_ADDRESS_NEXT" );
                     PORT_MAP(_component,src , "in_RENAME_IN_"+toString(x)+"_"+toString(k)+"_HAS_IMMEDIAT" ,
                                         dest, "in_RENAME_"   +toString(j)+"_"+toString(k)+"_HAS_IMMEDIAT" );
@@ -476,6 +477,6 @@
             COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_IS_DELAY_SLOT" ,
                                      dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT" );
-            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_ADDRESS"       ,
-                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_ADDRESS"       );
+            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_ADDRESS_NEXT"  ,
+                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT"  );
             COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)                +"_EXCEPTION_USE" ,
                                      dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE" );
@@ -754,5 +755,5 @@
 
             //    in_INSERT_DEPTH          - component_rename_unit
-            //    in_INSERT_ADDRESS        - component_rename_unit
+            //    in_INSERT_ADDRESS_NEXT   - component_rename_unit
             //    in_INSERT_EXCEPTION_USE  - component_rename_unit
             //    in_INSERT_EXCEPTION      - component_rename_unit
@@ -946,4 +947,5 @@
         PORT_MAP(_component,src ,"out_UPDATE_IS_DELAY_SLOT"   ,dest,"out_COMMIT_EVENT_IS_DELAY_SLOT"   );
         PORT_MAP(_component,src ,"out_UPDATE_ADDRESS"         ,dest,"out_COMMIT_EVENT_ADDRESS"         );
+        PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EPCR_VAL",dest,"out_COMMIT_EVENT_ADDRESS_EPCR_VAL");
         PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EPCR"    ,dest,"out_COMMIT_EVENT_ADDRESS_EPCR"    );
         PORT_MAP(_component,src ,"out_UPDATE_ADDRESS_EEAR_VAL",dest,"out_COMMIT_EVENT_ADDRESS_EEAR_VAL");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp	(revision 105)
@@ -36,5 +36,5 @@
         DELETE2_SIGNAL( in_RENAME_NO_EXECUTE                ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1                                    );
         DELETE2_SIGNAL( in_RENAME_IS_DELAY_SLOT             ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1                                    );
-        DELETE2_SIGNAL( in_RENAME_ADDRESS                   ,_param->_nb_front_end,_param->_nb_inst_decod[it1],_param->_size_general_data           );
+        DELETE2_SIGNAL( in_RENAME_ADDRESS_NEXT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1],_param->_size_instruction_address    );
         DELETE2_SIGNAL( in_RENAME_HAS_IMMEDIAT              ,_param->_nb_front_end,_param->_nb_inst_decod[it1],1                                    );
         DELETE2_SIGNAL( in_RENAME_IMMEDIAT                  ,_param->_nb_front_end,_param->_nb_inst_decod[it1],_param->_size_general_data           );
@@ -84,5 +84,5 @@
         DELETE2_SIGNAL( in_EXECUTE_LOOP_EXCEPTION           ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_exception              );
         DELETE2_SIGNAL( in_EXECUTE_LOOP_NO_SEQUENCE         ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],1                                    );
-        DELETE2_SIGNAL( in_EXECUTE_LOOP_ADDRESS             ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_general_data           );
+        DELETE2_SIGNAL( in_EXECUTE_LOOP_ADDRESS             ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_instruction_address    );
         DELETE2_SIGNAL( in_EXECUTE_LOOP_DATA                ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1],_param->_size_general_data           );
         
@@ -110,5 +110,5 @@
         DELETE1_SIGNAL(out_BRANCH_COMPLETE_CONTEXT_ID       ,_param->_nb_inst_branch_complete,_param->_size_context_id  );
         DELETE1_SIGNAL(out_BRANCH_COMPLETE_DEPTH            ,_param->_nb_inst_branch_complete,_param->_size_depth       );
-        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS          ,_param->_nb_inst_branch_complete,_param->_size_general_data);
+        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS          ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);
         DELETE1_SIGNAL(out_BRANCH_COMPLETE_NO_SEQUENCE      ,_param->_nb_inst_branch_complete,1                         );
         DELETE1_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION  ,_param->_nb_inst_branch_complete,1                         );
@@ -122,4 +122,5 @@
         DELETE_SIGNAL (out_COMMIT_EVENT_IS_DELAY_SLOT       ,1                                    );
         DELETE_SIGNAL (out_COMMIT_EVENT_ADDRESS             ,_param->_size_general_data           );
+        DELETE_SIGNAL (out_COMMIT_EVENT_ADDRESS_EPCR_VAL    ,1                                    );
         DELETE_SIGNAL (out_COMMIT_EVENT_ADDRESS_EPCR        ,_param->_size_general_data           );
         DELETE_SIGNAL (out_COMMIT_EVENT_ADDRESS_EEAR_VAL    ,1                                    );
@@ -128,6 +129,6 @@
         DELETE2_SIGNAL( in_EVENT_VAL                        ,_param->_nb_front_end,_param->_nb_context[it1],1                                    );
         DELETE2_SIGNAL(out_EVENT_ACK                        ,_param->_nb_front_end,_param->_nb_context[it1],1                                    );
-        DELETE2_SIGNAL( in_EVENT_ADDRESS                    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_general_data           );
-        DELETE2_SIGNAL( in_EVENT_ADDRESS_NEXT               ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_general_data           ); 
+        DELETE2_SIGNAL( in_EVENT_ADDRESS                    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_instruction_address);
+        DELETE2_SIGNAL( in_EVENT_ADDRESS_NEXT               ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_instruction_address); 
         DELETE2_SIGNAL( in_EVENT_ADDRESS_NEXT_VAL           ,_param->_nb_front_end,_param->_nb_context[it1],1                                    );
         DELETE2_SIGNAL( in_EVENT_IS_DS_TAKE                 ,_param->_nb_front_end,_param->_nb_context[it1],1                                    );
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_allocation.cpp	(revision 105)
@@ -286,5 +286,5 @@
         // out_DECOD_NO_EXECUTE    - ooo_engine. in_RENAME_NO_EXECUTE   
         // out_DECOD_IS_DELAY_SLOT - ooo_engine. in_RENAME_IS_DELAY_SLOT
-        // out_DECOD_ADDRESS       - ooo_engine. in_RENAME_ADDRESS      
+        // out_DECOD_ADDRESS_NEXT  - ooo_engine. in_RENAME_ADDRESS_NEXT 
         // out_DECOD_HAS_IMMEDIAT  - ooo_engine. in_RENAME_HAS_IMMEDIAT 
         // out_DECOD_IMMEDIAT      - ooo_engine. in_RENAME_IMMEDIAT     
@@ -353,4 +353,6 @@
           COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS"         ,
                                    dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS"         );
+          COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR_VAL",
+                                   dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS_EPCR_VAL");
           COMPONENT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR"    ,
                                    dest,"out_COMMIT_EVENT_FRONT_END_"+toString(i)+"_ADDRESS_EPCR"    );
@@ -455,6 +457,6 @@
               COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_IS_DELAY_SLOT",
                                        dest,"out_DECOD_"                 +toString(k)+"_IS_DELAY_SLOT");
-              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS"      ,
-                                       dest,"out_DECOD_"                 +toString(k)+"_ADDRESS"      );
+              COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_ADDRESS_NEXT" ,
+                                       dest,"out_DECOD_"                 +toString(k)+"_ADDRESS_NEXT" );
               COMPONENT_MAP(_component,src , "in_RENAME_"+toString(j)+"_"+toString(k)+"_HAS_IMMEDIAT" ,
                                        dest,"out_DECOD_"                 +toString(k)+"_HAS_IMMEDIAT" );
@@ -553,4 +555,6 @@
           COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS"         ,
                                    dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS"         );
+          COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS_EPCR_VAL",
+                                   dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS_EPCR_VAL");
           COMPONENT_MAP(_component,src ,"out_COMMIT_EVENT_ADDRESS_EPCR"    ,
                                    dest, "in_COMMIT_EVENT_OOO_ENGINE_"+toString(i)+"_ADDRESS_EPCR"    );
@@ -1274,4 +1278,5 @@
       // out_COMMIT_EVENT_FRONT_END_IS_DELAY_SLOT    - front_end. in_COMMIT_EVENT_IS_DELAY_SLOT   
       // out_COMMIT_EVENT_FRONT_END_ADDRESS          - front_end. in_COMMIT_EVENT_ADDRESS         
+      // out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR_VAL - front_end. in_COMMIT_EVENT_ADDRESS_EPCR_VAL
       // out_COMMIT_EVENT_FRONT_END_ADDRESS_EPCR     - front_end. in_COMMIT_EVENT_ADDRESS_EPCR    
       // out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL - front_end. in_COMMIT_EVENT_ADDRESS_EEAR_VAL
@@ -1286,4 +1291,5 @@
       //  in_COMMIT_EVENT_OOO_ENGINE_IS_DELAY_SLOT   - ooo_engine.out_COMMIT_EVENT_IS_DELAY_SLOT   
       //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS         - ooo_engine.out_COMMIT_EVENT_ADDRESS         
+      //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR_VAL- ooo_engine.out_COMMIT_EVENT_ADDRESS_EPCR_VAL
       //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EPCR    - ooo_engine.out_COMMIT_EVENT_ADDRESS_EPCR    
       //  in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL- ooo_engine.out_COMMIT_EVENT_ADDRESS_EEAR_VAL
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h	(revision 105)
@@ -598,7 +598,8 @@
                                                      
 #  define EVENT_TYPE_NONE                          0          // no event
-#  define EVENT_TYPE_MISS_SPECULATION              1          // miss of speculation (load or branch miss speculation)
-#  define EVENT_TYPE_EXCEPTION                     2          // exception or interruption occure
-#  define EVENT_TYPE_BRANCH_NO_ACCURATE            3          // branch is no accurate (old speculation is a miss)
+#  define EVENT_TYPE_BRANCH_MISS_SPECULATION       1          // miss of speculation (load or branch miss speculation)
+#  define EVENT_TYPE_LOAD_MISS_SPECULATION         2          // miss of speculation (load or branch miss speculation)
+#  define EVENT_TYPE_EXCEPTION                     3          // exception or interruption occure
+//#define EVENT_TYPE_BRANCH_NO_ACCURATE            3          // branch is no accurate (old speculation is a miss)
 #  define EVENT_TYPE_SPR_ACCESS                    4          // decod a mtspr or mfspr instruction
 #  define EVENT_TYPE_MSYNC                         5          // decod a memory   synchronization
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h	(revision 105)
@@ -10,9 +10,9 @@
 #define MORPHEO_MAJOR_VERSION 0
 #define MORPHEO_MINOR_VERSION 2
-#define MORPHEO_REVISION      "104"
+#define MORPHEO_REVISION      "105"
 #define MORPHEO_CODENAME      "Castor"
 
-#define MORPHEO_DATE_DAY      "21"  
-#define MORPHEO_DATE_MONTH    "01"
+#define MORPHEO_DATE_DAY      "05"  
+#define MORPHEO_DATE_MONTH    "02"
 #define MORPHEO_DATE_YEAR     "2009" 
 
Index: /trunk/IPs/systemC/processor/Morpheo/Files/Instance_debug.cfg
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Files/Instance_debug.cfg	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Files/Instance_debug.cfg	(revision 105)
@@ -6,7 +6,7 @@
     <parameter name="size_ifetch_queue"                     value="4" />
     <parameter name="nb_inst_fetch"                         value="1" />
-    <parameter name="ras_size_queue"                        value="2" />
-    <parameter name="upt_size_queue"                        value="2" />
-    <parameter name="ufpt_size_queue"                       value="1" />
+    <parameter name="ras_size_queue"                        value="4" />
+    <parameter name="upt_size_queue"                        value="4" />
+    <parameter name="ufpt_size_queue"                       value="4" />
 
     <group id="0">
@@ -47,9 +47,15 @@
     <parameter name="nb_bypass_write"                       value="0" />
   </write_bloc>                                             
-                                                            
+
+  <write_bloc id="1">                                       
+    <parameter name="size_write_queue"                      value="4" />
+    <parameter name="size_execute_queue"                    value="4" />
+    <parameter name="nb_bypass_write"                       value="0" />
+  </write_bloc>                                             
+
   <load_store_unit id="0">                                  
-    <parameter name="size_store_queue"                      value="2" />
-    <parameter name="size_load_queue"                       value="1" />
-    <parameter name="size_speculative_access_queue"         value="1" />
+    <parameter name="size_store_queue"                      value="4" />
+    <parameter name="size_load_queue"                       value="4" />
+    <parameter name="size_speculative_access_queue"         value="2" />
     <parameter name="nb_port_check"                         value="1" />
     <parameter name="speculative_load"                      value="2" />
@@ -130,5 +136,5 @@
   <execute_loop id="0">
     <parameter name="nb_read_unit"                          value="1" />
-    <parameter name="nb_write_unit"                         value="1" />
+    <parameter name="nb_write_unit"                         value="2" />
     <parameter name="nb_gpr_bank"                           value="1" />
     <parameter name="nb_gpr_port_read_by_bank"              value="2" />
@@ -166,4 +172,5 @@
   <link name="link_read_unit_with_read_bloc"           src="0"     dest="0.0" />
   <link name="link_write_unit_with_write_bloc"         src="0"     dest="0.0" />
+  <link name="link_write_unit_with_write_bloc"         src="1"     dest="0.1" />
   <link name="link_decod_bloc_with_thread"             src="0"     dest="0"   />
   <link name="link_rename_bloc_with_front_end"         src="0"     dest="0"   />
@@ -177,5 +184,7 @@
   <link name="link_read_bloc_and_functionnal_unit"     src="0.0"   dest="1"   />
   <link name="link_write_bloc_and_load_store_unit"     src="0.0"   dest="1"   />
+  <link name="link_write_bloc_and_load_store_unit"     src="1.0"   dest="1"   />
   <link name="link_write_bloc_and_functionnal_unit"    src="0.0"   dest="1"   />
+  <link name="link_write_bloc_and_functionnal_unit"    src="1.0"   dest="1"   />
   <link name="link_thread_and_functionnal_unit"        src="0.0"   dest="1"   />
 
Index: /trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim	(revision 105)
@@ -8,5 +8,5 @@
   <parameter name="use_vhdl_testbench_assert"  value="0" />
   <parameter name="use_position"               value="0" />
-  <parameter name="use_statistics"             value="0" />
+  <parameter name="use_statistics"             value="1" />
   <parameter name="use_information"            value="0" />
   <parameter name="use_header"                 value="0" />
@@ -15,5 +15,5 @@
   <parameter name="statistics_period"          value="0" />
                                                
-  <parameter name="simulation_nb_cycle"        value="100" />
+  <parameter name="simulation_nb_cycle"        value="100000" />
   <parameter name="simulation_nb_instruction"  value="0"   />
 
@@ -23,5 +23,5 @@
   <parameter name="directory_log"              value="." />
 
-  <parameter name="debug_level"                value="3" />
+  <parameter name="debug_level"                value="0" />
   <parameter name="debug_cycle_start"          value="0" />
   <parameter name="debug_cycle_stop"           value="200" />
Index: /trunk/IPs/systemC/processor/Morpheo/Script/SelfTest.sh
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Script/SelfTest.sh	(revision 104)
+++ /trunk/IPs/systemC/processor/Morpheo/Script/SelfTest.sh	(revision 105)
@@ -114,19 +114,78 @@
 function usage ()
 {
-    echo "Usage          : ${0} action";
-    echo "Arguments      : ";
+    echo "Usage            : ${0} action";
+    echo "Arguments        : ";
     echo " * action";
-    echo "   * test      : test all component";
-    echo '                 for each component, create file in ${MORPHEO_HOME}/tmp/';
-    echo "   * test_all  : same as test, but don't stop at the first error";
-    echo "   * res       : list test's resultat";
-    echo "   * list      : list test's resultat";
-    echo "   * clean     : erase file in ${MORPHEO_HOME}/tmp/ directory";
-    echo "   * clean_all : clean all component";
-    echo "   * help      : print this message";
+    echo "   * systemc     : test all model systemC";
+    echo '                   for each component, create file in ${MORPHEO_HOME}/tmp/';
+    echo "   * systemc_all : same as test, but don't stop at the first error";
+    echo "   * vhdl        : test all model VHDL";
+    echo '                   for each component, create file in ${MORPHEO_HOME}/tmp/';
+    echo "   * vhdl_all    : same as test, but don't stop at the first error";
+    echo "   * result      : list test's resultat";
+    echo "   * list        : list test";
+    echo "   * clean       : erase file in ${MORPHEO_HOME}/tmp/ directory";
+    echo "   * clean_all   : clean all component";
+    echo "   * help        : print this message";
     echo "";
-    echo "Notes          : ";
+    echo "Notes            : ";
     echo " * Morpheo environment must be positionned";
     exit;
+}
+
+#-----[ simulation ]----------------------------------------
+# arg1 : cmd (execute / sim)
+# arg2 : all (stop)
+# arg3 : file suffix
+function simulation ()
+{
+    pwd=${PWD};
+
+    nb_cpu=$(cat /proc/cpuinfo |grep -c processor);
+
+    for i in ${directory[@]}; do
+        component=$(basename ${i});
+        dir="${path}/${i}/SelfTest";
+
+        if test -d "${dir}"; then
+            # have previous test ok ?
+            declare -i make_test=1;
+            
+            file="${tmp}/${component}.${3}"
+
+            if test -f ${file}; then
+        	res_test=$(cat ${file});
+        	if test "${test_ok}" = "${res_test}"; then
+        	    make_test=0;
+        	fi;
+            fi;
+
+            if test ${make_test} -eq 1; then
+        	cd ${dir};
+        	make config;
+        	make -j${nb_cpu} ${1};
+        	case ${?} in
+        	    "0")
+        		echo ${test_ok} > ${file};
+        		;;
+        	    *)
+
+        		echo ${test_ko} > ${file};
+        		echo "";
+        		echo "${component} : ${test_ko}";
+        		echo "";
+        		if test ${2} = "1"; then
+        		    exit 1;
+        		fi;
+        		;;
+        	esac;
+        	make clean;
+            fi;
+        else
+            echo "${component} have not SelfTest directory.";
+        fi;
+
+        cd ${pwd};
+    done;
 }
 
@@ -139,5 +198,5 @@
     fi;
 
-    if test -z ${MORPHEO_TOPLEVEL}; then
+    if test -z "${MORPHEO_TOPLEVEL}"; then
 	usage ${*};
     fi;
@@ -147,70 +206,43 @@
     fi;
 
-    nb_cpu=$(cat /proc/cpuinfo |grep -c processor);
-    pwd=${PWD};
     case ${1} in
-	"test" | "test_all")
-	    for i in ${directory[@]}; do
-		component=$(basename ${i});
-		dir="${path}/${i}/SelfTest";
-
-		if test -d "${dir}"; then
-		    # have previous test ok ?
-		    declare -i make_test=1;
-		    
-		    if test -f ${tmp}/${component}; then
-			res_test=$(cat ${tmp}/${component});
-			if test "${test_ok}" = "${res_test}"; then
-			    make_test=0;
-			fi;
+	"systemc" )
+            simulation "execute" "1" "systemc";
+            ;;
+
+        "systemc_all")
+            simulation "execute" "0" "systemc";
+	    ;;
+
+	"vhdl" )
+            simulation "sim"     "1" "vhdl";
+            ;;
+
+        "vhdl_all")
+            simulation "sim"     "0" "vhdl";
+	    ;;
+
+	"result")
+            for x in "systemc" "vhdl"; do
+                echo "${x}";
+	        for i in ${tmp}/*.${x}; do
+		    if test -f ${i}; then
+		        component=$(basename ${i} .${x});
+		        res_test=$(cat ${i});
+		        
+		        case "${res_test}" in
+			    "${test_ok}") color=32; 
+			        ;;
+			    "${test_ko}") color=31; 
+			        ;;
+			    *)            color=39; 
+			        ;;
+		        esac
+		        echo "[1;${color}m * ${res_test} - ${component}[1;0m";
 		    fi;
-
-		    if test ${make_test} -eq 1; then
-			cd ${dir};
-			make config;
-			make -j${nb_cpu} execute;
-			case ${?} in
-			    "0")
-				echo ${test_ok} > ${tmp}/"${component}";
-				;;
-			    *)
-
-				echo ${test_ko} > ${tmp}/"${component}";
-				echo "";
-				echo "${component} : ${test_ko}";
-				echo "";
-				if test ${1} = "test"; then
-				    exit 1;
-				fi;
-				;;
-			esac;
-		    fi;
-		else
-		    echo "${component} have not SelfTest directory.";
-		fi;
-
-		cd ${pwd};
-	    done;
-	    ;;
-
-	"res")
-	    for i in ${tmp}/*; do
-		if test -f ${i}; then
-		    component=$(basename ${i});
-		    res_test=$(cat ${i});
-
-		    
-		    case "${res_test}" in
-			"${test_ok}") color=32; 
-			    ;;
-			"${test_ko}") color=31; 
-			    ;;
-			*)            color=39; 
-			    ;;
-		    esac
-		    echo "[1;${color}m${res_test} - ${component}[1;0m";
-		fi;
-	    done;
-	    ;;
+	        done;
+            done;
+	    ;;
+
 
 	"list")
@@ -226,4 +258,6 @@
 	    
 	"clean_all")
+            pwd=${PWD};
+
 	    for i in ${directory[@]}; do
 		component=$(basename ${i});
