/*
 * $Id: Parameters_msg_error.cpp 118 2009-05-20 22:01:32Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Types.h"
#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Parameters.h"
#include <sstream>

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::msg_error"
  Parameters_test Parameters::msg_error(void)
  {
    log_printf(FUNC,Write_queue,FUNCTION,"Begin");

    Parameters_test test (_type);

    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");

    return test;
  };

}; // 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              
