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 81)
+++ 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 88)
@@ -24,5 +24,6 @@
   void Read_queue::transition (void)
   {
-    log_printf(FUNC,Read_queue,FUNCTION,"Begin");
+    log_begin(Read_queue,FUNCTION);
+    log_function(Read_queue,FUNCTION,_name.c_str());
 
     if (PORT_READ(in_NRESET) == 0)
@@ -33,6 +34,8 @@
 	// > 2) flush all slot in one cycle
 
-	while (_queue->empty() == false)
-	  _queue->pop();
+        _queue->clear();
+
+	// Init, else error in registerfile
+	_queue_head->_ooo_engine_id = 0;
       }
     else
@@ -44,5 +47,5 @@
 // 	  cout << (*_queue_head) << endl;
 
-	log_printf(TRACE,Read_queue,FUNCTION,"Read_queue size (begin) : %d",_queue->size());
+	log_printf(TRACE,Read_queue,FUNCTION,"  * Read_queue size (begin) : %d",(int)_queue->size());
 	// Write to read_queue
 
@@ -51,5 +54,5 @@
 	bool need_new_head = false;
 	
-	log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_IN  : %d,%d",PORT_READ(in_READ_QUEUE_IN_VAL), not_full);
+	log_printf(TRACE,Read_queue,FUNCTION,"    * test transaction READ_QUEUE_IN  : %d,%d",PORT_READ(in_READ_QUEUE_IN_VAL), not_full);
 	if ((PORT_READ(in_READ_QUEUE_IN_VAL) == 1) and not_full)
 	  {
@@ -62,5 +65,5 @@
 	    if(_param->_have_port_ooo_engine_id)
 	      entry->_ooo_engine_id= PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID);
-	    if(_param->_have_port_rob_id       )
+	    if(_param->_have_port_rob_ptr      )
 	      entry->_rob_id       = PORT_READ(in_READ_QUEUE_IN_ROB_ID      );
 	    entry->_operation    = PORT_READ(in_READ_QUEUE_IN_OPERATION   );
@@ -82,12 +85,11 @@
 	    entry->_num_reg_re   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE  );
 
-	    log_printf(TRACE,Read_queue,FUNCTION,"   * push (id : %d-%d)",entry->_context_id, entry->_rob_id);
-	    _queue->push(entry);
-
+	    log_printf(TRACE,Read_queue,FUNCTION,"    * push (id : %d-%d)",entry->_context_id, entry->_rob_id);
+	    _queue->push_back(entry);
 
 	    // read next new head
 	    if (empty)
 	      {
-		log_printf(TRACE,Read_queue,FUNCTION,"     * queue was    empty");
+		log_printf(TRACE,Read_queue,FUNCTION,"    * queue was    empty");
 		need_new_head = true;
 	      }
@@ -95,16 +97,16 @@
 
 	// Read from read_queue
-	log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_OUT : %d,%d",internal_READ_QUEUE_OUT_VAL, PORT_READ(in_READ_QUEUE_OUT_ACK));
+	log_printf(TRACE,Read_queue,FUNCTION,"  * test transaction READ_QUEUE_OUT : %d,%d",internal_READ_QUEUE_OUT_VAL, PORT_READ(in_READ_QUEUE_OUT_ACK));
 	if ((    internal_READ_QUEUE_OUT_VAL  == 1) and 
 	    (PORT_READ(in_READ_QUEUE_OUT_ACK) == 1))
 	  {
 	    // Pop the entry
-	    log_printf(TRACE,Read_queue,FUNCTION,"   * pop  (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id);
-	    _queue->pop();
+	    log_printf(TRACE,Read_queue,FUNCTION,"    * pop  (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id);
+	    _queue->pop_front();
 
 	    // read next new head
 	    if (_queue->empty() == false)
 	      {
-		log_printf(TRACE,Read_queue,FUNCTION,"     * queue was not empty");
+		log_printf(TRACE,Read_queue,FUNCTION,"    * queue was not empty");
 		need_new_head = true;
 	      }
@@ -128,5 +130,5 @@
 	if (need_new_head == true)
 	  {
-	    log_printf(TRACE,Read_queue,FUNCTION," * new head");
+	    log_printf(TRACE,Read_queue,FUNCTION,"  * new head");
 	    (*_queue_head) = (*_queue->front());
 	  }
@@ -138,12 +140,119 @@
 // 	  cout << (*_queue_head) << endl;
 
-	log_printf(TRACE,Read_queue,FUNCTION,"Read_queue size (end  ) : %d",_queue->size());
+#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Read_queue == true)
+	log_printf(TRACE,Read_queue,FUNCTION,"  * Dump Read_queue");
+	log_printf(TRACE,Read_queue,FUNCTION,"    * size : %d",(int)_queue->size());
+
+        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,
+
+                       _queue_head->_context_id           ,
+                       _queue_head->_front_end_id         ,
+                       _queue_head->_ooo_engine_id        ,
+                       _queue_head->_rob_id               ,
+
+                       _queue_head->_type                 ,
+                       _queue_head->_operation            ,
+
+                       _queue_head->_store_queue_ptr_write,
+                       _queue_head->_load_queue_ptr_write ,
+
+                       _queue_head->_has_immediat         ,
+                       _queue_head->_immediat             ,
+
+                       _queue_head->_read_ra              ,
+                       _queue_head->_read_ra_val          ,
+                       _queue_head->_num_reg_ra           ,
+                       _queue_head->_data_ra_val          ,
+                       _queue_head->_data_ra              ,
+
+                       _queue_head->_read_rb              ,
+                       _queue_head->_read_rb_val          ,
+                       _queue_head->_num_reg_rb           ,
+                       _queue_head->_data_rb_val          ,
+                       _queue_head->_data_rb              ,
+
+                       _queue_head->_read_rc              ,
+                       _queue_head->_read_rc_val          ,
+                       _queue_head->_num_reg_rc           ,
+                       _queue_head->_data_rc_val          ,
+                       _queue_head->_data_rc              ,
+
+                       _queue_head->_write_rd             ,
+                       _queue_head->_num_reg_rd           ,
+                       
+                       _queue_head->_write_re             ,
+                       _queue_head->_num_reg_re           ,
+
+                       toString_type(_queue_head->_type).c_str());
+
+
+            std::list<Tread_queue_entry_t *>::iterator it=_queue->begin();
+            ++it; // first is already printed
+            uint32_t i=1;
+
+            for (;it!=_queue->end(); ++it)
+              {
+                log_printf(TRACE,Read_queue,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d   %.4d           , %.1d   %.4d           , %.1d   %.4d     , %.1d %.4d, %.1d %.4d (%s)",
+                           i,
+                           
+                           (*it)->_context_id           ,
+                           (*it)->_front_end_id         ,
+                           (*it)->_ooo_engine_id        ,
+                           (*it)->_rob_id               ,
+                           
+                           (*it)->_type                 ,
+                           (*it)->_operation            ,
+                           
+                           (*it)->_store_queue_ptr_write,
+                           (*it)->_load_queue_ptr_write ,
+                           
+                           (*it)->_has_immediat         ,
+                           (*it)->_immediat             ,
+                           
+                           (*it)->_read_ra              ,
+//                         (*it)->_read_ra_val          ,
+                           (*it)->_num_reg_ra           ,
+//                         (*it)->_data_ra_val          ,
+//                         (*it)->_data_ra              ,
+                           
+                           (*it)->_read_rb              ,
+//                         (*it)->_read_rb_val          ,
+                           (*it)->_num_reg_rb           ,
+//                         (*it)->_data_rb_val          ,
+//                         (*it)->_data_rb              ,
+                           
+                           (*it)->_read_rc              ,
+//                         (*it)->_read_rc_val          ,
+                           (*it)->_num_reg_rc           ,
+//                         (*it)->_data_rc_val          ,
+//                         (*it)->_data_rc              ,
+                           
+                           (*it)->_write_rd             ,
+                           (*it)->_num_reg_rd           ,
+                           
+                           (*it)->_write_re             ,
+                           (*it)->_num_reg_re           ,
+
+                           toString_type((*it)->_type).c_str());
+
+                ++i;
+              }
+          }
+#endif
+
+
       }
 
 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
-    end_cycle ();
+        end_cycle ();
 #endif
 
-    log_printf(FUNC,Read_queue,FUNCTION,"End");
+    log_end(Read_queue,FUNCTION);
   };
 
