1 | /* |
---|
2 | * $Id: Parameters.cpp 117 2009-05-16 14:42:39Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/include/Parameters.h" |
---|
9 | #include "Common/include/Max.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_ooo_engine { |
---|
15 | namespace ooo_engine { |
---|
16 | namespace special_register_unit { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Special_Register_unit::Parameters" |
---|
21 | Parameters::Parameters (uint32_t nb_front_end , |
---|
22 | uint32_t * nb_context , |
---|
23 | uint32_t nb_inst_reexecute , |
---|
24 | bool *** implement_group , |
---|
25 | uint32_t ** translate_num_context_to_num_thread, //[nb_front_end][nb_context] |
---|
26 | bool is_toplevel |
---|
27 | ) |
---|
28 | { |
---|
29 | log_begin(Special_Register_unit,FUNCTION); |
---|
30 | |
---|
31 | _nb_front_end = nb_front_end ; |
---|
32 | _nb_context = nb_context ; |
---|
33 | _nb_inst_reexecute = nb_inst_reexecute; |
---|
34 | _implement_group = implement_group ; |
---|
35 | _translate_num_context_to_num_thread = translate_num_context_to_num_thread; |
---|
36 | |
---|
37 | _max_nb_context = max<uint32_t>(_nb_context,_nb_front_end); |
---|
38 | // _size_front_end_id = log2(_nb_front_end); |
---|
39 | // _size_context_id = log2(_max_nb_context ); |
---|
40 | // |
---|
41 | // _have_port_front_end_id = _size_front_end_id > 0; |
---|
42 | // _have_port_context_id = _size_context_id > 0; |
---|
43 | |
---|
44 | test(); |
---|
45 | |
---|
46 | if (is_toplevel) |
---|
47 | { |
---|
48 | _size_front_end_id = log2(_nb_front_end); |
---|
49 | _size_context_id = log2(_max_nb_context ); |
---|
50 | |
---|
51 | _have_port_front_end_id = _size_front_end_id > 0; |
---|
52 | _have_port_context_id = _size_context_id > 0; |
---|
53 | |
---|
54 | copy(); |
---|
55 | } |
---|
56 | |
---|
57 | |
---|
58 | log_end(Special_Register_unit,FUNCTION); |
---|
59 | }; |
---|
60 | |
---|
61 | // #undef FUNCTION |
---|
62 | // #define FUNCTION "Special_Register_unit::Parameters (copy)" |
---|
63 | // Parameters::Parameters (Parameters & param) |
---|
64 | // { |
---|
65 | // log_begin(Special_Register_unit,FUNCTION); |
---|
66 | // test(); |
---|
67 | // log_end(Special_Register_unit,FUNCTION); |
---|
68 | // }; |
---|
69 | |
---|
70 | #undef FUNCTION |
---|
71 | #define FUNCTION "Special_Register_unit::~Parameters" |
---|
72 | Parameters::~Parameters (void) |
---|
73 | { |
---|
74 | log_begin(Special_Register_unit,FUNCTION); |
---|
75 | log_end(Special_Register_unit,FUNCTION); |
---|
76 | }; |
---|
77 | |
---|
78 | #undef FUNCTION |
---|
79 | #define FUNCTION "Special_Register_unit::copy" |
---|
80 | void Parameters::copy (void) |
---|
81 | { |
---|
82 | log_begin(Special_Register_unit,FUNCTION); |
---|
83 | log_end(Special_Register_unit,FUNCTION); |
---|
84 | }; |
---|
85 | |
---|
86 | }; // end namespace special_register_unit |
---|
87 | }; // end namespace ooo_engine |
---|
88 | }; // end namespace multi_ooo_engine |
---|
89 | }; // end namespace core |
---|
90 | |
---|
91 | }; // end namespace behavioural |
---|
92 | }; // end namespace morpheo |
---|