Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/Makefile.deps
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/Makefile.deps	(revision 55)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/Makefile.deps	(revision 56)
@@ -8,15 +8,20 @@
 # DIR_MORPHEO must be defined
 
-Reservation_station			= yes
+Reservation_station		= yes
 
 ifndef Behavioural
 include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
 endif
+ifndef Queue_Control
+include 			$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control/Makefile.deps
+endif
 
 #-----[ Library ]------------------------------------------
-Reservation_station_LIBRARY		= 	-lReservation_station	\
+Reservation_station_LIBRARY	= 	-lReservation_station	\
+					$(Queue_Control_LIBRARY)\
 					$(Behavioural_LIBRARY)	
 
-Reservation_station_DIR_LIBRARY		=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/lib	\
+Reservation_station_DIR_LIBRARY	=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/lib	\
+					$(Queue_Control_DIR_LIBRARY)\
 					$(Behavioural_DIR_LIBRARY)
 
@@ -25,4 +30,5 @@
 Reservation_station_library		: 
 				@\
+				$(MAKE) Queue_Control_library; \
 				$(MAKE) Behavioural_library; \
 				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station --makefile=Makefile;
@@ -30,4 +36,5 @@
 Reservation_station_library_clean	: 
 				@\
+				$(MAKE) Queue_Control_library_clean; \
 				$(MAKE) Behavioural_library_clean; \
 				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station --makefile=Makefile clean;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h	(revision 55)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h	(revision 56)
@@ -14,8 +14,8 @@
 
 #include <iostream>
-#include <vector>
 #include "Common/include/ToString.h"
 #include "Common/include/Debug.h"
 
+#include "Behavioural/Generic/Queue_Control/include/Queue_Control.h"
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h"
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Types.h"
@@ -29,4 +29,5 @@
 
 using namespace std;
+using namespace morpheo::behavioural::generic::queue_control;
 
 namespace morpheo {
@@ -202,6 +203,5 @@
 
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  protected : vector<uint32_t>              *  _queue_control;
-  protected : uint32_t                         _queue_nb_elt;
+  protected : morpheo::behavioural::generic::queue_control::Queue_Control * _queue_control;
   protected : Treservation_station_entry_t  *  _queue;
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp	(revision 55)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp	(revision 56)
@@ -234,5 +234,5 @@
     _component->generate_file();
 #endif
-    _queue_control = new vector<uint32_t>;
+    _queue_control = new morpheo::behavioural::generic::queue_control::Queue_Control::Queue_Control(_param->_size_queue);
     _queue         = new Treservation_station_entry_t [_param->_size_queue];
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_genMoore.cpp	(revision 55)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_genMoore.cpp	(revision 56)
@@ -29,5 +29,5 @@
     
     // accept a new instructions when reservation_station is not full
-    internal_RESERVATION_STATION_IN_ACK = _queue_nb_elt < _param->_size_queue;
+    internal_RESERVATION_STATION_IN_ACK = not _queue_control->full();
     
     PORT_WRITE(out_RESERVATION_STATION_IN_ACK, internal_RESERVATION_STATION_IN_ACK);
@@ -37,5 +37,5 @@
     for (uint32_t i=0; i<_param->_size_queue; i++)
       {
-	bool     val   = i <_queue_nb_elt;
+	bool     val   = i <_queue_control->nb_elt();
 	uint32_t index = (*_queue_control)[i];
 	
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 55)
+++ 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 56)
@@ -47,10 +47,5 @@
     if (PORT_READ(in_NRESET) == 0)
       {
-	// clear all element in control.
-	_queue_nb_elt = 0;
-
 	_queue_control->clear();
-	for (uint32_t i=0; i<_param->_size_queue; i++)
-	  _queue_control->push_back(i);
       }
     else
@@ -63,6 +58,5 @@
 
 	    // Write in reservation station
-	    uint32_t index = (*_queue_control)[_queue_nb_elt];
-	    _queue_nb_elt ++;
+	    uint32_t index = _queue_control->push();
 
 	    log_printf(TRACE,Reservation_station,FUNCTION," * index         : %d",index);
@@ -96,5 +90,5 @@
 
 	// scan in reverse order, because when we pop the queue there are an auto reorder
-	for (int32_t i=(static_cast<int32_t>(_queue_nb_elt))-1;i>=0; i--)
+	for (int32_t i=(static_cast<int32_t>(_queue_control->nb_elt()))-1;i>=0; i--)
 	  {
 	    uint32_t index = (*_queue_control)[i];
@@ -105,7 +99,5 @@
 		log_printf(TRACE,Reservation_station,FUNCTION,"POP  [%d]",i);
 
-		_queue_control->erase (_queue_control->begin()+i);
-		_queue_control->push_back(index);
-		_queue_nb_elt --;
+		_queue_control->pop(i);
 
 		log_printf(TRACE,Reservation_station,FUNCTION," * index         : %d",index);
@@ -118,5 +110,5 @@
 	
 	// scan all entry
-	for (uint32_t i=0; i<_queue_nb_elt; i++)
+	for (uint32_t i=0; i<_queue_control->nb_elt(); i++)
 	  {
 	    uint32_t index = (*_queue_control)[i];
