source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/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.5 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/Core_Glue/include/Parameters.h"
10#include <sstream>
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace core_glue {
16
17
18#undef  FUNCTION
19#define FUNCTION "Core_Glue::msg_error"
20  Parameters_test Parameters::msg_error(void)
21  {
22    log_begin(Core_Glue,FUNCTION);
23
24    Parameters_test test ("Core_Glue");
25
26    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
27      for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j)
28        if (_translate_ooo_engine_num_front_end [i][j] > _nb_front_end)
29          test.error(_("Translation in ooo_engine of front_end id is an invalid id.\n"));
30
31    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
32      for (uint32_t j=0; j<_ooo_engine_nb_execute_loop[i]; ++j)
33        if (_translate_ooo_engine_num_execute_loop [i][j] > _nb_execute_loop)
34          test.error(_("Translation in ooo_engine of execute_loop id is an invalid id.\n"));
35
36    for (uint32_t i=0; i<_nb_execute_loop; ++i)
37      for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j)
38        if (_translate_execute_loop_num_ooo_engine [i][j] > _nb_ooo_engine)
39          test.error(_("Translation in execute_loop of ooo_engine id is an invalid id.\n"));
40
41    for (uint32_t i=0; i<_nb_ooo_engine; ++i)
42      for (uint32_t j=0; j<_ooo_engine_nb_front_end[i]; ++j)
43        {
44          uint32_t num_front_end = _translate_ooo_engine_num_front_end [i][j];
45
46          if (_front_end_nb_inst_branch_complete [num_front_end] != _ooo_engine_nb_inst_branch_complete [i])
47            test.error(toString(_("front_end[%d].nb_inst_branch_complete must be equal at ooo_engine[%d].nb_inst_branch_complete.\n"),num_front_end,i));
48        }
49
50    for (uint32_t i=0; i<_nb_execute_loop; ++i)
51      for (uint32_t j=0; j<_execute_loop_nb_ooo_engine[i]; ++j)
52        {
53          Tcontext_t num_ooo_engine = _translate_execute_loop_num_ooo_engine [i][j];
54          for (uint32_t k=0; k<_ooo_engine_nb_execute_loop[num_ooo_engine]; ++k)
55            if (_translate_ooo_engine_num_execute_loop [num_ooo_engine][k] == i)
56              if (_nb_inst_execute[num_ooo_engine][k] != _nb_write_unit [i])
57            test.error(toString(_("ooo_engine[%d][%d].nb_inst_execute must be equal at execute_loop[%d].nb_write_unit.\n"),num_ooo_engine,k,i));
58        }
59    log_end(Core_Glue,FUNCTION);
60
61    return test;
62  };
63
64}; // end namespace core_glue
65}; // end namespace core
66
67}; // end namespace behavioural
68}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.