Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration.cfg	(revision 64)
+++ 	(revision )
@@ -1,18 +1,0 @@
-Register_unit
-1	1	*4	#_nb_ooo_engine            
-32	32	*4	#_size_general_data        
-2	2	*4	#_size_special_data        
-1	1	*4	#_nb_gpr_read              
-1	1	*4	#_nb_gpr_write             
-1	1	*4	#_nb_gpr_bank              
-1	1	*4	#_nb_gpr_port_read_by_bank 
-1	1	*4	#_nb_gpr_port_write_by_bank
-1	1	*4	#_nb_spr_read              
-1	1	*4	#_nb_spr_write             
-1	1	*4	#_nb_spr_bank              
-1	1	*4	#_nb_spr_port_read_by_bank 
-1	1	*4	#_nb_spr_port_write_by_bank
-32 	32 	*4	#_nb_general_register [0]     
-32 	32  	*4	#_nb_special_register [0]     
-1	1	*4	#_nb_inst_insert_rob  [0]     
-1	1	*4	#_nb_inst_retire_rob  [0]     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration.cfg.save
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration.cfg.save	(revision 64)
+++ 	(revision )
@@ -1,30 +1,0 @@
-Register_unit
-4	4	*2	#_nb_ooo_engine            
-32	32	*2	#_size_general_data        
-2	2	*2	#_size_special_data        
-8	8	*2	#_nb_gpr_read              
-4	4	*2	#_nb_gpr_write             
-2	2	*2	#_nb_gpr_bank              
-4	4	*2	#_nb_gpr_port_read_by_bank 
-2	2	*2	#_nb_gpr_port_write_by_bank
-8	8	*2	#_nb_spr_read              
-4	4	*2	#_nb_spr_write             
-2	2	*2	#_nb_spr_bank              
-4	4	*2	#_nb_spr_port_read_by_bank 
-2	2	*2	#_nb_spr_port_write_by_bank
-32	32	*2	#_nb_general_register [0]     
-64	64	*2	#_nb_general_register [1]     
-128	128	*2	#_nb_general_register [2]     
-256	256	*2	#_nb_general_register [3]     
-32	32 	*2	#_nb_special_register [0]     
-64	64 	*2	#_nb_special_register [1]     
-128	128	*2	#_nb_special_register [2]     
-256	256	*2	#_nb_special_register [3]     
-1	1	*2	#_nb_inst_insert_rob  [0]     
-2	2	*2	#_nb_inst_insert_rob  [1]     
-4	4	*2	#_nb_inst_insert_rob  [2]     
-8	8	*2	#_nb_inst_insert_rob  [3]     
-1	1	*2	#_nb_inst_retire_rob  [0]     
-2	2	*2	#_nb_inst_retire_rob  [1]     
-4	4	*2	#_nb_inst_retire_rob  [2]     
-8	8	*2	#_nb_inst_retire_rob  [3]     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_min.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_min.cfg	(revision 65)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_min.cfg	(revision 65)
@@ -0,0 +1,18 @@
+Register_unit
+1	1	*4	#_nb_ooo_engine            
+32	32	*4	#_size_general_data        
+2	2	*4	#_size_special_data        
+1	1	*4	#_nb_gpr_read              
+1	1	*4	#_nb_gpr_write             
+1	1	*4	#_nb_gpr_bank              
+1	1	*4	#_nb_gpr_port_read_by_bank 
+1	1	*4	#_nb_gpr_port_write_by_bank
+1	1	*4	#_nb_spr_read              
+1	1	*4	#_nb_spr_write             
+1	1	*4	#_nb_spr_bank              
+1	1	*4	#_nb_spr_port_read_by_bank 
+1	1	*4	#_nb_spr_port_write_by_bank
+32 	32 	*4	#_nb_general_register [0]     
+32 	32  	*4	#_nb_special_register [0]     
+1	1	*4	#_nb_inst_insert_rob  [0]     
+1	1	*4	#_nb_inst_retire_rob  [0]     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_mono_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_mono_context.cfg	(revision 65)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_mono_context.cfg	(revision 65)
@@ -0,0 +1,18 @@
+Register_unit
+1	1	*4	#_nb_ooo_engine            
+32	32	*4	#_size_general_data        
+32	32	*4	#_size_special_data        
+4	8	*4	#_nb_gpr_read              
+4	8	*4	#_nb_gpr_write             
+2	8	*4	#_nb_gpr_bank              
+1	4	*4	#_nb_gpr_port_read_by_bank 
+1	4	*4	#_nb_gpr_port_write_by_bank
+4	4	*4	#_nb_spr_read              
+4	4	*4	#_nb_spr_write             
+1	1	*4	#_nb_spr_bank              
+1	4	*4	#_nb_spr_port_read_by_bank 
+1	1	*4	#_nb_spr_port_write_by_bank
+32 	32 	*4	#_nb_general_register [0]     
+32 	32  	*4	#_nb_special_register [0]     
+1	4	*4	#_nb_inst_insert_rob  [0]     
+1	4	*4	#_nb_inst_retire_rob  [0]     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_multi_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_multi_context.cfg	(revision 65)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/configuration_multi_context.cfg	(revision 65)
@@ -0,0 +1,30 @@
+Register_unit
+4	4	*4	#_nb_ooo_engine            
+32	32	*4	#_size_general_data        
+32	32	*4	#_size_special_data        
+4	8	*4	#_nb_gpr_read              
+4	8	*4	#_nb_gpr_write             
+1	4	*4	#_nb_gpr_bank              
+1	4	*4	#_nb_gpr_port_read_by_bank 
+1	4	*4	#_nb_gpr_port_write_by_bank
+4	4	*4	#_nb_spr_read              
+4	4	*4	#_nb_spr_write             
+1	1	*4	#_nb_spr_bank              
+2	2	*4	#_nb_spr_port_read_by_bank 
+2	2	*4	#_nb_spr_port_write_by_bank
+64 	64 	*2	#_nb_general_register [0]     
+32 	32 	*2	#_nb_general_register [1]     
+32 	32 	*2	#_nb_general_register [2]     
+16 	16 	*2	#_nb_general_register [3]     
+8  	8    	*2	#_nb_special_register [0]     
+32 	32   	*2	#_nb_special_register [1]     
+64 	64   	*2	#_nb_special_register [2]     
+128	128  	*2	#_nb_special_register [3]     
+8	8	*4	#_nb_inst_insert_rob  [0]     
+4	4	*4	#_nb_inst_insert_rob  [1]     
+2	2	*4	#_nb_inst_insert_rob  [2]     
+1	1	*4	#_nb_inst_insert_rob  [3]     
+1	1	*4	#_nb_inst_retire_rob  [0]     
+2	2	*4	#_nb_inst_retire_rob  [1]     
+4	4	*4	#_nb_inst_retire_rob  [2]     
+8	8	*4	#_nb_inst_retire_rob  [3]     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp	(revision 64)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp	(revision 65)
@@ -374,4 +374,8 @@
   LABEL("Initialisation");
 
+  in_NRESET->write(0);
+  SC_START(5);
+  in_NRESET->write(1);
+
   for (uint32_t i=0; i<_param->_nb_gpr_read ; i++)
     in_GPR_READ_VAL  [i]->write(0);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters.cpp	(revision 64)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters.cpp	(revision 65)
@@ -58,14 +58,21 @@
 
     _size_gpr_address = log2(nb_general_register [0]);
-    
+
     for (uint32_t i=1; i<nb_ooo_engine; i++)
-      if (log2(nb_general_register [i]) > _size_gpr_address)
-	_size_gpr_address = log2(nb_general_register [i]);
+      {
+	uint32_t new_size = log2(nb_general_register [i]);
+	if (new_size > _size_gpr_address)
+	  _size_gpr_address = new_size;
+      }
 
     _size_spr_address = log2(nb_special_register [0]);
-    
+
     for (uint32_t i=1; i<nb_ooo_engine; i++)
-      if (log2(nb_special_register [i]) > _size_spr_address)
-	_size_spr_address = log2(nb_special_register [i]);
+      {
+	uint32_t new_size = log2(nb_special_register [i]);
+	if (new_size > _size_spr_address)
+	  _size_spr_address = new_size;
+      }
+
 
     _param_gpr         = new morpheo::behavioural::generic::registerfile::Parameters * [_nb_ooo_engine];
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp	(revision 64)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp	(revision 65)
@@ -72,5 +72,5 @@
 	if (_param->_have_port_ooo_engine_id == true)
 	  in_GPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
-	in_GPR_READ_NUM_REG       [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg"       , log2(_param->_size_gpr_address));
+	in_GPR_READ_NUM_REG       [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg"       , _param->_size_gpr_address);
 	out_GPR_READ_DATA          [i]= interface->set_signal_out<Tgeneral_data_t   > ("data"          , _param->_size_general_data);
 	out_GPR_READ_DATA_VAL      [i]= interface->set_signal_out<Tcontrol_t        > ("data_val"      , 1);
@@ -99,5 +99,5 @@
 	if (_param->_have_port_ooo_engine_id == true)
 	  in_GPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
-	in_GPR_WRITE_NUM_REG       [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg"       , log2(_param->_size_gpr_address));
+	in_GPR_WRITE_NUM_REG       [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg"       , _param->_size_gpr_address);
 	in_GPR_WRITE_DATA          [i]= interface->set_signal_in <Tgeneral_data_t   > ("data"          , _param->_size_general_data);
       }
@@ -126,5 +126,5 @@
 	if (_param->_have_port_ooo_engine_id == true)
 	  in_SPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
-	in_SPR_READ_NUM_REG       [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg"       , log2(_param->_size_spr_address));
+	in_SPR_READ_NUM_REG       [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg"       , _param->_size_spr_address);
 	out_SPR_READ_DATA          [i]= interface->set_signal_out<Tspecial_data_t   > ("data"          , _param->_size_special_data);
 	out_SPR_READ_DATA_VAL      [i]= interface->set_signal_out<Tcontrol_t        > ("data_val"      , 1);
@@ -153,5 +153,5 @@
 	if (_param->_have_port_ooo_engine_id == true)
 	  in_SPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
-	in_SPR_WRITE_NUM_REG       [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg"       , log2(_param->_size_spr_address));
+	in_SPR_WRITE_NUM_REG       [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg"       , _param->_size_spr_address);
 	in_SPR_WRITE_DATA          [i]= interface->set_signal_in <Tspecial_data_t   > ("data"          , _param->_size_special_data);
       }
@@ -190,7 +190,7 @@
 	    out_INSERT_ROB_ACK        [i][j] = interface->set_signal_valack_out (ACK);
 	    in_INSERT_ROB_RD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_use"    , 1);
-	    in_INSERT_ROB_RD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_num_reg", log2(_param->_size_gpr_address));
+	    in_INSERT_ROB_RD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_num_reg", _param->_size_gpr_address);
 	    in_INSERT_ROB_RE_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("re_use"    , 1);
-	    in_INSERT_ROB_RE_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_num_reg", log2(_param->_size_spr_address));
+	    in_INSERT_ROB_RE_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_num_reg", _param->_size_spr_address);
 	     
 	  }
@@ -238,11 +238,11 @@
 	    out_RETIRE_ROB_ACK            [i][j] = interface->set_signal_valack_out (ACK);
 	    in_RETIRE_ROB_RD_OLD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_old_use"    , 1);
-	    in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", log2(_param->_size_gpr_address));
+	    in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address);
 	    in_RETIRE_ROB_RE_OLD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("re_old_use"    , 1);
-	    in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", log2(_param->_size_spr_address));
+	    in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address);
 	    in_RETIRE_ROB_RD_NEW_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_new_use"    , 1);
-	    in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", log2(_param->_size_gpr_address));
+	    in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address);
 	    in_RETIRE_ROB_RE_NEW_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("re_new_use"    , 1);
-	    in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", log2(_param->_size_spr_address));
+	    in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address);
 	  }
       }
