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/Rename_unit/Rename_unit_Glue/include/Parameters.h" |
---|
9 | #include "Common/include/Max.h" |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_ooo_engine { |
---|
14 | namespace ooo_engine { |
---|
15 | namespace rename_unit { |
---|
16 | namespace rename_unit_glue { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Rename_unit_Glue::Parameters" |
---|
21 | Parameters::Parameters (uint32_t nb_front_end , |
---|
22 | uint32_t * nb_context , |
---|
23 | // uint32_t size_front_end_id , |
---|
24 | // uint32_t size_context_id , |
---|
25 | uint32_t nb_inst_insert , |
---|
26 | uint32_t nb_inst_retire , |
---|
27 | uint32_t size_general_data , |
---|
28 | uint32_t size_special_register , |
---|
29 | bool is_toplevel |
---|
30 | ) |
---|
31 | { |
---|
32 | log_begin(Rename_unit_Glue,FUNCTION); |
---|
33 | |
---|
34 | _nb_front_end = nb_front_end ; |
---|
35 | _nb_context = nb_context ; |
---|
36 | _nb_inst_insert = nb_inst_insert; |
---|
37 | _nb_inst_retire = nb_inst_retire; |
---|
38 | |
---|
39 | test(); |
---|
40 | |
---|
41 | if (is_toplevel) |
---|
42 | { |
---|
43 | _size_general_data = size_general_data ; |
---|
44 | _size_special_register = size_special_register; |
---|
45 | |
---|
46 | _size_front_end_id = log2(_nb_front_end); |
---|
47 | _size_context_id = log2(max<uint32_t>(_nb_context,_nb_front_end)); |
---|
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 | log_end(Rename_unit_Glue,FUNCTION); |
---|
56 | }; |
---|
57 | |
---|
58 | // #undef FUNCTION |
---|
59 | // #define FUNCTION "Rename_unit_Glue::Parameters (copy)" |
---|
60 | // Parameters::Parameters (Parameters & param) |
---|
61 | // { |
---|
62 | // log_begin(Rename_unit_Glue,FUNCTION); |
---|
63 | // test(); |
---|
64 | // log_end(Rename_unit_Glue,FUNCTION); |
---|
65 | // }; |
---|
66 | |
---|
67 | #undef FUNCTION |
---|
68 | #define FUNCTION "Rename_unit_Glue::~Parameters" |
---|
69 | Parameters::~Parameters (void) |
---|
70 | { |
---|
71 | log_begin(Rename_unit_Glue,FUNCTION); |
---|
72 | log_end(Rename_unit_Glue,FUNCTION); |
---|
73 | }; |
---|
74 | |
---|
75 | #undef FUNCTION |
---|
76 | #define FUNCTION "Rename_unit_Glue::copy" |
---|
77 | void Parameters::copy (void) |
---|
78 | { |
---|
79 | log_begin(Rename_unit_Glue,FUNCTION); |
---|
80 | log_end(Rename_unit_Glue,FUNCTION); |
---|
81 | }; |
---|
82 | |
---|
83 | }; // end namespace rename_unit_glue |
---|
84 | }; // end namespace rename_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 |
---|