Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/test.cpp	(revision 85)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/test.cpp	(revision 88)
@@ -7,5 +7,5 @@
  */
 
-#define NB_ITERATION  128
+#define NB_ITERATION  1024
 #define CYCLE_MAX     (128*NB_ITERATION)
 
@@ -40,4 +40,13 @@
 #endif
 
+  Tusage_t _usage = USE_ALL;
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+  _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
   Ifetch_unit * _Ifetch_unit = new Ifetch_unit 
     (name.c_str(),
@@ -46,5 +55,5 @@
 #endif
      _param,
-     USE_ALL);
+     _usage);
   
 #ifdef SYSTEMC
@@ -92,4 +101,7 @@
   ALLOC_SC_SIGNAL (out_EVENT_ACK                          ,"out_EVENT_ACK                          ",Tcontrol_t           );
   ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS                      ," in_EVENT_ADDRESS                      ",Tgeneral_address_t   );
+  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS_NEXT                 ," in_EVENT_ADDRESS_NEXT                 ",Tgeneral_address_t   );
+  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS_NEXT_VAL             ," in_EVENT_ADDRESS_NEXT_VAL             ",Tcontrol_t           );
+  ALLOC_SC_SIGNAL ( in_EVENT_IS_DS_TAKE                   ," in_EVENT_IS_DS_TAKE                   ",Tcontrol_t           );
   
   /********************************************************
@@ -105,5 +117,5 @@
   INSTANCE_SC_SIGNAL (_Ifetch_unit, in_ICACHE_REQ_ACK                     );
 //INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_REQ_THREAD_ID               );
-  if (_param->_have_port_queue_ptr)
+  if (_param->_have_port_ifetch_queue_ptr)
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_REQ_PACKET_ID               );
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_REQ_ADDRESS                 );
@@ -112,5 +124,5 @@
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_RSP_ACK                     );
 //INSTANCE_SC_SIGNAL (_Ifetch_unit, in_ICACHE_RSP_THREAD_ID               );
-  if (_param->_have_port_queue_ptr)
+  if (_param->_have_port_ifetch_queue_ptr)
   INSTANCE_SC_SIGNAL (_Ifetch_unit, in_ICACHE_RSP_PACKET_ID               );
   INSTANCE1_SC_SIGNAL(_Ifetch_unit, in_ICACHE_RSP_INSTRUCTION             ,_param->_nb_instruction);
@@ -124,8 +136,8 @@
   INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_PC_NEXT_IS_DS_TAKE         );
   INSTANCE1_SC_SIGNAL(_Ifetch_unit, in_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_instruction);
-  if (_param->_have_port_instruction_ptr)
+  if (_param->_have_port_inst_ifetch_ptr)
   INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_INST_IFETCH_PTR            );
   INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_BRANCH_STATE               );
-  if (_param->_have_port_branch_update_prediction_id)
+  if (_param->_have_port_depth)
   INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
   INSTANCE1_SC_SIGNAL(_Ifetch_unit,out_DECOD_VAL                          ,_param->_nb_instruction);
@@ -134,8 +146,8 @@
 //INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_CONTEXT_ID                   );
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_ADDRESS                      );
-  if (_param->_have_port_instruction_ptr)
+  if (_param->_have_port_inst_ifetch_ptr)
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_INST_IFETCH_PTR              );
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_BRANCH_STATE                 );
-  if (_param->_have_port_branch_update_prediction_id)
+  if (_param->_have_port_depth)
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_BRANCH_UPDATE_PREDICTION_ID  );
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_EXCEPTION                    );
@@ -143,4 +155,7 @@
   INSTANCE_SC_SIGNAL (_Ifetch_unit,out_EVENT_ACK                          );
   INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_ADDRESS                      );
+  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_ADDRESS_NEXT                 );
+  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_ADDRESS_NEXT_VAL             );
+  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_IS_DS_TAKE                   );
 
   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
@@ -178,7 +193,7 @@
   Tcontrol_t      nn_val  = false;
 
-  Tgeneral_data_t c_addr  = 0x100;
-  Tgeneral_data_t n_addr  = 0x100;
-  Tgeneral_data_t nn_addr = 0x100;
+  Tgeneral_data_t c_addr  = 0x100>>2;
+  Tgeneral_data_t n_addr  = 0x100>>2;
+  Tgeneral_data_t nn_addr = 0x100>>2;
 
   Tcontrol_t      c_enable [_param->_nb_instruction];
@@ -218,12 +233,12 @@
     TEST(Tcontrol_t,out_DECOD_VAL [i]->read(), 0);
 
-  LABEL("Send Reset");
-  do 
-    {
-      in_EVENT_VAL    ->write(1);
-      in_EVENT_ADDRESS->write(n_addr);
-      SC_START(1);  
-    } while (out_EVENT_ACK->read() == false);
-  in_EVENT_VAL    ->write(0);
+//   LABEL("Send Reset");
+//   do 
+//     {
+//       in_EVENT_VAL    ->write(1);
+//       in_EVENT_ADDRESS->write(n_addr);
+//       SC_START(1);  
+//     } while (out_EVENT_ACK->read() == false);
+//   in_EVENT_VAL    ->write(0);
 
   n_val = 1;
@@ -270,6 +285,10 @@
 
       // EVENT
-      in_EVENT_VAL    ->write((rand()%100)<percent_transaction_event  );
-      in_EVENT_ADDRESS->write(0x100);
+      in_EVENT_VAL             ->write((rand()%100)<percent_transaction_event  );
+      in_EVENT_ADDRESS         ->write(0x77);
+      in_EVENT_ADDRESS_NEXT    ->write(0x171);
+      Tcontrol_t is_ds_take = rand();
+      in_EVENT_ADDRESS_NEXT_VAL->write(is_ds_take);
+      in_EVENT_IS_DS_TAKE      ->write(is_ds_take);
 
       // ICACHE_REQ
@@ -305,5 +324,5 @@
 	  LABEL("ICACHE_REQ : Transaction accepted");
 
-	  Tpacket_t  packet  = (_param->_have_port_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0;
+	  Tpacket_t  packet  = (_param->_have_port_ifetch_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0;
 	  Taddress_t address = out_ICACHE_REQ_ADDRESS->read();
 
@@ -344,8 +363,8 @@
 	if (find)
 	  {
-	    if (_param->_have_port_instruction_ptr)
+	    if (_param->_have_port_inst_ifetch_ptr)
 	    TEST(Tinst_ifetch_ptr_t, out_DECOD_INST_IFETCH_PTR            ->read(), 0);
 	    TEST(Tbranch_state_t   , out_DECOD_BRANCH_STATE               ->read(), 0);
-	    if (_param->_have_port_branch_update_prediction_id)
+	    if (_param->_have_port_depth)
 	    TEST(Tprediction_ptr_t , out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(), 0);
 	    TEST(Texception_t      , out_DECOD_EXCEPTION                  ->read(), 0);
@@ -404,8 +423,10 @@
 	  c_val           = false;
 	  n_val           = true;
-	  nn_val          = false;
-
-	  n_addr         = in_EVENT_ADDRESS->read();
-	  n_is_ds_take   = 0;
+
+	  n_addr          = in_EVENT_ADDRESS->read();
+	  n_is_ds_take    = in_EVENT_IS_DS_TAKE->read();
+	  nn_val          = in_EVENT_ADDRESS_NEXT_VAL->read();
+	  nn_addr         = in_EVENT_ADDRESS_NEXT    ->read();
+          nn_is_ds_take   = 0;
 
 	  n_enable [0] = 1;
@@ -496,4 +517,7 @@
   delete    out_EVENT_ACK                           ;
   delete     in_EVENT_ADDRESS                       ;
+  delete     in_EVENT_ADDRESS_NEXT                  ;
+  delete     in_EVENT_ADDRESS_NEXT_VAL              ;
+  delete     in_EVENT_IS_DS_TAKE                    ;
 
   delete    param_cache;
