Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp	(revision 88)
@@ -29,103 +29,111 @@
 			  uint32_t size_special_data  ,
 			  uint32_t nb_special_register,
-			  uint32_t nb_bypass_write    ):
-    _size_write_queue        (size_write_queue   ),
-    _size_execute_queue      (size_execute_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_component_execute_queue (_size_execute_queue > 0),
-    _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_unit,FUNCTION,"Begin");
 
-    _param_write_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue  ::Parameters(size_write_queue   ,
-																		    nb_context         ,
-																		    nb_front_end       ,
-																		    nb_ooo_engine      ,
-																		    nb_packet          ,
-																		    size_general_data  ,
-																		    nb_general_register,
-																		    size_special_data  ,
-																		    nb_special_register,
-																		    nb_bypass_write    );
+    _size_write_queue             = size_write_queue   ;
+    _size_execute_queue           = size_execute_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;
+
+    _have_component_execute_queue = _size_execute_queue > 0;
+                                  
+    _param_write_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue  ::Parameters(_size_write_queue   ,
+																		    _nb_context         ,
+																		    _nb_front_end       ,
+																		    _nb_ooo_engine      ,
+																		    _nb_packet          ,
+																		     size_general_data  ,
+																		    _nb_general_register,
+																		     size_special_data  ,
+																		    _nb_special_register,
+																		    _nb_bypass_write    );
     
     if (_have_component_execute_queue)
-      _param_execute_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters(size_execute_queue   ,
-																			nb_context         ,
-																			nb_front_end       ,
-																			nb_ooo_engine      ,
-																			nb_packet          ,
-																			size_general_data  ,
-																			size_special_data  );
+      _param_execute_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters(_size_execute_queue   ,
+																			_nb_context         ,
+																			_nb_front_end       ,
+																			_nb_ooo_engine      ,
+																			_nb_packet          ,
+																			 size_general_data  ,
+																			 size_special_data  );
 
     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_unit,FUNCTION,"End");
   };
   
-#undef  FUNCTION
-#define FUNCTION "Write_unit::Parameters (copy)"
-  Parameters::Parameters (Parameters & param):
-    _size_write_queue        (param._size_write_queue       ),
-    _size_execute_queue      (param._size_execute_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        ),
+// #undef  FUNCTION
+// #define FUNCTION "Write_unit::Parameters (copy)"
+//   Parameters::Parameters (Parameters & param):
+//     _size_write_queue        (param._size_write_queue       ),
+//     _size_execute_queue      (param._size_execute_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           ),
+//     _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  ),
+//     _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_component_execute_queue (param._have_component_execute_queue),
-    _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_unit,FUNCTION,"Begin");
+//     _have_component_execute_queue (param._have_component_execute_queue),
+//     _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_unit,FUNCTION,"Begin");
     
-    _param_write_queue   = param._param_write_queue  ;
-    _param_execute_queue = param._param_execute_queue;
+//     _param_write_queue   = param._param_write_queue  ;
+//     _param_execute_queue = param._param_execute_queue;
 
-    test();
-    log_printf(FUNC,Write_unit,FUNCTION,"End");
-  };
+//     test();
+//     log_printf(FUNC,Write_unit,FUNCTION,"End");
+//   };
 
 #undef  FUNCTION
 #define FUNCTION "Write_unit::~Parameters"
-  Parameters::~Parameters () 
+  Parameters::~Parameters (void)
   {
     log_printf(FUNC,Write_unit,FUNCTION,"Begin");
@@ -139,4 +147,17 @@
   };
 
+#undef  FUNCTION
+#define FUNCTION "Write_unit::copy"
+  void Parameters::copy (void)
+  {
+    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
+
+    COPY(_param_write_queue);
+    if (_have_component_execute_queue)
+    COPY(_param_execute_queue);
+
+    log_printf(FUNC,Write_unit,FUNCTION,"End");
+  };
+
 }; // end namespace write_unit
 }; // end namespace multi_write_unit
@@ -144,5 +165,4 @@
 }; // end namespace multi_execute_loop
 }; // end namespace core
-
 }; // end namespace behavioural
 }; // end namespace morpheo              
