/* * $Id: Parameters_msg_error.cpp 88 2008-12-10 18:31:39Z rosiere $ * * [ Description ] * */ #include "Behavioural/include/Types.h" #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Parameters.h" #include namespace morpheo { namespace behavioural { namespace core { namespace multi_ooo_engine { namespace ooo_engine { namespace issue_queue { #undef FUNCTION #define FUNCTION "Issue_queue::msg_error" Parameters_test Parameters::msg_error(void) { log_begin(Issue_queue,FUNCTION); Parameters_test test ("Issue_queue"); if (not is_multiple(_size_queue, _nb_bank)) test.error(toString(_("nb_bank must be a multiple of size_queue.\n"))); if (not is_multiple(_nb_bank, _nb_inst_issue)) test.error(toString(_("nb_inst_issue must be a multiple of nb_bank.\n"))); if (_nb_rename_unit_select > _nb_rename_unit) test.error(toString(_("nb_rename_unit_select must be <= nb_rename_unit.\n"))); if (_size_bank == 1) test.warning(_("For better performance, the bank's size (size_queue/nb_bank) must be > 1.\n")); bool type_valid [_nb_type]; for (uint32_t i=0; i<_nb_type; i++) type_valid [i] = false; type_valid [TYPE_ALU ] = true; type_valid [TYPE_SHIFT ] = true; type_valid [TYPE_MOVE ] = true; type_valid [TYPE_TEST ] = true; type_valid [TYPE_MUL ] = true; type_valid [TYPE_DIV ] = true; type_valid [TYPE_EXTEND ] = true; type_valid [TYPE_FIND ] = true; type_valid [TYPE_SPECIAL] = true; type_valid [TYPE_CUSTOM ] = true; type_valid [TYPE_BRANCH ] = true; type_valid [TYPE_MEMORY ] = true; for (uint32_t i=0; i<_nb_rename_unit; i++) { bool type_present [_nb_type]; for (uint32_t j=0; j<_nb_type; j++) type_present [j] = not type_valid [j]; bool find = false; for (uint32_t j=0; j<_nb_inst_issue; j++) if (_table_routing [i][j]) { find = true; for (uint32_t k=0; k<_nb_type; k++) type_present [k] |= _table_issue_type [j][k]; } if (not find) test.error(toString(_("Rename_unit [%d] is not connected with a issue slot.\n"),i)); else for (uint32_t j=0; j<_nb_type; j++) if (not type_present [j]) test.error(toString(_("Rename_unit [%d] can't issue instruction's type \"%s\".\n"),i,toString_type(j).c_str())); } if ((_priority != PRIORITY_ROUND_ROBIN)) test.error(toString(_("Unsupported priority scheme (Coming Soon). Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str())); if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)) test.error(toString(_("Unsupported load_balancing scheme (Coming Soon). Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str())); log_end(Issue_queue,FUNCTION); return test; }; }; // end namespace issue_queue }; // end namespace ooo_engine }; // end namespace multi_ooo_engine }; // end namespace core }; // end namespace behavioural }; // end namespace morpheo