Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp	(revision 88)
@@ -29,73 +29,90 @@
 			  uint32_t size_special_data  ,
 			  uint32_t nb_special_register,
-			  uint32_t nb_bypass_write    ):
-    _size_queue              (size_queue         ),
-    _nb_context              (nb_context         ),
-    _nb_front_end            (nb_front_end       ),
-    _nb_ooo_engine           (nb_ooo_engine      ),
-    _nb_packet               (nb_packet          ),
-    _size_general_data       (size_general_data  ),
-    _nb_general_register     (nb_general_register),
-    _size_special_data       (size_special_data  ),
-    _nb_special_register     (nb_special_register),
-    _nb_bypass_write         (nb_bypass_write    ),
-
-    _nb_gpr_write            (1),
-    _nb_spr_write            (1),
-
-    _size_context_id         (log2(_nb_context         )),
-    _size_front_end_id       (log2(_nb_front_end       )),
-    _size_ooo_engine_id      (log2(_nb_ooo_engine      )),
-    _size_packet_id          (log2(_nb_packet          )),
-    _size_general_register   (log2(_nb_general_register)),
-    _size_special_register   (log2(_nb_special_register)),
-
-    _have_port_context_id    (_size_context_id    > 0),
-    _have_port_front_end_id  (_size_front_end_id  > 0),
-    _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
-    _have_port_packet_id     (_size_packet_id     > 0)
+			  uint32_t nb_bypass_write    ,
+                          bool     is_toplevel)
   {
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
+
+    _size_queue              = size_queue         ;
+    _nb_context              = nb_context         ;
+    _nb_front_end            = nb_front_end       ;
+    _nb_ooo_engine           = nb_ooo_engine      ;
+    _nb_packet               = nb_packet          ;
+    _nb_general_register     = nb_general_register;
+    _nb_special_register     = nb_special_register;
+    _nb_bypass_write         = nb_bypass_write    ;
+
+    _nb_gpr_write            = 1;
+    _nb_spr_write            = 1;
+
     test();
+    
+    if (is_toplevel)
+      {
+        _size_context_id         = log2(_nb_context         );
+        _size_front_end_id       = log2(_nb_front_end       );
+        _size_ooo_engine_id      = log2(_nb_ooo_engine      );
+        _size_rob_ptr            = log2(_nb_packet          );
+        _size_general_register   = log2(_nb_general_register);
+        _size_special_register   = log2(_nb_special_register);
+        _size_general_data       = size_general_data  ;
+        _size_special_data       = size_special_data  ;
+        
+        _have_port_context_id    = _size_context_id    > 0;
+        _have_port_front_end_id  = _size_front_end_id  > 0;
+        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
+        _have_port_rob_ptr       = _size_rob_ptr       > 0;
+
+        copy();
+      }
+
     log_printf(FUNC,Write_queue,FUNCTION,"End");
   };
   
+// #undef  FUNCTION
+// #define FUNCTION "Write_queue::Parameters (copy)"
+//   Parameters::Parameters (Parameters & param):
+//     _size_queue              (param._size_queue             ),
+//     _nb_context              (param._nb_context             ),
+//     _nb_front_end            (param._nb_front_end           ),
+//     _nb_ooo_engine           (param._nb_ooo_engine          ),
+//     _nb_packet               (param._nb_packet              ),
+//     _size_general_data       (param._size_general_data      ),
+//     _nb_general_register     (param._nb_general_register    ),
+//     _size_special_data       (param._size_special_data      ),
+//     _nb_special_register     (param._nb_special_register    ),
+//     _nb_bypass_write         (param._nb_bypass_write        ),
+
+//     _nb_gpr_write            (param._nb_gpr_write           ),
+//     _nb_spr_write            (param._nb_spr_write           ),
+
+//     _size_context_id         (param._size_context_id        ),
+//     _size_front_end_id       (param._size_front_end_id      ),
+//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
+//     _size_packet_id          (param._size_packet_id         ),
+//     _size_general_register   (param._size_general_register  ),
+//     _size_special_register   (param._size_special_register  ),
+
+//     _have_port_context_id    (param._have_port_context_id   ),
+//     _have_port_front_end_id  (param._have_port_front_end_id ),
+//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
+//     _have_port_packet_id     (param._have_port_packet_id    )
+//   {
+//     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
+//     test();
+//     log_printf(FUNC,Write_queue,FUNCTION,"End");
+//   };
+
 #undef  FUNCTION
-#define FUNCTION "Write_queue::Parameters (copy)"
-  Parameters::Parameters (Parameters & param):
-    _size_queue              (param._size_queue             ),
-    _nb_context              (param._nb_context             ),
-    _nb_front_end            (param._nb_front_end           ),
-    _nb_ooo_engine           (param._nb_ooo_engine          ),
-    _nb_packet               (param._nb_packet              ),
-    _size_general_data       (param._size_general_data      ),
-    _nb_general_register     (param._nb_general_register    ),
-    _size_special_data       (param._size_special_data      ),
-    _nb_special_register     (param._nb_special_register    ),
-    _nb_bypass_write         (param._nb_bypass_write        ),
-
-    _nb_gpr_write            (param._nb_gpr_write           ),
-    _nb_spr_write            (param._nb_spr_write           ),
-
-    _size_context_id         (param._size_context_id        ),
-    _size_front_end_id       (param._size_front_end_id      ),
-    _size_ooo_engine_id      (param._size_ooo_engine_id     ),
-    _size_packet_id          (param._size_packet_id         ),
-    _size_general_register   (param._size_general_register  ),
-    _size_special_register   (param._size_special_register  ),
-
-    _have_port_context_id    (param._have_port_context_id   ),
-    _have_port_front_end_id  (param._have_port_front_end_id ),
-    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
-    _have_port_packet_id     (param._have_port_packet_id    )
+#define FUNCTION "Write_queue::~Parameters"
+  Parameters::~Parameters (void) 
   {
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
-    test();
     log_printf(FUNC,Write_queue,FUNCTION,"End");
   };
 
 #undef  FUNCTION
-#define FUNCTION "Write_queue::~Parameters"
-  Parameters::~Parameters () 
+#define FUNCTION "Write_queue::copy"
+  void Parameters::copy (void) 
   {
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp	(revision 88)
@@ -39,9 +39,15 @@
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
 
+#if DEBUG_Write_queue == true
+    log_printf(INFO,Write_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+    std::cout << *param << std::endl;
+#endif    
+
     log_printf(INFO,Write_queue,FUNCTION,"Allocation");
     allocation ();
 
 #ifdef STATISTICS
-    if (_usage & USE_STATISTICS)
+    if (usage_is_set(_usage,USE_STATISTICS))
       {	
 	log_printf(INFO,Write_queue,FUNCTION,"Allocation of statistics");
@@ -52,5 +58,5 @@
 
 #ifdef VHDL
-    if (_usage & USE_VHDL)
+    if (usage_is_set(_usage,USE_VHDL))
       {
 	// generate the vhdl
@@ -62,5 +68,5 @@
 
 #ifdef SYSTEMC
-    if (_usage & USE_SYSTEMC)
+    if (usage_is_set(_usage,USE_SYSTEMC))
       {
 	log_printf(INFO,Write_queue,FUNCTION,"Method - transition");
@@ -96,5 +102,5 @@
 
 #ifdef STATISTICS
-    if (_usage & USE_STATISTICS)
+    if (usage_is_set(_usage,USE_STATISTICS))
       {
 	log_printf(INFO,Write_queue,FUNCTION,"Generate Statistics file");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp	(revision 88)
@@ -58,5 +58,5 @@
        ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
        ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
-       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id        );
+       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr          );
 //     ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation        );
        ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type             );
@@ -81,5 +81,5 @@
        ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t     ,_param->_size_front_end_id );
        ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t     ,_param->_size_ooo_engine_id);
-       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_packet_id    );
+       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_rob_ptr      );
 //     ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_OPERATION    ,"operation"    ,Toperation_t   ,_param->_size_operation    );
 //     ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_TYPE         ,"type"         ,Ttype_t        ,_param->_size_type         );
@@ -88,4 +88,5 @@
        ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t     ,1                          );
        ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_general_data );
+       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_DATA         ,"data"         ,Tgeneral_data_t,_param->_size_general_data );
      }
 
@@ -129,5 +130,6 @@
 
 #ifdef POSITION
-    _component->generate_file();
+     if (usage_is_set(_usage,USE_POSITION))
+       _component->generate_file();
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp	(revision 88)
@@ -24,5 +24,5 @@
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
 
-    if (_usage & USE_SYSTEMC)
+    if (usage_is_set(_usage,USE_SYSTEMC))
       {
 	delete    in_CLOCK ;
@@ -38,5 +38,5 @@
 	if (_param->_have_port_ooo_engine_id)
 	delete      in_WRITE_QUEUE_IN_OOO_ENGINE_ID;
-        if (_param->_have_port_packet_id)
+        if (_param->_have_port_rob_ptr  )
 	delete      in_WRITE_QUEUE_IN_PACKET_ID    ;
 //      delete      in_WRITE_QUEUE_IN_OPERATION    ;
@@ -61,5 +61,5 @@
         if (_param->_have_port_ooo_engine_id)
 	delete     out_WRITE_QUEUE_OUT_OOO_ENGINE_ID;
-        if (_param->_have_port_packet_id)
+        if (_param->_have_port_rob_ptr  )
 	delete     out_WRITE_QUEUE_OUT_PACKET_ID    ;
 //      delete     out_WRITE_QUEUE_OUT_OPERATION    ;
@@ -69,4 +69,5 @@
         delete     out_WRITE_QUEUE_OUT_NO_SEQUENCE  ;
         delete     out_WRITE_QUEUE_OUT_ADDRESS      ;
+        delete     out_WRITE_QUEUE_OUT_DATA         ;
 
 	// -----[ Interface "gpr_write" ]-------------------------------------
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_end_cycle.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_end_cycle.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_end_cycle.cpp	(revision 88)
@@ -26,5 +26,6 @@
 
 #ifdef STATISTICS
-    _stat->end_cycle();
+    if (usage_is_set(_usage,USE_STATISTICS))
+      _stat->end_cycle();
 #endif    
 
@@ -32,5 +33,6 @@
     // Evaluation before read the ouput signal
 //  sc_start(0);
-    _interfaces->testbench();
+    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
+      _interfaces->testbench();
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp	(revision 88)
@@ -49,5 +49,5 @@
 	  if (_param->_have_port_ooo_engine_id)
       	  PORT_WRITE(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID, _queue->front()->_ooo_engine_id);
-	  if (_param->_have_port_packet_id)
+	  if (_param->_have_port_rob_ptr  )
       	  PORT_WRITE(out_WRITE_QUEUE_OUT_PACKET_ID    , _queue->front()->_packet_id    );
 //    	  PORT_WRITE(out_WRITE_QUEUE_OUT_OPERATION    , _queue->front()->_operation    );
@@ -57,4 +57,5 @@
       	  PORT_WRITE(out_WRITE_QUEUE_OUT_NO_SEQUENCE  , _queue->front()->_no_sequence  );
       	  PORT_WRITE(out_WRITE_QUEUE_OUT_ADDRESS      , _queue->front()->_address      );
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_DATA         , _queue->front()->_data_rd      );
 	}
     }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp	(revision 88)
@@ -51,5 +51,5 @@
 	       (_param->_have_port_front_end_id )?PORT_READ(in_WRITE_QUEUE_IN_FRONT_END_ID ):0,
 	       (_param->_have_port_ooo_engine_id)?PORT_READ(in_WRITE_QUEUE_IN_OOO_ENGINE_ID):0,
-	       (_param->_have_port_packet_id    )?PORT_READ(in_WRITE_QUEUE_IN_PACKET_ID    ):0,
+	       (_param->_have_port_rob_ptr      )?PORT_READ(in_WRITE_QUEUE_IN_PACKET_ID    ):0,
 	     //PORT_READ(in_WRITE_QUEUE_IN_OPERATION    ),
 	       PORT_READ(in_WRITE_QUEUE_IN_TYPE         ),
@@ -83,5 +83,6 @@
 
 #ifdef STATISTICS
-    *(_stat_use_queue) += _queue->size();
+    if (usage_is_set(_usage,USE_STATISTICS))
+      *(_stat_use_queue) += _queue->size();
 #endif
 
