source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters_msg_error.cpp @ 88

Last change on this file since 88 was 88, checked in by rosiere, 15 years ago

Almost complete design
with Test and test platform

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1/*
2 * $Id: Parameters_msg_error.cpp 88 2008-12-10 18:31:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Types.h"
9#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Parameters.h"
10#include "Common/include/Max.h"
11#include <sstream>
12
13namespace morpheo                    {
14namespace behavioural {
15namespace core {
16namespace multi_front_end {
17namespace front_end {
18namespace decod_unit {
19namespace decod {
20
21
22#undef  FUNCTION
23#define FUNCTION "Decod::msg_error"
24  Parameters_test Parameters::msg_error(void)
25  {
26    log_printf(FUNC,Decod,FUNCTION,"Begin");
27   
28    Parameters_test test("Decod");
29
30    if (_nb_inst_decod == 0)
31      test.error(_("nb_inst_decod must be > 0.\n"));
32
33//  if ((_size_general_data != 32) and
34//      (_size_general_data != 64))
35//    test.error(_("size_general_data must be equal at 32 or 64 bits.\n"));
36
37//     if ((_nb_branch_speculated == 0) or
38//      (_nb_branch_speculated > _nb_context))
39//       test.error(_("nb_branch_speculated must be in [1:nb_context].\n"));
40
41    if ((_nb_context_select == 0) or
42        (_nb_context_select > _nb_context))
43      test.error(_("nb_context_select must be in [1:nb_context].\n"));
44
45    uint32_t sum_inst_fetch = 0;
46    for (uint32_t i=0; i<_nb_context_select; i++)
47      sum_inst_fetch += max<uint32_t>(_nb_inst_fetch,_nb_context,i+1);
48
49    if (sum_inst_fetch < _nb_inst_decod)
50      test.error(_("The sum of the _nb_context_select most nb_inst_fetch must be greater that _nb_inst_decod\n"));
51
52    if ((_priority != PRIORITY_ROUND_ROBIN))
53      test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str()));
54   
55    if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY))
56      test.error(toString(_("Unsupported load_balancing scheme. Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str()));
57
58    return test;
59
60    log_printf(FUNC,Decod,FUNCTION,"End");
61  };
62
63}; // end namespace decod
64}; // end namespace decod_unit
65}; // end namespace front_end
66}; // end namespace multi_front_end
67}; // end namespace core
68
69}; // end namespace behavioural
70}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.