source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/src/Parameters_msg_error.cpp @ 117

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

1) Platforms : add new organization for test
2) Load_Store_Unit : add array to count nb_check in store_queue
3) Issue_queue and Core_Glue : rewrite the issue network
4) Special_Register_Unit : add reset value to register CID
5) Softwares : add multicontext test
6) Softwares : add SPECINT
7) Softwares : add MiBench?
7) Read_queue : inhib access for r0
8) Change Core_Glue (network) - dont yet support priority and load balancing scheme

  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1/*
2 * $Id: Parameters_msg_error.cpp 117 2009-05-16 14:42:39Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Types.h"
9#include "Behavioural/Core/Icache_Access/include/Parameters.h"
10#include <sstream>
11
12namespace morpheo                    {
13namespace behavioural {
14namespace core {
15namespace icache_access {
16
17
18#undef  FUNCTION
19#define FUNCTION "Icache_Access::msg_error"
20  Parameters_test Parameters::msg_error(void)
21  {
22    log_begin(Icache_Access,FUNCTION);
23
24    Parameters_test test ("Icache_Access");
25
26    bool have_link [_nb_icache_port];
27    for (uint32_t i=0; i<_nb_icache_port; i++)
28      have_link [i] = 0;
29
30    for (uint32_t i=0; i<_nb_front_end; i++)
31      for (uint32_t j=0; j<_nb_context [i]; j++)
32        if (_table_routing [i][j] >= _nb_icache_port)
33          test.error(toString(_("table_routing [%d][%d] : invalid value, must be < nb_icache_port.\n"),i,j));
34        else
35          have_link [_table_routing [i][j]] = true;
36
37    for (uint32_t i=0; i<_nb_icache_port; i++)
38      if (not have_link [i])
39        test.error(toString(_("Port[%d] is not linked.\n"),i));
40
41    bool thread_link [_nb_thread];
42    for (uint32_t i=0; i<_nb_thread; ++i)
43      thread_link [i] = false;
44   
45    for (uint32_t i=0; i<_nb_front_end; i++)
46      {
47        for (uint32_t j=0; j<_nb_context [i]; j++)
48          {
49            uint32_t num_thread = _translate_context_to_thread [i][j];
50
51            if (num_thread >= _nb_thread)
52              test.error(toString(_("Context [%d][%d] is linked with an invalid thread id.\n"),i,j));
53            else
54              if (thread_link [num_thread] == true)
55                test.error(toString(_("Context [%d][%d] is linked with an already used thread id.\n"),i,j));
56              else
57                thread_link [num_thread] = true;
58          }
59      }
60
61    for (uint32_t i=0; i<_nb_thread; ++i)
62      if (not thread_link [i])
63        test.error(toString(_("Thread [%d] is not linked.\n"),i));
64
65    log_end(Icache_Access,FUNCTION);
66
67    return test;
68  };
69
70}; // end namespace icache_access
71}; // end namespace core
72
73}; // end namespace behavioural
74}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.