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_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h" |
---|
10 | #include <sstream> |
---|
11 | |
---|
12 | namespace morpheo { |
---|
13 | namespace behavioural { |
---|
14 | namespace core { |
---|
15 | namespace multi_execute_loop { |
---|
16 | namespace execute_loop { |
---|
17 | namespace network { |
---|
18 | namespace execution_unit_to_write_unit { |
---|
19 | |
---|
20 | |
---|
21 | #undef FUNCTION |
---|
22 | #define FUNCTION "Execution_unit_to_Write_unit::msg_error" |
---|
23 | Parameters_test Parameters::msg_error(void) |
---|
24 | { |
---|
25 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin"); |
---|
26 | |
---|
27 | Parameters_test test("Execution_unit_to_Write_unit"); |
---|
28 | |
---|
29 | bool is_link [_nb_execute_unit][_max_nb_execute_unit_port]; |
---|
30 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
31 | for (uint32_t j=0; j<_nb_execute_unit_port[i]; j++) |
---|
32 | is_link[i][j] = false; |
---|
33 | |
---|
34 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
35 | for (uint32_t j=0; j<_nb_execute_unit_port[i]; j++) |
---|
36 | for (uint32_t k=0; k<_nb_write_unit; k++) |
---|
37 | { |
---|
38 | log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"[%d][%d][%d]",i,j,k); |
---|
39 | |
---|
40 | if (_table_routing [i][j][k] == true) |
---|
41 | { |
---|
42 | log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION," * is link"); |
---|
43 | |
---|
44 | is_link [i][j] = true; |
---|
45 | break; |
---|
46 | } |
---|
47 | } |
---|
48 | |
---|
49 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
50 | for (uint32_t j=0; j<_nb_execute_unit_port[i]; j++) |
---|
51 | if (not is_link[i][j]) |
---|
52 | test.error(toString(_("The execute_unit [%d][%d] is link with none write_unit.\n"),i,j)); |
---|
53 | |
---|
54 | for (uint32_t i=0; i<_nb_write_unit; i++) |
---|
55 | { |
---|
56 | uint32_t j; |
---|
57 | for (j=0; j<_nb_thread; j++) |
---|
58 | if (_table_thread [i][j] == true) |
---|
59 | break; |
---|
60 | |
---|
61 | if (j == _nb_thread) |
---|
62 | test.error(toString(_("The write_unit [%d] have none source's thread.\n"),i)); |
---|
63 | } |
---|
64 | |
---|
65 | if ( (_priority != PRIORITY_STATIC ) and |
---|
66 | (_priority != PRIORITY_ROUND_ROBIN)) |
---|
67 | test.error(_("Unsupported priority scheme. It must be Static or Round Robin.\n")); |
---|
68 | |
---|
69 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End"); |
---|
70 | |
---|
71 | return test; |
---|
72 | }; |
---|
73 | |
---|
74 | }; // end namespace execution_unit_to_write_unit |
---|
75 | }; // end namespace network |
---|
76 | }; // end namespace execute_loop |
---|
77 | }; // end namespace multi_execute_loop |
---|
78 | }; // end namespace core |
---|
79 | |
---|
80 | }; // end namespace behavioural |
---|
81 | }; // end namespace morpheo |
---|