/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h"
#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h"
#include <sstream>
using namespace std;

namespace morpheo                    {
namespace behavioural {
namespace generic {
namespace registerfile {
namespace registerfile_multi_banked {


  string Parameters::msg_error(void)
  {
    log_printf(FUNC,RegisterFile_Multi_Banked,"msg_error","Begin");

    string msg = "";

    if (_nb_port_read < _nb_port_read_by_bank)
      {
        msg += "  - Each bank read's port must be higher at number of read port\n";
        msg += "    * nb_port_read                    : " + toString(_nb_port_read        ) + "\n";
        msg += "    * nb_port_read_by_bank            : " + toString(_nb_port_read_by_bank) + "\n";
      }

    if (_nb_port_write < _nb_port_write_by_bank)
      {
        msg += "  - Each bank write's port must be higher at number of write port\n";
        msg += "    * nb_port_write                   : " + toString(_nb_port_write        ) + "\n";
        msg += "    * nb_port_write_by_bank           : " + toString(_nb_port_write_by_bank) + "\n";
      }
    
    if (_nb_bank < 1)
      {
        msg += "  - nb_bank must be higher at 1\n";
        msg += "    * nb_bank                         : " + toString(_nb_bank             ) + "\n";
      }

    return msg;

    log_printf(FUNC,RegisterFile_Multi_Banked,"msg_error","End");
  };

}; // end namespace registerfile_multi_banked
}; // end namespace registerfile
}; // end namespace generic

}; // end namespace behavioural
}; // end namespace morpheo              
