/*
 * $Id: Parameters_msg_error.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include <stdint.h>
#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h"
#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h"
#include <sstream>

namespace morpheo                    {
namespace behavioural                {
namespace generic                    {
namespace registerfile               {
namespace registerfile_monolithic    {

  Parameters_test Parameters::msg_error(void)
  {
    Parameters_test test("RegisterFile_Monolithic");

    if ((8*sizeof(Tdata_t)) < _size_word)
      test.error("Type \"Tdata_t\" is too little to the size defined by size_word");

    if ((8*sizeof(Taddress_t)) < log2(_nb_word))
      test.error("type \"Taddress_t\" is too little to the size defined by nb_word");

    if ((_nb_port_read + _nb_port_read_write) < 1)
      test.error("you need a read port");

    if ((_nb_port_write + _nb_port_read_write) < 1)
      test.error("you need a write port");

    return test;
  };

}; // end namespace registerfile_monolithic
}; // end namespace registerfile 
}; // end namespace generic
}; // end namespace behavioural          
}; // end namespace morpheo              
