1 | /* |
---|
2 | * $Id: Parameters.cpp 88 2008-12-10 18:31: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 | bool is_toplevel |
---|
26 | ) |
---|
27 | { |
---|
28 | log_begin(Special_Register_unit,FUNCTION); |
---|
29 | |
---|
30 | _nb_front_end = nb_front_end ; |
---|
31 | _nb_context = nb_context ; |
---|
32 | _nb_inst_reexecute = nb_inst_reexecute; |
---|
33 | _implement_group = implement_group ; |
---|
34 | |
---|
35 | _max_nb_context = max<uint32_t>(_nb_context,_nb_front_end); |
---|
36 | // _size_front_end_id = log2(_nb_front_end); |
---|
37 | // _size_context_id = log2(_max_nb_context ); |
---|
38 | // |
---|
39 | // _have_port_front_end_id = _size_front_end_id > 0; |
---|
40 | // _have_port_context_id = _size_context_id > 0; |
---|
41 | |
---|
42 | test(); |
---|
43 | |
---|
44 | if (is_toplevel) |
---|
45 | { |
---|
46 | _size_front_end_id = log2(_nb_front_end); |
---|
47 | _size_context_id = log2(_max_nb_context ); |
---|
48 | |
---|
49 | _have_port_front_end_id = _size_front_end_id > 0; |
---|
50 | _have_port_context_id = _size_context_id > 0; |
---|
51 | |
---|
52 | copy(); |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | log_end(Special_Register_unit,FUNCTION); |
---|
57 | }; |
---|
58 | |
---|
59 | // #undef FUNCTION |
---|
60 | // #define FUNCTION "Special_Register_unit::Parameters (copy)" |
---|
61 | // Parameters::Parameters (Parameters & param) |
---|
62 | // { |
---|
63 | // log_begin(Special_Register_unit,FUNCTION); |
---|
64 | // test(); |
---|
65 | // log_end(Special_Register_unit,FUNCTION); |
---|
66 | // }; |
---|
67 | |
---|
68 | #undef FUNCTION |
---|
69 | #define FUNCTION "Special_Register_unit::~Parameters" |
---|
70 | Parameters::~Parameters (void) |
---|
71 | { |
---|
72 | log_begin(Special_Register_unit,FUNCTION); |
---|
73 | log_end(Special_Register_unit,FUNCTION); |
---|
74 | }; |
---|
75 | |
---|
76 | #undef FUNCTION |
---|
77 | #define FUNCTION "Special_Register_unit::copy" |
---|
78 | void Parameters::copy (void) |
---|
79 | { |
---|
80 | log_begin(Special_Register_unit,FUNCTION); |
---|
81 | log_end(Special_Register_unit,FUNCTION); |
---|
82 | }; |
---|
83 | |
---|
84 | }; // end namespace special_register_unit |
---|
85 | }; // end namespace ooo_engine |
---|
86 | }; // end namespace multi_ooo_engine |
---|
87 | }; // end namespace core |
---|
88 | |
---|
89 | }; // end namespace behavioural |
---|
90 | }; // end namespace morpheo |
---|