Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Parameters.h	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Parameters.h	(revision 118)
@@ -24,34 +24,35 @@
 
 
+
   class Parameters : public morpheo::behavioural::Parameters
   {
     //-----[ fields ]------------------------------------------------------------
-  public : uint32_t              _size_queue                   ;
-  public : uint32_t              _nb_context                   ;
-  public : uint32_t              _nb_front_end                 ;
-  public : uint32_t              _nb_ooo_engine                ;
-  public : uint32_t              _nb_packet                    ;
-//public : uint32_t              _size_general_data            ;
-  public : uint32_t              _nb_general_register          ;
-//public : uint32_t              _size_special_data            ;
-  public : uint32_t              _nb_special_register          ;
-  public : uint32_t              _nb_bypass_write              ;
-  public : Twrite_queue_scheme_t _queue_scheme                 ;
-
-  public : uint32_t              _nb_gpr_write                 ;
-  public : uint32_t              _nb_spr_write                 ;
-			       
-//public : uint32_t              _size_context_id              ;
-//public : uint32_t              _size_front_end_id            ;
-//public : uint32_t              _size_ooo_engine_id           ;
-//public : uint32_t              _size_packet_id               ;
-//public : uint32_t              _size_general_register        ;
-//public : uint32_t              _size_special_register        ;
-  public : uint32_t              _size_internal_queue          ;
-			       
-//public : bool                  _have_port_context_id         ;
-//public : bool                  _have_port_front_end_id       ;
-//public : bool                  _have_port_ooo_engine_id      ;
-//public : bool                  _have_port_packet_id          ;
+  public : uint32_t               _size_queue             ;
+  public : uint32_t               _nb_context             ;
+  public : uint32_t               _nb_front_end           ;
+  public : uint32_t               _nb_ooo_engine          ;
+  public : uint32_t               _nb_packet              ;
+//public : uint32_t               _size_general_data      ;
+  public : uint32_t               _nb_general_register    ;
+//public : uint32_t               _size_special_data      ;
+  public : uint32_t               _nb_special_register    ;
+  public : uint32_t               _nb_bypass_write        ;
+  public : Twrite_queue_scheme_t  _queue_scheme           ;
+  public : Tbypass_write_scheme_t _bypass_write_scheme    ; 
+  public : uint32_t               _nb_gpr_write           ;
+  public : uint32_t               _nb_spr_write           ;
+			          
+//public : uint32_t               _size_context_id        ;
+//public : uint32_t               _size_front_end_id      ;
+//public : uint32_t               _size_ooo_engine_id     ;
+//public : uint32_t               _size_packet_id         ;
+//public : uint32_t               _size_general_register  ;
+//public : uint32_t               _size_special_register  ;
+  public : uint32_t               _size_internal_queue    ;
+			          
+//public : bool                   _have_port_context_id   ;
+//public : bool                   _have_port_front_end_id ;
+//public : bool                   _have_port_ooo_engine_id;
+//public : bool                   _have_port_packet_id    ;
 
     //-----[ methods ]-----------------------------------------------------------
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Types.h	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Types.h	(revision 118)
@@ -25,4 +25,10 @@
       ,WRITE_QUEUE_SCHEME_MEALY // Write register and pop can be in same cycle
     } Twrite_queue_scheme_t;
+
+  typedef enum
+    {
+      BYPASS_WRITE_FROM_ALU,
+      BYPASS_WRITE_FROM_QUEUE
+    } Tbypass_write_scheme_t;
 
   class write_queue_entry_t
@@ -108,4 +114,26 @@
   };
 
+  template<> inline std::string toString<morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Tbypass_write_scheme_t>(const morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Tbypass_write_scheme_t& x)
+  {
+    switch (x)
+      {
+      case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::BYPASS_WRITE_FROM_ALU   : return "alu"  ; break;
+      case morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::BYPASS_WRITE_FROM_QUEUE : return "queue"; break;
+      default : return ""; break;
+      }
+  };
+
+  template<> inline morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Tbypass_write_scheme_t fromString<morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Tbypass_write_scheme_t>(const std::string& x)
+  {
+    if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::BYPASS_WRITE_FROM_ALU))) == 0) or
+         (x.compare("alu") == 0))
+      return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::BYPASS_WRITE_FROM_ALU;
+    if ( (x.compare(toString(static_cast<uint32_t>(morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::BYPASS_WRITE_FROM_QUEUE))) == 0) or
+         (x.compare("queue") == 0))
+      return morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::BYPASS_WRITE_FROM_QUEUE;
+    
+    throw (ErrorMorpheo ("<fromString> : Unknow string : \""+x+"\""));
+  };
+
 }; // end namespace morpheo              
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h	(revision 118)
@@ -172,5 +172,6 @@
   public  : void     transition                (void);
   public  : void     genMoore                  (void);
-  public  : void     genMealy                  (void);
+  public  : void     genMealy_write            (void);
+  public  : void     genMealy_bypass           (void);
 #endif					       
 #ifdef STATISTICS
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp	(revision 118)
@@ -45,4 +45,6 @@
     _nb_bypass_write         = nb_bypass_write    ;
     _queue_scheme            = queue_scheme       ;
+    _bypass_write_scheme     = BYPASS_WRITE_FROM_ALU;
+//  _bypass_write_scheme     = BYPASS_WRITE_FROM_QUEUE;
 
     _nb_gpr_write            = 1;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp	(revision 118)
@@ -28,6 +28,8 @@
     Parameters_test test (_type);
 
-    if (_nb_bypass_write > _size_queue)
+    if ((_bypass_write_scheme == BYPASS_WRITE_FROM_ALU)   and (_nb_bypass_write > _size_queue))
       test.error("The write_queue can't have more bypass_write than entry in the queue.\n");
+    if ((_bypass_write_scheme == BYPASS_WRITE_FROM_QUEUE) and (_nb_bypass_write > _size_queue-1))
+      test.error("The write_queue can't have more bypass_write than entry in the queue -1 (the write_queue[0] is unnecessary).\n");
 
     log_printf(FUNC,Write_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp	(revision 118)
@@ -92,7 +92,7 @@
 	if (_param->_queue_scheme == WRITE_QUEUE_SCHEME_MEALY)
 	  {
-	log_printf(INFO,Write_queue,FUNCTION,"Method - genMealy");
+	log_printf(INFO,Write_queue,FUNCTION,"Method - genMealy_write");
 
-	SC_METHOD (genMealy);
+	SC_METHOD (genMealy_write);
 	dont_initialize ();
 	sensitive << (*(in_CLOCK)).neg(); // need internal register
@@ -106,4 +106,28 @@
 # endif    
 	  }
+
+        if ((_param->_bypass_write_scheme == BYPASS_WRITE_FROM_ALU) and
+            (_param->_nb_bypass_write > 0))
+          {
+	log_printf(INFO,Write_queue,FUNCTION,"Method - genMealy_bypass");
+
+	SC_METHOD (genMealy_bypass);
+	dont_initialize ();
+// 	sensitive << (*(in_CLOCK)).neg(); // don't need internal register
+        sensitive << (*(in_WRITE_QUEUE_IN_VAL          ))
+                  << (*(in_WRITE_QUEUE_IN_WRITE_RD     ))
+                  << (*(in_WRITE_QUEUE_IN_NUM_REG_RD   ))
+                  << (*(in_WRITE_QUEUE_IN_DATA_RD      ))
+                  << (*(in_WRITE_QUEUE_IN_WRITE_RE     ))
+                  << (*(in_WRITE_QUEUE_IN_NUM_REG_RE   ))
+                  << (*(in_WRITE_QUEUE_IN_DATA_RE      ));
+        if (_param->_have_port_ooo_engine_id)
+        sensitive << (*(in_WRITE_QUEUE_IN_OOO_ENGINE_ID));
+
+
+# ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+# endif    
+          }
 
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy.cpp	(revision 117)
+++ 	(revision )
@@ -1,106 +1,0 @@
-#ifdef SYSTEMC
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace core {
-namespace multi_execute_loop {
-namespace execute_loop {
-namespace multi_write_unit {
-namespace write_unit {
-namespace write_queue {
-
-
-#undef  FUNCTION
-#define FUNCTION "Write_queue::genMealy"
-  void Write_queue::genMealy (void)
-  {
-    log_begin(Write_queue,FUNCTION);
-    log_function(Write_queue,FUNCTION,_name.c_str());
-    
-    // -----[ Interface "bypass_write" ]----------------------------------
-    // in genMoore
-    // -----[ Interface "Write_queue_in" ]--------------------------------
-    // in genMoore
-
-    bool       val      = not _queue->empty();
-    Tcontrol_t write_rd = val and _queue->front()->_write_rd;
-    Tcontrol_t write_re = val and _queue->front()->_write_re;
-
-    // -----[ Interface "gpr_write" ]-------------------------------------
-    // -----[ Interface "spr_write" ]-------------------------------------
-    {
-      internal_GPR_WRITE_VAL = val and write_rd;
-      internal_SPR_WRITE_VAL = val and write_re;
-      
-      PORT_WRITE(out_GPR_WRITE_VAL [0], internal_GPR_WRITE_VAL);
-      PORT_WRITE(out_SPR_WRITE_VAL [0], internal_SPR_WRITE_VAL);
-
-      write_rd = (write_rd)?(not PORT_READ(in_GPR_WRITE_ACK [0])):0;
-      write_re = (write_re)?(not PORT_READ(in_SPR_WRITE_ACK [0])):0;
-
-      if (val)
-	{
-	  if (_param->_have_port_ooo_engine_id)
-	  {
-	  PORT_WRITE(out_GPR_WRITE_OOO_ENGINE_ID [0], _queue->front()->_ooo_engine_id);
-	  PORT_WRITE(out_SPR_WRITE_OOO_ENGINE_ID [0], _queue->front()->_ooo_engine_id);
-	  }
-	  PORT_WRITE(out_GPR_WRITE_NUM_REG       [0], _queue->front()->_num_reg_rd);
-	  PORT_WRITE(out_GPR_WRITE_DATA          [0], _queue->front()->_data_rd   );
-	  PORT_WRITE(out_SPR_WRITE_NUM_REG       [0], _queue->front()->_num_reg_re);
-	  PORT_WRITE(out_SPR_WRITE_DATA          [0], _queue->front()->_data_re   );
-	}
-    }
-
-    // -----[ Interface "Write_queue_out" ]--------------------------------
-    {
-      Texception_t load_speculative = (_queue->front()->_exception == EXCEPTION_MEMORY_LOAD_SPECULATIVE);
-
-      internal_WRITE_QUEUE_OUT_VAL = ((val                 ) and
-				      (not load_speculative) and
-				      (not write_rd        ) and
-				      (not write_re        ));
-      
-      PORT_WRITE(out_WRITE_QUEUE_OUT_VAL, internal_WRITE_QUEUE_OUT_VAL);
-
-      if (internal_WRITE_QUEUE_OUT_VAL)
-	{
-	  if (_param->_have_port_context_id)
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_CONTEXT_ID   , _queue->front()->_context_id   );
-	  if (_param->_have_port_front_end_id)
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_FRONT_END_ID , _queue->front()->_front_end_id );
-	  if (_param->_have_port_ooo_engine_id)
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID, _queue->front()->_ooo_engine_id);
-	  if (_param->_have_port_rob_ptr  )
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_PACKET_ID    , _queue->front()->_packet_id    );
-//    	  PORT_WRITE(out_WRITE_QUEUE_OUT_OPERATION    , _queue->front()->_operation    );
-//    	  PORT_WRITE(out_WRITE_QUEUE_OUT_TYPE         , _queue->front()->_type         );
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_FLAGS        , _queue->front()->_data_re      );
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_EXCEPTION    , _queue->front()->_exception    );
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_NO_SEQUENCE  , _queue->front()->_no_sequence  );
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_ADDRESS      , _queue->front()->_address      );
-      	  PORT_WRITE(out_WRITE_QUEUE_OUT_DATA         , _queue->front()->_data_rd      );
-	}
-    }
-
-    log_end(Write_queue,FUNCTION);
-  };
-
-}; // end namespace write_queue
-}; // end namespace write_unit
-}; // end namespace multi_write_unit
-}; // end namespace execute_loop
-}; // end namespace multi_execute_loop
-}; // end namespace core
-
-}; // end namespace behavioural
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy_bypass.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy_bypass.cpp	(revision 118)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy_bypass.cpp	(revision 118)
@@ -0,0 +1,53 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_execute_loop {
+namespace execute_loop {
+namespace multi_write_unit {
+namespace write_unit {
+namespace write_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Write_queue::genMealy_bypass"
+  void Write_queue::genMealy_bypass (void)
+  {
+    log_begin(Write_queue,FUNCTION);
+    log_function(Write_queue,FUNCTION,_name.c_str());
+
+    Tcontrol_t val = PORT_READ(in_WRITE_QUEUE_IN_VAL);
+
+    if (_param->_have_port_ooo_engine_id)
+    PORT_WRITE(out_BYPASS_WRITE_OOO_ENGINE_ID [0], PORT_READ(in_WRITE_QUEUE_IN_OOO_ENGINE_ID));
+    PORT_WRITE(out_BYPASS_WRITE_GPR_VAL       [0], val and PORT_READ(in_WRITE_QUEUE_IN_WRITE_RD     ));
+    PORT_WRITE(out_BYPASS_WRITE_GPR_NUM_REG   [0], PORT_READ(in_WRITE_QUEUE_IN_NUM_REG_RD   )); // RD
+    PORT_WRITE(out_BYPASS_WRITE_GPR_DATA      [0], PORT_READ(in_WRITE_QUEUE_IN_DATA_RD      ));
+    PORT_WRITE(out_BYPASS_WRITE_SPR_VAL       [0], val and PORT_READ(in_WRITE_QUEUE_IN_WRITE_RE     ));
+    PORT_WRITE(out_BYPASS_WRITE_SPR_NUM_REG   [0], PORT_READ(in_WRITE_QUEUE_IN_NUM_REG_RE   )); // RE
+    PORT_WRITE(out_BYPASS_WRITE_SPR_DATA      [0], PORT_READ(in_WRITE_QUEUE_IN_DATA_RE      ));
+    
+    // -----[ Interface "bypass_write" ]----------------------------------
+
+    log_end(Write_queue,FUNCTION);
+  };
+
+}; // end namespace write_queue
+}; // end namespace write_unit
+}; // end namespace multi_write_unit
+}; // end namespace execute_loop
+}; // end namespace multi_execute_loop
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy_write.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy_write.cpp	(revision 118)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMealy_write.cpp	(revision 118)
@@ -0,0 +1,106 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_execute_loop {
+namespace execute_loop {
+namespace multi_write_unit {
+namespace write_unit {
+namespace write_queue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Write_queue::genMealy_write"
+  void Write_queue::genMealy_write (void)
+  {
+    log_begin(Write_queue,FUNCTION);
+    log_function(Write_queue,FUNCTION,_name.c_str());
+    
+    // -----[ Interface "bypass_write" ]----------------------------------
+    // in genMoore
+    // -----[ Interface "Write_queue_in" ]--------------------------------
+    // in genMoore
+
+    bool       val      = not _queue->empty();
+    Tcontrol_t write_rd = val and _queue->front()->_write_rd;
+    Tcontrol_t write_re = val and _queue->front()->_write_re;
+
+    // -----[ Interface "gpr_write" ]-------------------------------------
+    // -----[ Interface "spr_write" ]-------------------------------------
+    {
+      internal_GPR_WRITE_VAL = val and write_rd;
+      internal_SPR_WRITE_VAL = val and write_re;
+      
+      PORT_WRITE(out_GPR_WRITE_VAL [0], internal_GPR_WRITE_VAL);
+      PORT_WRITE(out_SPR_WRITE_VAL [0], internal_SPR_WRITE_VAL);
+
+      write_rd = (write_rd)?(not PORT_READ(in_GPR_WRITE_ACK [0])):0;
+      write_re = (write_re)?(not PORT_READ(in_SPR_WRITE_ACK [0])):0;
+
+      if (val)
+	{
+	  if (_param->_have_port_ooo_engine_id)
+	  {
+	  PORT_WRITE(out_GPR_WRITE_OOO_ENGINE_ID [0], _queue->front()->_ooo_engine_id);
+	  PORT_WRITE(out_SPR_WRITE_OOO_ENGINE_ID [0], _queue->front()->_ooo_engine_id);
+	  }
+	  PORT_WRITE(out_GPR_WRITE_NUM_REG       [0], _queue->front()->_num_reg_rd);
+	  PORT_WRITE(out_GPR_WRITE_DATA          [0], _queue->front()->_data_rd   );
+	  PORT_WRITE(out_SPR_WRITE_NUM_REG       [0], _queue->front()->_num_reg_re);
+	  PORT_WRITE(out_SPR_WRITE_DATA          [0], _queue->front()->_data_re   );
+	}
+    }
+
+    // -----[ Interface "Write_queue_out" ]--------------------------------
+    {
+      Texception_t load_speculative = (_queue->front()->_exception == EXCEPTION_MEMORY_LOAD_SPECULATIVE);
+
+      internal_WRITE_QUEUE_OUT_VAL = ((val                 ) and
+				      (not load_speculative) and
+				      (not write_rd        ) and
+				      (not write_re        ));
+      
+      PORT_WRITE(out_WRITE_QUEUE_OUT_VAL, internal_WRITE_QUEUE_OUT_VAL);
+
+      if (internal_WRITE_QUEUE_OUT_VAL)
+	{
+	  if (_param->_have_port_context_id)
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_CONTEXT_ID   , _queue->front()->_context_id   );
+	  if (_param->_have_port_front_end_id)
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_FRONT_END_ID , _queue->front()->_front_end_id );
+	  if (_param->_have_port_ooo_engine_id)
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID, _queue->front()->_ooo_engine_id);
+	  if (_param->_have_port_rob_ptr  )
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_PACKET_ID    , _queue->front()->_packet_id    );
+//    	  PORT_WRITE(out_WRITE_QUEUE_OUT_OPERATION    , _queue->front()->_operation    );
+//    	  PORT_WRITE(out_WRITE_QUEUE_OUT_TYPE         , _queue->front()->_type         );
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_FLAGS        , _queue->front()->_data_re      );
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_EXCEPTION    , _queue->front()->_exception    );
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_NO_SEQUENCE  , _queue->front()->_no_sequence  );
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_ADDRESS      , _queue->front()->_address      );
+      	  PORT_WRITE(out_WRITE_QUEUE_OUT_DATA         , _queue->front()->_data_rd      );
+	}
+    }
+
+    log_end(Write_queue,FUNCTION);
+  };
+
+}; // end namespace write_queue
+}; // end namespace write_unit
+}; // end namespace multi_write_unit
+}; // end namespace execute_loop
+}; // end namespace multi_execute_loop
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp	(revision 118)
@@ -29,16 +29,25 @@
     {
       std::list<write_queue_entry_t *>::iterator it = _queue->begin();
-      for (uint32_t i=0; i<_param->_nb_bypass_write; i++)
+
+      // first bypass is the write_queue_in
+      uint32_t first_index = ((_param->_bypass_write_scheme == BYPASS_WRITE_FROM_ALU)?1:0);
+      for (uint32_t i=first_index; i<_param->_nb_bypass_write; i++)
 	{
-	  bool val     = i < _queue->size();
-	  
+          // before because first slot is on {GPR|SPR}_WRITE. Also, take next
+	  if (it != _queue->end())
+	    it++;
+
+          uint32_t index = i;
+// 	  bool val = (i+1) < _queue->size();
+	  bool val = (it != _queue->end());
+
 	  if (val)
 	    {
 	      if (_param->_have_port_ooo_engine_id)
-	      PORT_WRITE(out_BYPASS_WRITE_OOO_ENGINE_ID [i], (*it)->_ooo_engine_id);
-	      PORT_WRITE(out_BYPASS_WRITE_GPR_NUM_REG   [i], (*it)->_num_reg_rd);
-	      PORT_WRITE(out_BYPASS_WRITE_GPR_DATA      [i], (*it)->_data_rd   );
-	      PORT_WRITE(out_BYPASS_WRITE_SPR_NUM_REG   [i], (*it)->_num_reg_re);
-	      PORT_WRITE(out_BYPASS_WRITE_SPR_DATA      [i], (*it)->_data_re   );
+	      PORT_WRITE(out_BYPASS_WRITE_OOO_ENGINE_ID [index], (*it)->_ooo_engine_id);
+	      PORT_WRITE(out_BYPASS_WRITE_GPR_NUM_REG   [index], (*it)->_num_reg_rd);
+	      PORT_WRITE(out_BYPASS_WRITE_GPR_DATA      [index], (*it)->_data_rd   );
+	      PORT_WRITE(out_BYPASS_WRITE_SPR_NUM_REG   [index], (*it)->_num_reg_re);
+	      PORT_WRITE(out_BYPASS_WRITE_SPR_DATA      [index], (*it)->_data_re   );
 	    }
 #ifdef SYSTEMC_VHDL_COMPATIBILITY
@@ -46,17 +55,14 @@
             {
 	      if (_param->_have_port_ooo_engine_id)
-	      PORT_WRITE(out_BYPASS_WRITE_OOO_ENGINE_ID [i], 0);
-	      PORT_WRITE(out_BYPASS_WRITE_GPR_NUM_REG   [i], 0);
-	      PORT_WRITE(out_BYPASS_WRITE_GPR_DATA      [i], 0);
-	      PORT_WRITE(out_BYPASS_WRITE_SPR_NUM_REG   [i], 0);
-	      PORT_WRITE(out_BYPASS_WRITE_SPR_DATA      [i], 0);
+	      PORT_WRITE(out_BYPASS_WRITE_OOO_ENGINE_ID [index], 0);
+	      PORT_WRITE(out_BYPASS_WRITE_GPR_NUM_REG   [index], 0);
+	      PORT_WRITE(out_BYPASS_WRITE_GPR_DATA      [index], 0);
+	      PORT_WRITE(out_BYPASS_WRITE_SPR_NUM_REG   [index], 0);
+	      PORT_WRITE(out_BYPASS_WRITE_SPR_DATA      [index], 0);
             }
 #endif
 
-	  PORT_WRITE(out_BYPASS_WRITE_GPR_VAL       [i], val and (*it)->_write_rd  );
-	  PORT_WRITE(out_BYPASS_WRITE_SPR_VAL       [i], val and (*it)->_write_re  );
-	  
-	  if (it != _queue->end())
-	    it++;
+	  PORT_WRITE(out_BYPASS_WRITE_GPR_VAL       [index], val and (*it)->_write_rd  );
+	  PORT_WRITE(out_BYPASS_WRITE_SPR_VAL       [index], val and (*it)->_write_re  );
 	}
     }
