1 | /* |
---|
2 | * $Id: Parameters.cpp 97 2008-12-19 15:34:00Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/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 rename_unit { |
---|
17 | namespace rename_select { |
---|
18 | |
---|
19 | |
---|
20 | #undef FUNCTION |
---|
21 | #define FUNCTION "Rename_select::Parameters" |
---|
22 | Parameters::Parameters (uint32_t nb_front_end , |
---|
23 | uint32_t * nb_context , |
---|
24 | // uint32_t size_front_end_id , |
---|
25 | // uint32_t size_context_id , |
---|
26 | uint32_t max_branch_speculated, |
---|
27 | uint32_t size_general_data , |
---|
28 | uint32_t nb_inst_rename , |
---|
29 | uint32_t * nb_inst_decod , |
---|
30 | uint32_t nb_front_end_select , |
---|
31 | Tpriority_t priority , |
---|
32 | Tload_balancing_t load_balancing , |
---|
33 | bool is_toplevel) |
---|
34 | { |
---|
35 | log_printf(FUNC,Rename_select,FUNCTION,"Begin"); |
---|
36 | |
---|
37 | _nb_front_end = nb_front_end ; |
---|
38 | _nb_context = nb_context ; |
---|
39 | _max_branch_speculated = max_branch_speculated; |
---|
40 | _nb_inst_rename = nb_inst_rename ; |
---|
41 | _nb_inst_decod = nb_inst_decod ; |
---|
42 | _nb_front_end_select = nb_front_end_select ; |
---|
43 | _priority = priority ; |
---|
44 | _load_balancing = load_balancing ; |
---|
45 | |
---|
46 | _max_nb_inst_decod = max<uint32_t>(nb_inst_decod,nb_front_end); |
---|
47 | |
---|
48 | test(); |
---|
49 | |
---|
50 | if (is_toplevel) |
---|
51 | { |
---|
52 | _size_instruction_address = size_general_data-2; |
---|
53 | _size_general_data = size_general_data ; |
---|
54 | _size_depth = log2(max_branch_speculated); |
---|
55 | _size_front_end_id = log2(_nb_front_end); |
---|
56 | _size_context_id = log2(max<uint32_t>(_nb_context,_nb_front_end)); |
---|
57 | |
---|
58 | _have_port_front_end_id = _size_front_end_id > 0; |
---|
59 | _have_port_context_id = _size_context_id > 0; |
---|
60 | _have_port_depth = _size_depth > 0; |
---|
61 | |
---|
62 | copy(); |
---|
63 | } |
---|
64 | |
---|
65 | log_printf(FUNC,Rename_select,FUNCTION,"End"); |
---|
66 | }; |
---|
67 | |
---|
68 | // #undef FUNCTION |
---|
69 | // #define FUNCTION "Rename_select::Parameters (copy)" |
---|
70 | // Parameters::Parameters (Parameters & param) |
---|
71 | // { |
---|
72 | // log_printf(FUNC,Rename_select,FUNCTION,"Begin"); |
---|
73 | // test(); |
---|
74 | // log_printf(FUNC,Rename_select,FUNCTION,"End"); |
---|
75 | // }; |
---|
76 | |
---|
77 | #undef FUNCTION |
---|
78 | #define FUNCTION "Rename_select::~Parameters" |
---|
79 | Parameters::~Parameters () |
---|
80 | { |
---|
81 | log_printf(FUNC,Rename_select,FUNCTION,"Begin"); |
---|
82 | log_printf(FUNC,Rename_select,FUNCTION,"End"); |
---|
83 | }; |
---|
84 | |
---|
85 | #undef FUNCTION |
---|
86 | #define FUNCTION "Rename_select::copy" |
---|
87 | void Parameters::copy (void) |
---|
88 | { |
---|
89 | log_printf(FUNC,Rename_select,FUNCTION,"Begin"); |
---|
90 | log_printf(FUNC,Rename_select,FUNCTION,"End"); |
---|
91 | }; |
---|
92 | |
---|
93 | }; // end namespace rename_select |
---|
94 | }; // end namespace rename_unit |
---|
95 | }; // end namespace ooo_engine |
---|
96 | }; // end namespace multi_ooo_engine |
---|
97 | }; // end namespace core |
---|
98 | |
---|
99 | }; // end namespace behavioural |
---|
100 | }; // end namespace morpheo |
---|