source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters_msg_error.cpp @ 123

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

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1/*
2 * $Id: Parameters_msg_error.cpp 123 2009-06-08 20:43:30Z rosiere $
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Types.h"
9#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h"
10#include <sstream>
11#include <set>
12
13namespace morpheo                    {
14namespace behavioural {
15namespace core {
16namespace multi_execute_loop {
17namespace execute_loop {
18
19
20#undef  FUNCTION
21#define FUNCTION "Execute_loop::msg_error"
22  Parameters_test Parameters::msg_error(void)
23  {
24    log_printf(FUNC,Execute_loop,FUNCTION,"Begin");
25
26    Parameters_test test ("Execute_loop");
27
28    for (uint32_t i=0; i<_nb_functionnal_unit; i++)
29      if (_nb_inst_functionnal_unit [i] != 1)
30        test.error(toString(_("Functionnal_unit [%d] must treat once instruction.\n"),i));
31
32    std::set<uint32_t> link_load_store_unit_and_write_unit [_nb_load_store_unit];
33    for (uint32_t i=0; i<_nb_load_store_unit; ++i)
34      link_load_store_unit_and_write_unit[i].clear();
35
36    for (uint32_t i=0; i<_nb_execute_unit; i++)
37      if (_is_load_store_unit [i])
38        {
39          uint32_t lsq = _translate_num_execute_unit[i];
40
41          for (uint32_t j=0; j<_nb_execute_unit_port[i]; j++)
42            for (uint32_t k=0; k<_nb_write_unit; k++)
43              if (_execution_unit_to_write_unit_table_routing [i][j][k])
44                {
45                  if (link_load_store_unit_and_write_unit[lsq].find(k) != link_load_store_unit_and_write_unit[lsq].end())
46                    {
47                      if (link_load_store_unit_and_write_unit[lsq].size() != 0)
48                        test.error(toString(_("Can't connect Load Store Unit [%d] (port %d) with Write unit [%d], because it's already connected with Write unit [%d]"),lsq,j,k,*(link_load_store_unit_and_write_unit[lsq].begin())));
49
50                      link_load_store_unit_and_write_unit[lsq].insert(link_load_store_unit_and_write_unit[lsq].end(),k);
51                    }
52                }
53        }
54    log_printf(FUNC,Execute_loop,FUNCTION,"End");
55
56    return test;
57  };
58
59}; // end namespace execute_loop
60}; // end namespace multi_execute_loop
61}; // end namespace core
62
63}; // end namespace behavioural
64}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.