Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp	(revision 98)
@@ -226,4 +226,7 @@
     Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
 
+    log_printf(TRACE,Functionnal_unit,FUNCTION,"  * data_rc     : %d",op->_data_rc);
+    log_printf(TRACE,Functionnal_unit,FUNCTION,"  * f_in        : %d",f_in);
+
     // Result
     op->_timing       = param->_timing[op->_type][op->_operation];
@@ -233,4 +236,6 @@
     op->_no_sequence  = f_in == 0;
     op->_address      = imm;
+
+    log_printf(TRACE,Functionnal_unit,FUNCTION,"  * no_sequence : %d",op->_no_sequence);
   };
 
@@ -664,5 +669,5 @@
 
     spr_address_t   spr_addr   = reg->_spr_access_mode->translate_address(addr);
-    
+
     // Test if this group is implemented in this functionnal_unit
     if (reg->_spr_access_mode->valid(spr_addr))
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp	(revision 98)
@@ -87,6 +87,8 @@
 	    _execute_operation_in->_write_rd      = PORT_READ(in_EXECUTE_IN_WRITE_RD    );
 	    _execute_operation_in->_num_reg_rd    = PORT_READ(in_EXECUTE_IN_NUM_REG_RD  );
+	    _execute_operation_in->_data_rd       = 0; // no necessaray
 	    _execute_operation_in->_write_re      = PORT_READ(in_EXECUTE_IN_WRITE_RE    );
 	    _execute_operation_in->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
+	    _execute_operation_in->_data_re       = 0; // no necessaray
 
             log_printf(TRACE,Functionnal_unit,FUNCTION,"    * context_id    : %d",_execute_operation_in->_context_id   );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp	(revision 98)
@@ -370,10 +370,15 @@
       for (uint32_t j=0; j<_param->_nb_ooo_engine; j++)
 	{
-	  for (uint32_t i=0; i<_param->_nb_general_register; i++)
+          _gpr_val [0][j] = 0;
+          _gpr     [0][j] = 0;
+          _spr_val [0][j] = 0;
+          _spr     [0][j] = 0;
+
+	  for (uint32_t i=1; i<_param->_nb_general_register; i++)
 	    {
 	      _gpr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
 	      _gpr          [i][j] = rand()%(1<<_param->_size_general_data);
 	    }
-	  for (uint32_t i=0; i<_param->_nb_special_register; i++)
+	  for (uint32_t i=1; i<_param->_nb_special_register; i++)
 	    {
 	      _spr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
@@ -381,4 +386,6 @@
 	    }
 	}
+
+
       // End initialisation .......
       
@@ -466,5 +473,5 @@
 	      Tcontext_t         ooo_engine = rand()% _param->_nb_ooo_engine;
 	      Tgeneral_address_t num_reg = rand()% _param->_nb_general_register;
-	      Tgeneral_data_t    data    = rand()%(1<<_param->_size_general_data);
+	      Tgeneral_data_t    data    = (num_reg!=0)?(rand()%(1<<_param->_size_general_data)):0;
 	      
 	      GPR_WRITE_VAL           [i]->write(val);	      
@@ -534,5 +541,5 @@
 // 	      TEST(Tcontrol_t        ,READ_QUEUE_OUT_READ_RA    ->read(),_read_ra      [rob_id]);
 	      TEST(Tgeneral_address_t,READ_QUEUE_OUT_NUM_REG_RA ->read(),_num_reg_ra   [rob_id]);
-	      TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RA_VAL->read(),not _read_ra [rob_id] or _gpr_val [_num_reg_ra[rob_id]][ctxt]);
+	      TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RA_VAL->read(),not _read_ra [rob_id] or _gpr_val [_num_reg_ra[rob_id]][ctxt] or (_num_reg_ra[rob_id] == 0));
 	      if (_read_ra [rob_id] and
 		  READ_QUEUE_OUT_DATA_RA_VAL->read())
@@ -540,5 +547,5 @@
 // 	      TEST(Tcontrol_t        ,READ_QUEUE_OUT_READ_RB    ->read(),_read_rb      [rob_id]);
 	      TEST(Tgeneral_address_t,READ_QUEUE_OUT_NUM_REG_RB ->read(),_num_reg_rb   [rob_id]);
-	      TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RB_VAL->read(),not _read_rb [rob_id] or _gpr_val [_num_reg_rb[rob_id]][ctxt]);
+	      TEST(Tcontrol_t        ,READ_QUEUE_OUT_DATA_RB_VAL->read(),not _read_rb [rob_id] or _gpr_val [_num_reg_rb[rob_id]][ctxt] or (_num_reg_rb[rob_id] == 0));
 	      if (_read_rb [rob_id] and
 		  READ_QUEUE_OUT_DATA_RB_VAL->read())
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h	(revision 98)
@@ -110,33 +110,33 @@
       log_printf(FUNC,Read_queue,FUNCTION,"Begin");
 	  
-      _context_id   = x._context_id   ;
-      _front_end_id = x._front_end_id ;
-      _ooo_engine_id= x._ooo_engine_id;
-      _rob_id       = x._rob_id       ;
-      _operation    = x._operation    ;
-      _type         = x._type         ;
+      _context_id            = x._context_id   ;
+      _front_end_id          = x._front_end_id ;
+      _ooo_engine_id         = x._ooo_engine_id;
+      _rob_id                = x._rob_id       ;
+      _operation             = x._operation    ;
+      _type                  = x._type         ;
       _store_queue_ptr_write = x._store_queue_ptr_write;
       _load_queue_ptr_write  = x._load_queue_ptr_write ;
-      _has_immediat = x._has_immediat ;
-      _immediat     = x._immediat     ;
-      _read_ra      = x._read_ra      ;
-      _read_ra_val  = x._read_ra == 1 ; //if not must read, the registerFile is already access
-      _num_reg_ra   = x._num_reg_ra   ;
-      _data_ra_val  = x._read_ra == 0 ; //if not must read, the data is already valid
-      _data_ra      = 0               ;
-      _read_rb      = x._read_rb      ;
-      _read_rb_val  = x._read_rb == 1 ;
-      _num_reg_rb   = x._num_reg_rb   ;
-      _data_rb_val  = x._read_rb == 0 ;
-      _data_rb      = 0               ;
-      _read_rc      = x._read_rc      ;
-      _read_rc_val  = x._read_rc == 1 ;
-      _num_reg_rc   = x._num_reg_rc   ;
-      _data_rc_val  = x._read_rc == 0 ;
-      _data_rc      = 0               ;
-      _write_rd     = x._write_rd     ;
-      _num_reg_rd   = x._num_reg_rd   ;
-      _write_re     = x._write_re     ;
-      _num_reg_re   = x._num_reg_re   ;
+      _has_immediat          = x._has_immediat ;
+      _immediat              = x._immediat     ;
+      _read_ra               = x._read_ra      ;
+      _read_ra_val           = x._read_ra == 1 ; //if not must read, the registerFile is already access
+      _num_reg_ra            = x._num_reg_ra   ;
+      _data_ra_val           = ((x._read_ra == 0) or (x._num_reg_ra == 0)); //if not must read, the data is already valid
+      _data_ra               = 0               ;
+      _read_rb               = x._read_rb      ;
+      _read_rb_val           = x._read_rb == 1 ;
+      _num_reg_rb            = x._num_reg_rb   ;
+      _data_rb_val           = ((x._read_rb == 0) or (x._num_reg_rb == 0));
+      _data_rb               = 0               ;
+      _read_rc               = x._read_rc      ;
+      _read_rc_val           = x._read_rc == 1 ;
+      _num_reg_rc            = x._num_reg_rc   ;
+      _data_rc_val           = x._read_rc == 0 ;
+      _data_rc               = 0               ;
+      _write_rd              = x._write_rd     ;
+      _num_reg_rd            = x._num_reg_rd   ;
+      _write_re              = x._write_re     ;
+      _num_reg_re            = x._num_reg_re   ;
 
       log_printf(FUNC,Read_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp	(revision 98)
@@ -146,7 +146,4 @@
         if (_queue->size()>0)
           {
-//   protected : Tread_queue_head_entry_t       * _queue_head;
-//   protected : std::queue<Tread_queue_entry_t *>   * _queue;
-            
             log_printf(TRACE,Read_queue,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)",
                        0,
@@ -246,6 +243,4 @@
           }
 #endif
-
-
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl.cpp	(revision 98)
@@ -26,5 +26,5 @@
     
     //----- Queue -----
-    
+   
     morpheo::behavioural::generic::queue::Parameters * param_queue;
     morpheo::behavioural::generic::queue::Queue      * queue;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl_body.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_vhdl_body.cpp	(revision 98)
@@ -176,13 +176,13 @@
     vhdl->set_body(0,"out_READ_QUEUE_OUT_HAS_IMMEDIAT  <= internal_HAS_IMMEDIAT ;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_IMMEDIAT      <= internal_IMMEDIAT     ;");
-//     vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RA       <= internal_READ_RA      ;");
+//  vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RA       <= internal_READ_RA      ;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RA    <= internal_NUM_REG_RA   ;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RA_VAL   <= internal_NEXT_DATA_RA_VAL;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RA       <= internal_NEXT_DATA_RA ;");
-//     vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RB       <= internal_READ_RB      ;");
+//  vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RB       <= internal_READ_RB      ;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RB    <= internal_NUM_REG_RB   ;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RB_VAL   <= internal_NEXT_DATA_RB_VAL;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RB       <= internal_NEXT_DATA_RB ;");
-//     vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RC       <= internal_READ_RC      ;");
+//  vhdl->set_body(0,"out_READ_QUEUE_OUT_READ_RC       <= internal_READ_RC      ;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_NUM_REG_RC    <= internal_NUM_REG_RC   ;");
     vhdl->set_body(0,"out_READ_QUEUE_OUT_DATA_RC_VAL   <= internal_NEXT_DATA_RC_VAL;");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp	(revision 98)
@@ -25,30 +25,31 @@
       log_printf(TRACE,Reservation_station,FUNCTION,"  * Dump Reservation Station");  \
       for (uint32_t it_dump=0;it_dump<_param->_size_queue; it_dump++)   \
-        log_printf(TRACE,Reservation_station,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \
-                   it_dump,                                             \
-                   _queue[it_dump]._context_id           ,              \
-                   _queue[it_dump]._front_end_id         ,              \
-                   _queue[it_dump]._ooo_engine_id        ,              \
-                   _queue[it_dump]._rob_id               ,              \
-                   _queue[it_dump]._type                 ,              \
-                   _queue[it_dump]._operation            ,              \
-                   _queue[it_dump]._store_queue_ptr_write,              \
-                   _queue[it_dump]._load_queue_ptr_write ,              \
-                   _queue[it_dump]._has_immediat         ,              \
-                   _queue[it_dump]._immediat             ,              \
-                   _queue[it_dump]._num_reg_ra           ,              \
-                   _queue[it_dump]._data_ra_val          ,              \
-                   _queue[it_dump]._data_ra              ,              \
-                   _queue[it_dump]._num_reg_rb           ,              \
-                   _queue[it_dump]._data_rb_val          ,              \
-                   _queue[it_dump]._data_rb              ,              \
-                   _queue[it_dump]._num_reg_rc           ,              \
-                   _queue[it_dump]._data_rc_val          ,              \
-                   _queue[it_dump]._data_rc              ,              \
-                   _queue[it_dump]._write_rd             ,              \
-                   _queue[it_dump]._num_reg_rd           ,              \
-                   _queue[it_dump]._write_re             ,              \
-                   _queue[it_dump]._num_reg_re           ,              \
-                   toString(_queue[it_dump]._type).c_str());       \
+        if (_queue_valid [it_dump])                                     \
+          log_printf(TRACE,Reservation_station,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \
+                     it_dump,                                           \
+                     _queue[it_dump]._context_id           ,            \
+                     _queue[it_dump]._front_end_id         ,            \
+                     _queue[it_dump]._ooo_engine_id        ,            \
+                     _queue[it_dump]._rob_id               ,            \
+                     _queue[it_dump]._type                 ,            \
+                     _queue[it_dump]._operation            ,            \
+                     _queue[it_dump]._store_queue_ptr_write,            \
+                     _queue[it_dump]._load_queue_ptr_write ,            \
+                     _queue[it_dump]._has_immediat         ,            \
+                     _queue[it_dump]._immediat             ,            \
+                     _queue[it_dump]._num_reg_ra           ,            \
+                     _queue[it_dump]._data_ra_val          ,            \
+                     _queue[it_dump]._data_ra              ,            \
+                     _queue[it_dump]._num_reg_rb           ,            \
+                     _queue[it_dump]._data_rb_val          ,            \
+                     _queue[it_dump]._data_rb              ,            \
+                     _queue[it_dump]._num_reg_rc           ,            \
+                     _queue[it_dump]._data_rc_val          ,            \
+                     _queue[it_dump]._data_rc              ,            \
+                     _queue[it_dump]._write_rd             ,            \
+                     _queue[it_dump]._num_reg_rd           ,            \
+                     _queue[it_dump]._write_re             ,            \
+                     _queue[it_dump]._num_reg_re           ,            \
+                     toString(_queue[it_dump]._type).c_str());          \
     } while (0) 
 #else
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.deps
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.deps	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.deps	(revision 98)
@@ -13,4 +13,7 @@
 include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
 endif
+ifndef Queue
+include                         $(DIR_MORPHEO)/Behavioural/Generic/Queue/Makefile.deps
+endif
 
 #-----[ Directory ]----------------------------------------
@@ -20,7 +23,9 @@
 #-----[ Library ]------------------------------------------
 Execute_queue_LIBRARY		= 	-lExecute_queue	\
+					$(Queue_LIBRARY)	\
 					$(Behavioural_LIBRARY)	
 
 Execute_queue_DIR_LIBRARY	=	-L$(Execute_queue_DIR)/lib	\
+					$(Queue_DIR_LIBRARY) \
 					$(Behavioural_DIR_LIBRARY)
 
@@ -30,4 +35,5 @@
 				@\
 				$(MAKE) Behavioural_library; \
+				$(MAKE) Queue_library; \
 				$(MAKE) --directory=$(Execute_queue_DIR) --makefile=Makefile;
 
@@ -35,3 +41,4 @@
 				@\
 				$(MAKE) Behavioural_library_clean; \
+				$(MAKE) Queue_library_clean; \
 				$(MAKE) --directory=$(Execute_queue_DIR) --makefile=Makefile clean;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/test.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/test.cpp	(revision 98)
@@ -7,5 +7,5 @@
  */
 
-#define NB_ITERATION  1
+#define NB_ITERATION  16
 #define CYCLE_MAX     (128*NB_ITERATION)
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h	(revision 98)
@@ -38,4 +38,5 @@
 //public : uint32_t            _size_ooo_engine_id           ;
 //public : uint32_t            _size_packet_id               ;
+  public : uint32_t            _size_internal_queue          ;
 
 //public : bool                _have_port_context_id         ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp	(revision 98)
@@ -9,4 +9,5 @@
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
 #include "Behavioural/include/Vhdl.h"
+#include "Behavioural/Generic/Queue/include/Queue.h"
 
 namespace morpheo                    {
@@ -25,4 +26,30 @@
   {
     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
+
+    //----- Queue -----
+   
+    morpheo::behavioural::generic::queue::Parameters * param_queue;
+    morpheo::behavioural::generic::queue::Queue      * queue;
+    
+    param_queue = new morpheo::behavioural::generic::queue::Parameters
+      (_param->_size_queue,
+       _param->_size_internal_queue
+       );
+    
+    std::string queue_name = _name + "_queue";
+    queue = new morpheo::behavioural::generic::queue::Queue
+      (queue_name.c_str()
+#ifdef STATISTICS
+       ,NULL
+#endif
+       ,param_queue
+       ,USE_VHDL);
+    
+    _component->set_component(queue->_component
+#ifdef POSITION
+                              , 0, 0, 0, 0
+#endif
+                              , INSTANCE_LIBRARY
+                              );
 
     Vhdl * vhdl = new Vhdl (_name);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp	(revision 98)
@@ -24,356 +24,325 @@
   {
     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
-    vhdl->set_body (0,"");
-    vhdl->set_body (0,"process (in_CLOCK)");
-    vhdl->set_body (0,"begin");
-    vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then");
-//     vhdl->set_body (2,"if in_NRESET = '0' then");
-//     vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;");
-//     vhdl->set_body (2,"else");
-    vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;");
+
+    vhdl->set_comment(0,"");
+    vhdl->set_comment(0,"-----------------------------------");
+    vhdl->set_comment(0,"-- Instance queue                  ");
+    vhdl->set_comment(0,"-----------------------------------");
+    vhdl->set_comment(0,"");
+
+    vhdl->set_body   (0,"instance_"+_name+"_queue : "+_name+"_queue");
+    vhdl->set_body   (0,"port map (");
+    vhdl->set_body   (1,"  in_CLOCK       \t=>\t      in_CLOCK ");
+    vhdl->set_body   (1,", in_NRESET      \t=>\t      in_NRESET");
+    vhdl->set_body   (1,", in_INSERT_VAL  \t=>\tinternal_QUEUE_INSERT_VAL");
+    vhdl->set_body   (1,",out_INSERT_ACK  \t=>\tinternal_QUEUE_INSERT_ACK");
+    vhdl->set_body   (1,", in_INSERT_DATA \t=>\tinternal_QUEUE_INSERT_DATA");
+    vhdl->set_body   (1,",out_RETIRE_VAL  \t=>\tinternal_QUEUE_RETIRE_VAL");
+    vhdl->set_body   (1,", in_RETIRE_ACK  \t=>\tinternal_QUEUE_RETIRE_ACK");
+    vhdl->set_body   (1,",out_RETIRE_DATA \t=>\tinternal_QUEUE_RETIRE_DATA");
+    vhdl->set_body   (0,");");
+
+    vhdl->set_comment(0,"");
+    vhdl->set_comment(0,"-----------------------------------");
+    vhdl->set_comment(0,"-- Input  Buffer                   ");
+    vhdl->set_comment(0,"-----------------------------------");
+    vhdl->set_comment(0,"");
+
+    {
+    uint32_t min = 0;
+    uint32_t max, size;
+
+    if(_param->_have_port_context_id   )
+      {
+    size = _param->_size_context_id;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
+    min = max+1;
+      }
+    if(_param->_have_port_front_end_id   )
+      {
+    size = _param->_size_front_end_id;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
+    min = max+1;
+      }
+    if(_param->_have_port_ooo_engine_id   )
+      {
+    size = _param->_size_ooo_engine_id;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
+    min = max+1;
+      }
+    if(_param->_have_port_rob_ptr)
+      {
+    size = _param->_size_rob_ptr;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
+    min = max+1;
+      }
+
+//  size = _param->_size_operation;
+//  max = min-1+size;
+//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OPERATION;");
+//  min = max+1;
+//
+//  size = _param->_size_type;
+//  max = min-1+size;
+//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_TYPE;");
+//  min = max+1;
+
+    size = _param->_size_special_data;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FLAGS;");
+    min = max+1;
+
+    size = _param->_size_exception;    
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
+    min = max+1;
+
+    size = 1;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
+    min = max+1;
+
+    size = _param->_size_instruction_address;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;");
+    min = max+1;
+
+    size = _param->_size_general_data;
+    max = min-1+size;
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_DATA;");
+    min = max+1;
+    }
+
+    vhdl->set_comment(0,"");
+    vhdl->set_comment(0,"-----------------------------------");
+    vhdl->set_comment(0,"-- Output Buffer                   ");
+    vhdl->set_comment(0,"-----------------------------------");
+    vhdl->set_comment(0,"");
+
+    if(_param->_have_port_context_id)
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID    <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;");
+    if(_param->_have_port_front_end_id)
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID  <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;");
+    if(_param->_have_port_ooo_engine_id)
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;");
+    if(_param->_have_port_rob_ptr)
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID     <= internal_EXECUTE_QUEUE_OUT_PACKET_ID    ;");
+//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OPERATION     <= internal_EXECUTE_QUEUE_OUT_OPERATION    ;");
+//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_TYPE          <= internal_EXECUTE_QUEUE_OUT_TYPE         ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FLAGS         <= internal_EXECUTE_QUEUE_OUT_FLAGS        ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION     <= internal_EXECUTE_QUEUE_OUT_EXCEPTION    ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_ADDRESS       <= internal_EXECUTE_QUEUE_OUT_ADDRESS      ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_DATA          <= internal_EXECUTE_QUEUE_OUT_DATA         ;");
+
+
+//     vhdl->set_body (0,"");
+//     vhdl->set_body (0,"process (in_CLOCK)");
+//     vhdl->set_body (0,"begin");
+//     vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then");
+// //     vhdl->set_body (2,"if in_NRESET = '0' then");
+// //     vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;");
+// //     vhdl->set_body (2,"else");
+//     vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;");
+// //     vhdl->set_body (2,"end if;");
+
+//     for (uint32_t i = 0; i <_param->_size_queue - 1; i++)
+//       {
+//      vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then");
+//      vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then");
+//      if (_param->_have_port_context_id)
+//      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
+//      if (_param->_have_port_front_end_id)
+//      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
+//      if (_param->_have_port_ooo_engine_id)
+//      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
+//      if (_param->_have_port_rob_ptr)
+//         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
+//      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
+//      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
+//      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
+//      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
+//      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
+
+//      vhdl->set_body (3, "else");
+//      if (_param->_have_port_context_id)
+//      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= reg_CONTEXT_ID_"+toString(i+1)+";");
+//      if (_param->_have_port_front_end_id)
+//      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= reg_FRONT_END_ID_"+toString(i+1)+";");
+//      if (_param->_have_port_ooo_engine_id)
+//      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";");
+//      if (_param->_have_port_rob_ptr)
+//         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= reg_PACKET_ID_"+toString(i+1)+";");
+//      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= reg_FLAGS_"+toString(i+1)+";");
+//      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= reg_EXCEPTION_"+toString(i+1)+";");
+//      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= reg_NO_SEQUENCE_"+toString(i+1)+";");
+//      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= reg_ADDRESS_"+toString(i+1)+";");
+//      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= reg_DATA_"+toString(i+1)+";");
+        
+//      vhdl->set_body (3,"end if;");
+
+//      vhdl->set_body (2,"end if;");
+//       }
+
+//     vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then");
+//     if (_param->_have_port_context_id)
+//       vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
+//     if (_param->_have_port_front_end_id)
+//       vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
+//     if (_param->_have_port_ooo_engine_id)
+//       vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
+//     if (_param->_have_port_rob_ptr)
+//       vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
+//     vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
+//     vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
+//     vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
+//     vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
+//     vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
 //     vhdl->set_body (2,"end if;");
 
-    for (uint32_t i = 0; i <_param->_size_queue - 1; i++)
-      {
-	vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then");
-	vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then");
-	if (_param->_have_port_context_id)
-	vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
-	if (_param->_have_port_front_end_id)
-	vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
-	if (_param->_have_port_ooo_engine_id)
-	vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
-	if (_param->_have_port_rob_ptr)
-        vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
-	vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
-	vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
-	vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
-	vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
-	vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
-
-	vhdl->set_body (3, "else");
-	if (_param->_have_port_context_id)
-	vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= reg_CONTEXT_ID_"+toString(i+1)+";");
-	if (_param->_have_port_front_end_id)
-	vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= reg_FRONT_END_ID_"+toString(i+1)+";");
-	if (_param->_have_port_ooo_engine_id)
-	vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";");
-	if (_param->_have_port_rob_ptr)
-        vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= reg_PACKET_ID_"+toString(i+1)+";");
-	vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= reg_FLAGS_"+toString(i+1)+";");
-	vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= reg_EXCEPTION_"+toString(i+1)+";");
-	vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= reg_NO_SEQUENCE_"+toString(i+1)+";");
-	vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= reg_ADDRESS_"+toString(i+1)+";");
-	vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= reg_DATA_"+toString(i+1)+";");
-	
-	vhdl->set_body (3,"end if;");
-
-	vhdl->set_body (2,"end if;");
-      }
-
-    vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then");
-    if (_param->_have_port_context_id)
-      vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
-    if (_param->_have_port_front_end_id)
-      vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
-    if (_param->_have_port_ooo_engine_id)
-      vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
-    if (_param->_have_port_rob_ptr)
-      vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
-    vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
-    vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
-    vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
-    vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
-    vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
-    vhdl->set_body (2,"end if;");
-
-
-    vhdl->set_body (1,"end if;");
-    vhdl->set_body (0,"end process;");
-
-
-    vhdl->set_body (0,"");
-    vhdl->set_body (0,"");
-    vhdl->set_body (0,"");
-
-    vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;");
-    vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;");
-    if (_param->_have_port_context_id)
-    vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;");
-    if (_param->_have_port_front_end_id)
-    vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;");
-    if (_param->_have_port_ooo_engine_id)
-    vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;");
-    if (_param->_have_port_rob_ptr)
-    vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;");
-    vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;");
-    vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;");
-    vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;");
-    vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;");
-    vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;");
-
-
-    vhdl->set_body (0,"");
-
-    vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)");
-    vhdl->set_body (0,"begin");
-    vhdl->set_body (1,"if in_NRESET = '0' then");
-    vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;");
-    vhdl->set_body (1,"else");
-    vhdl->set_body (2,"case reg_CURRENT_STATE is");
-    for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
-      {
-	vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
-	if (i == 0)
-	  {
-	    vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then");
-	    vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
-	    vhdl->set_body (4,"else");
-	    vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
-	    vhdl->set_body (4,"end if;");
-	    continue;
-	  }
-	if (i == (_param->_size_queue))
-	  {
-	    vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then");
-	    vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
-	    vhdl->set_body (4,"else");
-	    vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
-	    vhdl->set_body (4,"end if;");
-	    continue;
-	  }
-	vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then");
-	vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
-	vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then");
-	vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
-	vhdl->set_body (4,"else");
-	vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
-	vhdl->set_body (4,"end if;");
-      }
-    vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;");
-    vhdl->set_body (2,"end case;");
-    vhdl->set_body (1,"end if;");
-
-    vhdl->set_body (2,"case reg_CURRENT_STATE is");
-    for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
-      {
-	vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
-	if (i == 0)
-	  {
-	    vhdl->set_body (4,"sig_OUT_VAL <= '0';");
-	    vhdl->set_body (4,"sig_IN_ACK <= '1';");
-	    for (uint32_t j = 0; j <_param->_size_queue; j++)
-	      {
-		if (i == j)
-		  {
-		    vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-		    vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;");
-		  }
-		else
-		  {
-		    if (j < (_param->_size_queue - 1))
-		      vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-		    vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
-		  }
-	      }
-	    continue;
-	  }
-	if (i == (_param->_size_queue))
-	  {
-	    vhdl->set_body (4,"sig_OUT_VAL <= '1';");
-	    vhdl->set_body (4,"sig_IN_ACK <= '0';");
-	    for (uint32_t j = 0; j <_param->_size_queue; j++)
-	      {
-		if (j == (i - 1))
-		  {
-		    vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
-		  }
-		else
-		  {
-		    vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-		    vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-		  }
-	      }
-	    continue;
-	  }
-	vhdl->set_body (4,"sig_OUT_VAL <= '1';");
-	vhdl->set_body (4,"sig_IN_ACK <= '1';");
-	for (uint32_t j = 0; j <_param->_size_queue; j++)
-	  {
-	    if (j < (i - 1))
-	      {
-		vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-		vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-	      }
-	    if (j == (i - 1))
-	      {
-		vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-		vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;");
-	      }
-	    if (j == i)
-	      {
-		if (j < (_param->_size_queue - 1))
-		  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-		vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;");
-	      }
-	    if (j > i)
-	      {
-		if (j < (_param->_size_queue - 1))
-		  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-		vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
-	      }
-	  }
-      }
-    vhdl->set_body (3,"when others =>");
-    vhdl->set_body (2,"end case;");
-
-    vhdl->set_body (0,"end process;");
-
- 
-
+
+//     vhdl->set_body (1,"end if;");
+//     vhdl->set_body (0,"end process;");
+
+
+//     vhdl->set_body (0,"");
+//     vhdl->set_body (0,"");
+//     vhdl->set_body (0,"");
+
+//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;");
+//     vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;");
+//     if (_param->_have_port_context_id)
+//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;");
+//     if (_param->_have_port_front_end_id)
+//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;");
+//     if (_param->_have_port_ooo_engine_id)
+//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;");
+//     if (_param->_have_port_rob_ptr)
+//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;");
+//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;");
+//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;");
+//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;");
+//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;");
+//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;");
+
+
+//     vhdl->set_body (0,"");
+
+//     vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)");
+//     vhdl->set_body (0,"begin");
+//     vhdl->set_body (1,"if in_NRESET = '0' then");
+//     vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;");
+//     vhdl->set_body (1,"else");
+//     vhdl->set_body (2,"case reg_CURRENT_STATE is");
+//     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
+//       {
+//      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
+//      if (i == 0)
+//        {
+//          vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then");
+//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
+//          vhdl->set_body (4,"else");
+//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
+//          vhdl->set_body (4,"end if;");
+//          continue;
+//        }
+//      if (i == (_param->_size_queue))
+//        {
+//          vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then");
+//          vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
+//          vhdl->set_body (4,"else");
+//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
+//          vhdl->set_body (4,"end if;");
+//          continue;
+//        }
+//      vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then");
+//      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
+//      vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then");
+//      vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
+//      vhdl->set_body (4,"else");
+//      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
+//      vhdl->set_body (4,"end if;");
+//       }
+//     vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;");
 //     vhdl->set_body (2,"end case;");
-//     for (uint32_t i = 0; i <_param->_size_queue; i++)
+//     vhdl->set_body (1,"end if;");
+
+//     vhdl->set_body (2,"case reg_CURRENT_STATE is");
+//     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
 //       {
-// 	if (i == 0)
-// 	  vhdl->set_body (4,"sig_WEN_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_VAL;");
-// 	else
-// 	  vhdl->set_body (4,"sig_WEN_"+toString(i)+" <= '0';");
-// 	if (i < _param->_size_queue - 1)
-// 	  vhdl->set_body (4,"sig_SEL_"+toString(i)+" <= '0';");
+//      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
+//      if (i == 0)
+//        {
+//          vhdl->set_body (4,"sig_OUT_VAL <= '0';");
+//          vhdl->set_body (4,"sig_IN_ACK <= '1';");
+//          for (uint32_t j = 0; j <_param->_size_queue; j++)
+//            {
+//              if (i == j)
+//                {
+//                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
+//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;");
+//                }
+//              else
+//                {
+//                  if (j < (_param->_size_queue - 1))
+//                    vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
+//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
+//                }
+//            }
+//          continue;
+//        }
+//      if (i == (_param->_size_queue))
+//        {
+//          vhdl->set_body (4,"sig_OUT_VAL <= '1';");
+//          vhdl->set_body (4,"sig_IN_ACK <= '0';");
+//          for (uint32_t j = 0; j <_param->_size_queue; j++)
+//            {
+//              if (j == (i - 1))
+//                {
+//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
+//                }
+//              else
+//                {
+//                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
+//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
+//                }
+//            }
+//          continue;
+//        }
+//      vhdl->set_body (4,"sig_OUT_VAL <= '1';");
+//      vhdl->set_body (4,"sig_IN_ACK <= '1';");
+//      for (uint32_t j = 0; j <_param->_size_queue; j++)
+//        {
+//          if (j < (i - 1))
+//            {
+//              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
+//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
+//            }
+//          if (j == (i - 1))
+//            {
+//              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
+//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;");
+//            }
+//          if (j == i)
+//            {
+//              if (j < (_param->_size_queue - 1))
+//                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
+//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;");
+//            }
+//          if (j > i)
+//            {
+//              if (j < (_param->_size_queue - 1))
+//                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
+//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
+//            }
+//        }
 //       }
-//     vhdl->set_body (2,"end process;");
-	
-//     vhdl->set_body (0,"sig_TRANS_OUT <=");
-//     vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_0 else");
-//     vhdl->set_body (1,"'1';");
-
-//     vhdl->set_body (0,"sig_TRANS_IN <=");
-//     vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue)+" else");
-//     vhdl->set_body (1,"'1';");
-
-
-
-//     vhdl->set_body (0,"sig_NEXT_STATE <=");
-//     vhdl->set_body (1,"reg_CURRENT_STATE("+toString(_param->_size_queue-1)+" downto 0) & '0' when in_EXECUTE_QUEUE_IN_VAL = '1' and ((reg_CURRENT_STATE = STATE_0) xor (in_EXECUTE_QUEUE_OUT_ACK = '0')) and sig_TRANS_IN = '1' else");
-//     vhdl->set_body (1,"'0' & reg_CURRENT_STATE("+toString(_param->_size_queue)+" downto 1) when in_EXECUTE_QUEUE_OUT_ACK = '1' and ((in_EXECUTE_QUEUE_IN_VAL = '0') xor (reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue)+")) and sig_TRANS_OUT = '1' else");
-//     vhdl->set_body (1,"reg_CURRENT_STATE;");
-
-//     vhdl->set_body (0,"sig_WEN_0 <=");
-//     vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL when reg_CURRENT_STATE = STATE_0 else");
-//     vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL when reg_CURRENT_STATE = STATE_1 else");
-//     vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
-//      for (uint32_t i = 1; i <_param->_size_queue-1; i++)
-//       {
-// 	vhdl->set_body (0,"sig_WEN_"+toString(i)+" <=");
-// 	vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(i)+" else");
-// 	vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(i+1)+" else");
-// 	vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
-//       }
-//     vhdl->set_body (0,"sig_WEN_"+toString(_param->_size_queue-1)+" <=");
-//     vhdl->set_body (1,"in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK when reg_CURRENT_STATE = STATE_"+toString(_param->_size_queue-1)+" else");
-//     vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
-
-//     vhdl->set_body (0,"");
-//     for (uint32_t i = 0; i <_param->_size_queue-1; i++)
-//       {
-// 	vhdl->set_body (0,"sig_SEL_"+toString(i)+" <=");
-// 	vhdl->set_body (1,"'0' when reg_CURRENT_STATE = STATE_"+toString(i+1)+" or reg_CURRENT_STATE = STATE_"+toString(i)+" else");
-// 	vhdl->set_body (1,"in_EXECUTE_QUEUE_OUT_ACK;");
-//       }
-
-//   process (reg_CURRENT_STATE, in_PUSH_0_VAL, in_POP_0_ACK)
-//   begin
-//     case reg_CURRENT_STATE is
-    
-// with reg_CURRENT_STATE select
-//   sig_WEN0 <=
-//   0 when 1,
-//   4 when 6;
-//       when "00001" => out_POP_0_VAL <= '0';
-//                      out_PUSH_0_ACK <= '1';
-//                      sig_SEL0 <= '0';
-//                      sig_WEN0 <= in_PUSH_0_VAL;
-//                      sig_SEL1 <= '0';
-//                      sig_WEN1 <= '0';
-//                      sig_SEL2 <= '0';
-//                      sig_WEN2 <= '0';
-//                      sig_WEN3 <= '0';
-//                      if in_PUSH_0_VAL = '1' then
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
-//                      else
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE;
-//                      end if;
-
-//       when "00010" => out_POP_0_VAL <= '1';
-//                      out_PUSH_0_ACK <= '1';
-//                      sig_SEL0 <= '0';
-//                      sig_WEN0 <= in_POP_0_ACK and in_PUSH_0_VAL;
-//                      sig_SEL1 <= '0';
-//                      sig_WEN1 <= in_PUSH_0_VAL and not in_POP_0_ACK;
-//                      sig_SEL2 <= '0';
-//                      sig_WEN2 <= '0';
-//                      sig_WEN3 <= '0';
-//                      if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
-//                      elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
-//                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
-//                      else
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE;
-//                      end if;
-
-//       when "00100" => out_POP_0_VAL <= '1';
-//                      out_PUSH_0_ACK <= '1';
-//                      sig_SEL0 <= in_POP_0_ACK;
-//                      sig_WEN0 <= in_POP_0_ACK;
-//                      sig_SEL1 <= '0';
-//                      sig_WEN1 <= in_POP_0_ACK and in_PUSH_0_VAL;
-//                      sig_SEL2 <= '0';
-//                      sig_WEN2 <= in_PUSH_0_VAL and not in_POP_0_ACK;
-//                      sig_WEN3 <= '0';
-//                      if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
-//                      elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
-//                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
-//                      else
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE;
-//                      end if;
-
-//       when "01000" => out_POP_0_VAL <= '1';
-//                      out_PUSH_0_ACK <= '1';
-//                      sig_SEL0 <= in_POP_0_ACK;
-//                      sig_WEN0 <= in_POP_0_ACK;
-//                      sig_SEL1 <= in_POP_0_ACK;
-//                      sig_WEN1 <= in_POP_0_ACK;
-//                      sig_SEL2 <= '0';
-//                      sig_WEN2 <= in_POP_0_ACK and in_PUSH_0_VAL;
-//                      sig_WEN3 <= in_PUSH_0_VAL and not in_POP_0_ACK;
-//                      if (in_PUSH_0_VAL = '1') and (in_POP_0_ACK = '0') then
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE(3 downto 0) & '0';
-//                      elsif (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
-//                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
-//                      else
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE;
-//                      end if;
-
-//       when "10000" => out_POP_0_VAL <= '1';
-//                      out_PUSH_0_ACK <= '0';
-//                      sig_SEL0 <= in_POP_0_ACK;
-//                      sig_WEN0 <= in_POP_0_ACK;
-//                      sig_SEL1 <= in_POP_0_ACK;
-//                      sig_WEN1 <= in_POP_0_ACK;
-//                      sig_SEL2 <= in_POP_0_ACK;
-//                      sig_WEN2 <= in_POP_0_ACK;
-//                      sig_WEN3 <= '0';
-//                      if (in_PUSH_0_VAL = '0') and (in_POP_0_ACK = '1') then
-//                        sig_NEXT_STATE <= '0' & reg_CURRENT_STATE(4 downto 1);
-//                      else
-//                        sig_NEXT_STATE <= reg_CURRENT_STATE;
-//                      end if;
-
-// 	    when others =>
-// 			sig_next_state <= "00001";
-
-// 	end case;
-//   end process;
+//     vhdl->set_body (3,"when others =>");
+//     vhdl->set_body (2,"end case;");
+//     vhdl->set_body (0,"end process;");
 
     log_printf(FUNC,Execute_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_declaration.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_declaration.cpp	(revision 98)
@@ -25,37 +25,112 @@
     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
 
-    for (uint32_t i=0; i<_param->_size_queue; ++i)
+    vhdl->set_alias  ("internal_QUEUE_INSERT_VAL     ",1," in_EXECUTE_QUEUE_IN_VAL",std_logic_range(1));
+    vhdl->set_alias  ("internal_QUEUE_INSERT_ACK     ",1,"out_EXECUTE_QUEUE_IN_ACK",std_logic_range(1));
+    vhdl->set_signal ("internal_QUEUE_INSERT_DATA    ",_param->_size_internal_queue);
+    vhdl->set_signal ("internal_QUEUE_RETIRE_DATA    ",_param->_size_internal_queue);
+    vhdl->set_alias  ("internal_QUEUE_RETIRE_VAL     ",1,"out_EXECUTE_QUEUE_OUT_VAL",std_logic_range(1));
+    vhdl->set_alias  ("internal_QUEUE_RETIRE_ACK     ",1," in_EXECUTE_QUEUE_OUT_ACK",std_logic_range(1));
+
+    uint32_t min = 0;
+    uint32_t max, size;
+
+    if(_param->_have_port_context_id   )
       {
-	if (_param->_have_port_context_id)
-	  vhdl->set_signal("reg_CONTEXT_ID_"+toString(i),_param->_size_context_id);
-	if (_param->_have_port_front_end_id)
-	  vhdl->set_signal("reg_FRONT_END_ID_"+toString(i),_param->_size_front_end_id);
-	if (_param->_have_port_ooo_engine_id)
-	  vhdl->set_signal("reg_OOO_ENGINE_ID_"+toString(i),_param->_size_ooo_engine_id);
-	if (_param->_have_port_rob_ptr)
-	  vhdl->set_signal("reg_PACKET_ID_"+toString(i),_param->_size_rob_ptr);
-	vhdl->set_signal("reg_FLAGS_"+toString(i),_param->_size_special_data);
-	vhdl->set_signal("reg_EXCEPTION_"+toString(i),_param->_size_exception);
-	vhdl->set_signal("reg_NO_SEQUENCE_"+toString(i),1);
-	vhdl->set_signal("reg_ADDRESS_"+toString(i),_param->_size_instruction_address);
-	vhdl->set_signal("reg_DATA_"+toString(i),_param->_size_general_data);
+        size = _param->_size_context_id;
+        max = min-1+size;
+        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_CONTEXT_ID           ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+        min = max+1;
+      }
+    if(_param->_have_port_front_end_id   )
+      {
+        size = _param->_size_front_end_id;
+        max = min-1+size;
+        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FRONT_END_ID         ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+        min = max+1;
+      }
+    if(_param->_have_port_ooo_engine_id   )
+      {
+        size = _param->_size_ooo_engine_id;
+        max = min-1+size;
+        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID        ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+        min = max+1;
+      }
+    if(_param->_have_port_rob_ptr)
+      {
+        size = _param->_size_rob_ptr;
+        max = min-1+size;
+        vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_PACKET_ID            ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+        min = max+1;
       }
 
-    vhdl->set_signal("reg_CURRENT_STATE",_param->_size_queue+1);
+//  size = _param->_size_operation;
+//  max = min-1+size;
+//  vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_OPERATION            ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+//  min = max+1;
+//
+//  size = _param->_size_type;
+//  max = min-1+size;
+//  vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_TYPE                 ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+//  min = max+1;
 
-    vhdl->set_signal("sig_NEXT_STATE",_param->_size_queue+1);
+    size = _param->_size_special_data;
+    max = min-1+size;
+    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_FLAGS                ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+    min = max+1;
 
-    for (uint32_t i=0; i<_param->_size_queue-1; ++i)
-      {
-	vhdl->set_signal("sig_WEN_"+toString(i),1);
-	vhdl->set_signal("sig_SEL_"+toString(i),1);
-      }
-    vhdl->set_signal("sig_WEN_"+toString(_param->_size_queue - 1),1);
+    size = _param->_size_exception;    
+    max = min-1+size;
+    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_EXCEPTION            ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+    min = max+1;
 
-    vhdl->set_signal("sig_IN_ACK",1);
-    vhdl->set_signal("sig_OUT_VAL",1);
+    size = 1;
+    max = min-1+size;
+    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE          ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+    min = max+1;
 
-   for (uint32_t i=0; i<_param->_size_queue+1; ++i)
-      vhdl->set_constant("STATE_"+toString(i),_param->_size_queue+1,1<<i);
+    size = _param->_size_instruction_address;
+    max = min-1+size;
+    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_ADDRESS              ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+    min = max+1;
+
+    size = _param->_size_general_data;
+    max = min-1+size;
+    vhdl->set_alias ("internal_EXECUTE_QUEUE_OUT_DATA                 ",std_logic(size),"internal_QUEUE_RETIRE_DATA",std_logic_range(_param->_size_internal_queue,max,min));
+    min = max+1;
+
+
+//     for (uint32_t i=0; i<_param->_size_queue; ++i)
+//       {
+//      if (_param->_have_port_context_id)
+//      vhdl->set_signal("reg_CONTEXT_ID_"+toString(i),_param->_size_context_id);
+//      if (_param->_have_port_front_end_id)
+//      vhdl->set_signal("reg_FRONT_END_ID_"+toString(i),_param->_size_front_end_id);
+//      if (_param->_have_port_ooo_engine_id)
+//      vhdl->set_signal("reg_OOO_ENGINE_ID_"+toString(i),_param->_size_ooo_engine_id);
+//      if (_param->_have_port_rob_ptr)
+//      vhdl->set_signal("reg_PACKET_ID_"+toString(i),_param->_size_rob_ptr);
+//      vhdl->set_signal("reg_FLAGS_"+toString(i),_param->_size_special_data);
+//      vhdl->set_signal("reg_EXCEPTION_"+toString(i),_param->_size_exception);
+//      vhdl->set_signal("reg_NO_SEQUENCE_"+toString(i),1);
+//      vhdl->set_signal("reg_ADDRESS_"+toString(i),_param->_size_instruction_address);
+//      vhdl->set_signal("reg_DATA_"+toString(i),_param->_size_general_data);
+//       }
+
+//     vhdl->set_signal("reg_CURRENT_STATE",_param->_size_queue+1);
+
+//     vhdl->set_signal("sig_NEXT_STATE",_param->_size_queue+1);
+
+//     for (uint32_t i=0; i<_param->_size_queue-1; ++i)
+//       {
+//      vhdl->set_signal("sig_WEN_"+toString(i),1);
+//      vhdl->set_signal("sig_SEL_"+toString(i),1);
+//       }
+//     vhdl->set_signal("sig_WEN_"+toString(_param->_size_queue - 1),1);
+
+//     vhdl->set_signal("sig_IN_ACK",1);
+//     vhdl->set_signal("sig_OUT_VAL",1);
+
+//    for (uint32_t i=0; i<_param->_size_queue+1; ++i)
+//       vhdl->set_constant("STATE_"+toString(i),_param->_size_queue+1,1<<i);
 
     log_printf(FUNC,Execute_queue,FUNCTION,"End");
@@ -72,16 +147,2 @@
 }; // end namespace morpheo              
 #endif
-//   signal reg_0             : std_logic_vector (15 downto 0);
-//   signal reg_1             : std_logic_vector (15 downto 0);
-//   signal reg_2             : std_logic_vector (15 downto 0);
-//   signal reg_3             : std_logic_vector (15 downto 0);
-//   signal reg_CURRENT_STATE : std_logic_vector (4 downto 0);
-
-//   signal sig_NEXT_STATE    : std_logic_vector (4 downto 0);
-//   signal sig_WEN0          : std_logic;
-//   signal sig_SEL0          : std_logic;
-//   signal sig_WEN1          : std_logic;
-//   signal sig_SEL1          : std_logic;
-//   signal sig_WEN2          : std_logic;
-//   signal sig_SEL2          : std_logic;
-//   signal sig_WEN3          : std_logic;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp	(revision 98)
@@ -38,4 +38,18 @@
 
     test();
+
+    _size_internal_queue = 
+      (log2( nb_context   )      +
+       log2( nb_front_end )      +
+       log2( nb_ooo_engine)      +
+       log2( nb_packet    )      +      
+//      size_operation           +
+//      size_type                +
+        size_special_data        +
+       _size_exception           +
+       1                         +
+        size_general_data        +
+        size_general_data 
+       );
 
     if (is_toplevel)
