1 | /* |
---|
2 | * $Id$ |
---|
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 | for (uint32_t i=0; i<_nb_execute_unit; i++) |
---|
30 | { |
---|
31 | uint32_t j; |
---|
32 | for (j=0; j<_nb_write_unit; j++) |
---|
33 | if (_table_routing [i][j] == true) |
---|
34 | break; |
---|
35 | |
---|
36 | if (j == _nb_write_unit) |
---|
37 | test.error("The execute_unit ["+toString(i)+"] is link with none write_unit."); |
---|
38 | } |
---|
39 | |
---|
40 | for (uint32_t i=0; i<_nb_write_unit; i++) |
---|
41 | { |
---|
42 | uint32_t j; |
---|
43 | for (j=0; j<_nb_thread; j++) |
---|
44 | if (_table_thread [i][j] == true) |
---|
45 | break; |
---|
46 | |
---|
47 | if (j == _nb_thread) |
---|
48 | test.error("The write_unit ["+toString(i)+"] have none source's thread."); |
---|
49 | } |
---|
50 | |
---|
51 | if ( (_priority != PRIORITY_STATIC ) and |
---|
52 | (_priority != PRIORITY_ROUND_ROBIN)) |
---|
53 | test.error("Unsupported priority scheme. It must be Static or Round Robin."); |
---|
54 | |
---|
55 | log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End"); |
---|
56 | |
---|
57 | return test; |
---|
58 | }; |
---|
59 | |
---|
60 | }; // end namespace execution_unit_to_write_unit |
---|
61 | }; // end namespace network |
---|
62 | }; // end namespace execute_loop |
---|
63 | }; // end namespace multi_execute_loop |
---|
64 | }; // end namespace core |
---|
65 | |
---|
66 | }; // end namespace behavioural |
---|
67 | }; // end namespace morpheo |
---|