Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters.cpp	(revision 87)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters.cpp	(revision 88)
@@ -25,10 +25,12 @@
 			  uint32_t            size_general_data            ,
 			  uint32_t          * nb_branch_speculated         ,
-			  uint32_t            size_branch_update_prediction,
+// 			  uint32_t          * size_branch_update_prediction,
 			  uint32_t            nb_context_select            ,
 			  Tpriority_t         select_priority              ,
 			  Tload_balancing_t   select_load_balancing        ,
 			  bool             ** instruction_implemeted       ,
-			  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t))
+			  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
+                          bool                is_toplevel                          
+                          )
   {
     log_begin(Decod_unit,FUNCTION);
@@ -38,7 +40,7 @@
     _nb_inst_decod                 = nb_inst_decod                ;
     _size_queue                    = size_queue                   ;
-    _size_general_data             = size_general_data            ;
+//  _size_general_data             = size_general_data            ;
     _nb_branch_speculated          = nb_branch_speculated         ;
-    _size_branch_update_prediction = size_branch_update_prediction;
+//  _size_branch_update_prediction = size_branch_update_prediction;
     _nb_context_select             = nb_context_select            ;
     _select_priority               = select_priority              ;
@@ -48,15 +50,6 @@
 
     _max_nb_inst_fetch                     = max<uint32_t>(_nb_inst_fetch,_nb_context);
+//  _size_address_inst                     = size_general_data-2;
 
-    _size_address_inst                     = size_general_data-2;
-    _size_context_id                       = log2(nb_context          );
-    _size_depth                            = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
-    _size_inst_ifetch_ptr                  = log2(_max_nb_inst_fetch  );
-
-    _have_port_context_id                  = (_size_context_id > 0);
-    _have_port_depth                       = (_size_depth      > 0);
-    _have_port_branch_update_prediction_id = (_size_branch_update_prediction > 0);
-    _have_port_inst_ifetch_ptr             = (_size_inst_ifetch_ptr > 0);
-    
     test();
 
@@ -65,8 +58,8 @@
        _nb_inst_fetch                ,
        _nb_inst_decod                ,
-       max<uint32_t>(_nb_branch_speculated,_nb_context),
-       _size_branch_update_prediction,
+       _nb_branch_speculated,
+//     _size_branch_update_prediction,
        _nb_context_select            ,
-       _size_general_data            ,
+        size_general_data            ,
        _select_priority              ,
        _select_load_balancing        ,
@@ -78,9 +71,26 @@
        _nb_inst_decod       ,
        _size_queue          ,
-       _size_general_data   ,
+        size_general_data   ,
        _nb_branch_speculated);
 
-    _size_nb_inst_decod = _param_decod_queue->_size_nb_inst;
-    
+    if (is_toplevel)
+      {
+        _size_context_id                       = log2(_nb_context);
+        _size_depth                            = max<uint32_t>(_nb_branch_speculated,_nb_context);
+//      _size_branch_update_prediction_id      = max<uint32_t>(_size_branch_update_prediction,_nb_context);
+        _size_inst_ifetch_ptr                  = log2(max<uint32_t>(_nb_inst_fetch,_nb_context));
+        _size_nb_inst_decod                    = log2(_size_queue)+1;
+
+        _size_instruction_address              = size_general_data-2;
+        _size_general_data                     = size_general_data;
+
+        _have_port_context_id                  = _size_context_id > 0;
+        _have_port_depth                       = (_size_depth                       > 0);
+//      _have_port_branch_update_prediction_id = (_size_branch_update_prediction_id > 0);
+        _have_port_inst_ifetch_ptr             = (_size_inst_ifetch_ptr             > 0);
+
+        copy ();
+      }
+
     log_end(Decod_unit,FUNCTION);
   };
@@ -101,6 +111,19 @@
     log_begin(Decod_unit,FUNCTION);
 
-    delete _param_decod;
-    delete _param_decod_queue;
+    delete    _param_decod;
+    delete    _param_decod_queue;
+
+    log_end(Decod_unit,FUNCTION);
+  };
+
+
+#undef  FUNCTION
+#define FUNCTION "Decod_unit::copy"
+  void Parameters::copy (void) 
+  {
+    log_begin(Decod_unit,FUNCTION);
+
+    COPY(_param_decod      );
+    COPY(_param_decod_queue);
 
     log_end(Decod_unit,FUNCTION);
