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/Reexecute_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 reexecute_unit { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Reexecute_unit::Parameters" |
---|
21 | Parameters::Parameters (uint32_t size_context_id , |
---|
22 | uint32_t size_front_end_id , |
---|
23 | uint32_t size_packet_id , |
---|
24 | uint32_t size_queue , |
---|
25 | uint32_t nb_execute_loop , |
---|
26 | uint32_t * nb_inst_execute , |
---|
27 | uint32_t nb_inst_commit , |
---|
28 | uint32_t nb_inst_reexecute , |
---|
29 | uint32_t nb_execute_loop_select , |
---|
30 | Tpriority_t priority_execute_loop , |
---|
31 | Tload_balancing_t load_balancing , |
---|
32 | uint32_t size_general_register_id, |
---|
33 | uint32_t size_special_register_id, |
---|
34 | uint32_t size_general_data , |
---|
35 | uint32_t size_special_data , |
---|
36 | uint32_t size_store_queue_ptr , |
---|
37 | uint32_t size_load_queue_ptr , |
---|
38 | bool is_toplevel) |
---|
39 | { |
---|
40 | log_begin(Reexecute_unit,FUNCTION); |
---|
41 | |
---|
42 | // _size_context_id = size_context_id ; |
---|
43 | // _size_front_end_id = size_front_end_id ; |
---|
44 | // _size_packet_id = size_packet_id ; |
---|
45 | _size_queue = size_queue ; |
---|
46 | _nb_execute_loop = nb_execute_loop ; |
---|
47 | _nb_inst_execute = nb_inst_execute ; |
---|
48 | _nb_inst_commit = nb_inst_commit ; |
---|
49 | _nb_inst_reexecute = nb_inst_reexecute ; |
---|
50 | _nb_execute_loop_select = nb_execute_loop_select ; |
---|
51 | _priority_execute_loop = priority_execute_loop ; |
---|
52 | _load_balancing = load_balancing ; |
---|
53 | // _size_general_register_id = size_general_register_id; |
---|
54 | // _size_special_register_id = size_special_register_id; |
---|
55 | // _size_general_data = size_general_data ; |
---|
56 | // _size_special_data = size_special_data ; |
---|
57 | // _size_store_queue_ptr = size_store_queue_ptr ; |
---|
58 | // _size_load_queue_ptr = size_load_queue_ptr ; |
---|
59 | |
---|
60 | _max_nb_inst_execute = max<uint32_t>(_nb_inst_execute, _nb_execute_loop); |
---|
61 | _nb_bank = _nb_inst_reexecute; |
---|
62 | _size_bank = _size_queue / _nb_bank; |
---|
63 | |
---|
64 | // _have_port_context_id = _size_context_id > 0; |
---|
65 | // _have_port_front_end_id = _size_front_end_id > 0; |
---|
66 | // _have_port_packet_id = _size_packet_id > 0; |
---|
67 | // _have_port_load_queue_ptr = _size_load_queue_ptr > 0; |
---|
68 | |
---|
69 | test(); |
---|
70 | |
---|
71 | if (is_toplevel) |
---|
72 | { |
---|
73 | _size_instruction_address = size_general_data-2 ; |
---|
74 | _size_context_id = size_context_id ; |
---|
75 | _size_front_end_id = size_front_end_id ; |
---|
76 | _size_rob_ptr = size_packet_id ; |
---|
77 | _size_general_register = size_general_register_id; |
---|
78 | _size_special_register = size_special_register_id; |
---|
79 | _size_general_data = size_general_data ; |
---|
80 | _size_special_data = size_special_data ; |
---|
81 | _size_store_queue_ptr = size_store_queue_ptr ; |
---|
82 | _size_load_queue_ptr = size_load_queue_ptr ; |
---|
83 | |
---|
84 | _have_port_context_id = _size_context_id > 0; |
---|
85 | _have_port_front_end_id = _size_front_end_id > 0; |
---|
86 | _have_port_rob_ptr = _size_rob_ptr > 0; |
---|
87 | _have_port_load_queue_ptr = _size_load_queue_ptr > 0; |
---|
88 | |
---|
89 | copy(); |
---|
90 | } |
---|
91 | |
---|
92 | log_end(Reexecute_unit,FUNCTION); |
---|
93 | }; |
---|
94 | |
---|
95 | // #undef FUNCTION |
---|
96 | // #define FUNCTION "Reexecute_unit::Parameters (copy)" |
---|
97 | // Parameters::Parameters (Parameters & param) |
---|
98 | // { |
---|
99 | // log_begin(Reexecute_unit,FUNCTION); |
---|
100 | // test(); |
---|
101 | // log_end(Reexecute_unit,FUNCTION); |
---|
102 | // }; |
---|
103 | |
---|
104 | #undef FUNCTION |
---|
105 | #define FUNCTION "Reexecute_unit::~Parameters" |
---|
106 | Parameters::~Parameters (void) |
---|
107 | { |
---|
108 | log_begin(Reexecute_unit,FUNCTION); |
---|
109 | log_end(Reexecute_unit,FUNCTION); |
---|
110 | }; |
---|
111 | |
---|
112 | #undef FUNCTION |
---|
113 | #define FUNCTION "Reexecute_unit::copy" |
---|
114 | void Parameters::copy (void) |
---|
115 | { |
---|
116 | log_begin(Reexecute_unit,FUNCTION); |
---|
117 | log_end(Reexecute_unit,FUNCTION); |
---|
118 | }; |
---|
119 | |
---|
120 | }; // end namespace reexecute_unit |
---|
121 | }; // end namespace ooo_engine |
---|
122 | }; // end namespace multi_ooo_engine |
---|
123 | }; // end namespace core |
---|
124 | |
---|
125 | }; // end namespace behavioural |
---|
126 | }; // end namespace morpheo |
---|