Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp	(revision 84)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp	(revision 88)
@@ -24,4 +24,14 @@
 #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          );
+
   Address_management * _Address_management = new Address_management 
     (name.c_str(),
@@ -30,5 +40,5 @@
 #endif
      _param,
-     USE_ALL);
+     _usage);
   
 #ifdef SYSTEMC
@@ -62,4 +72,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        );
   
   /********************************************************
@@ -76,8 +89,8 @@
   INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_INSTRUCTION_ADDRESS        );
   INSTANCE1_SC_SIGNAL(_Address_management,out_ADDRESS_INSTRUCTION_ENABLE         ,_param->_nb_instruction);
-  if (_param->_have_port_instruction_ptr)
+  if (_param->_have_port_inst_ifetch_ptr)
   INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_INST_IFETCH_PTR            );
   INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_BRANCH_STATE               );
-  if (_param->_have_port_branch_update_prediction_id)
+  if (_param->_have_port_depth)
   INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID);
   INSTANCE_SC_SIGNAL (_Address_management,out_PREDICT_VAL                        );
@@ -89,12 +102,15 @@
   INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_PC_NEXT_IS_DS_TAKE         );
   INSTANCE1_SC_SIGNAL(_Address_management, in_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_instruction);
-  if (_param->_have_port_instruction_ptr)
+  if (_param->_have_port_inst_ifetch_ptr)
   INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_INST_IFETCH_PTR            );
   INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_STATE               );
-  if (_param->_have_port_branch_update_prediction_id)
+  if (_param->_have_port_depth)
   INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
   INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_VAL                          );
   INSTANCE_SC_SIGNAL (_Address_management,out_EVENT_ACK                          );
   INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_ADDRESS                      );
+  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_ADDRESS_NEXT                 );
+  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_ADDRESS_NEXT_VAL             );
+  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_IS_DS_TAKE                   );
 
   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
@@ -143,7 +159,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];
@@ -159,11 +175,14 @@
 
   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);
+//   do 
+//     {
+//       in_EVENT_VAL             ->write(1);
+//       in_EVENT_ADDRESS         ->write(n_addr);
+//       in_EVENT_ADDRESS_NEXT    ->write(nn_addr);
+//       in_EVENT_ADDRESS_NEXT_VAL->write(0);
+//       in_EVENT_IS_DS_TAKE      ->write(0);
+//       SC_START(1);  
+//     } while (out_EVENT_ACK->read() == false);
+//   in_EVENT_VAL    ->write(0);
 
   n_val = 1;
@@ -206,6 +225,10 @@
       }
 
-      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 next_val = rand()%2;
+      in_EVENT_ADDRESS_NEXT_VAL->write(next_val);
+      in_EVENT_IS_DS_TAKE      ->write(next_val);
 
       //-------------------------------------------------
@@ -238,8 +261,8 @@
 	  for (uint32_t i=0; i<_param->_nb_instruction; i++)
 	  TEST(Tcontrol_t        ,out_ADDRESS_INSTRUCTION_ENABLE     [i] ->read(),c_enable[i]);
-	  if (_param->_have_port_instruction_ptr)
+	  if (_param->_have_port_inst_ifetch_ptr)
 	  TEST(Tinst_ifetch_ptr_t,out_ADDRESS_INST_IFETCH_PTR            ->read(),0);
 	  TEST(Tbranch_state_t   ,out_ADDRESS_BRANCH_STATE               ->read(),0);
-	  if (_param->_have_port_branch_update_prediction_id)
+	  if (_param->_have_port_depth)
 	  TEST(Tprediction_ptr_t ,out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID->read(),0);
 
@@ -272,14 +295,17 @@
 	  LABEL("EVENT      : Transaction accepted");
 
-	  c_val           = false;
-	  n_val           = true;
-	  nn_val          = false;
-
-	  n_addr         = in_EVENT_ADDRESS->read();
-	  n_is_ds_take   = 0;
+	  c_val        = false;
+	  n_val        = true;
+	  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= false;
+//           nn_val = false;
+//           n_is_ds_take = 0;
 
 	  n_enable [0] = 1;
-	  for (uint32_t i=1; i<_param->_nb_instruction; i++)
-	    n_enable [i] = 0;
+          for (uint32_t i=1; i<_param->_nb_instruction; i++)
+            n_enable [i] = 0;
 	}
 
@@ -347,4 +373,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                   ;
 #endif
 
