1 | /* |
---|
2 | * $Id$ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_execute_loop { |
---|
14 | namespace execute_loop { |
---|
15 | namespace register_unit { |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Register_unit::allocation" |
---|
21 | void Register_unit::allocation ( |
---|
22 | #ifdef STATISTICS |
---|
23 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
24 | #else |
---|
25 | void |
---|
26 | #endif |
---|
27 | ) |
---|
28 | { |
---|
29 | log_printf(FUNC,Register_unit,FUNCTION,"Begin"); |
---|
30 | |
---|
31 | _component = new Component (); |
---|
32 | |
---|
33 | Entity * entity = _component->set_entity (_name |
---|
34 | ,"Register_unit" |
---|
35 | #ifdef POSITION |
---|
36 | ,COMBINATORY |
---|
37 | #endif |
---|
38 | ); |
---|
39 | |
---|
40 | _interfaces = entity->set_interfaces(); |
---|
41 | |
---|
42 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
43 | |
---|
44 | Interface * interface = _interfaces->set_interface("" |
---|
45 | #ifdef POSITION |
---|
46 | ,IN |
---|
47 | ,SOUTH, |
---|
48 | "Generalist interface" |
---|
49 | #endif |
---|
50 | ); |
---|
51 | |
---|
52 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
53 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
54 | |
---|
55 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
56 | in_GPR_READ_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_gpr_read]; |
---|
57 | out_GPR_READ_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_gpr_read]; |
---|
58 | if (_param->_have_port_ooo_engine_id == true) |
---|
59 | in_GPR_READ_OOO_ENGINE_ID = new SC_IN (Tcontext_t ) * [_param->_nb_gpr_read]; |
---|
60 | in_GPR_READ_NUM_REG = new SC_IN (Tgeneral_address_t) * [_param->_nb_gpr_read]; |
---|
61 | out_GPR_READ_DATA = new SC_OUT(Tgeneral_data_t ) * [_param->_nb_gpr_read]; |
---|
62 | out_GPR_READ_DATA_VAL = new SC_OUT(Tcontrol_t ) * [_param->_nb_gpr_read]; |
---|
63 | |
---|
64 | for (uint32_t i=0; i<_param->_nb_gpr_read; i++) |
---|
65 | { |
---|
66 | Interface_fifo * interface = _interfaces->set_interface("gpr_read_"+toString(i) |
---|
67 | #ifdef POSITION |
---|
68 | ,IN |
---|
69 | ,NORTH |
---|
70 | ,"Interface to read the register file" |
---|
71 | #endif |
---|
72 | ); |
---|
73 | |
---|
74 | in_GPR_READ_VAL [i]= interface->set_signal_valack_in (VAL); |
---|
75 | out_GPR_READ_ACK [i]= interface->set_signal_valack_out (ACK); |
---|
76 | if (_param->_have_port_ooo_engine_id == true) |
---|
77 | in_GPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); |
---|
78 | in_GPR_READ_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , _param->_size_gpr_address); |
---|
79 | out_GPR_READ_DATA [i]= interface->set_signal_out<Tgeneral_data_t > ("data" , _param->_size_general_data); |
---|
80 | out_GPR_READ_DATA_VAL [i]= interface->set_signal_out<Tcontrol_t > ("data_val" , 1); |
---|
81 | } |
---|
82 | |
---|
83 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
84 | in_GPR_WRITE_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_gpr_write]; |
---|
85 | out_GPR_WRITE_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_gpr_write]; |
---|
86 | if (_param->_have_port_ooo_engine_id == true) |
---|
87 | in_GPR_WRITE_OOO_ENGINE_ID = new SC_IN (Tcontext_t ) * [_param->_nb_gpr_write]; |
---|
88 | in_GPR_WRITE_NUM_REG = new SC_IN (Tgeneral_address_t) * [_param->_nb_gpr_write]; |
---|
89 | in_GPR_WRITE_DATA = new SC_IN (Tgeneral_data_t ) * [_param->_nb_gpr_write]; |
---|
90 | |
---|
91 | for (uint32_t i=0; i<_param->_nb_gpr_write; i++) |
---|
92 | { |
---|
93 | Interface_fifo * interface = _interfaces->set_interface("gpr_write_"+toString(i) |
---|
94 | #ifdef POSITION |
---|
95 | ,IN |
---|
96 | ,NORTH, |
---|
97 | "Interface to write the register file" |
---|
98 | #endif |
---|
99 | ); |
---|
100 | |
---|
101 | in_GPR_WRITE_VAL [i]= interface->set_signal_valack_in (VAL); |
---|
102 | out_GPR_WRITE_ACK [i]= interface->set_signal_valack_out (ACK); |
---|
103 | if (_param->_have_port_ooo_engine_id == true) |
---|
104 | in_GPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); |
---|
105 | in_GPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg" , _param->_size_gpr_address); |
---|
106 | in_GPR_WRITE_DATA [i]= interface->set_signal_in <Tgeneral_data_t > ("data" , _param->_size_general_data); |
---|
107 | } |
---|
108 | |
---|
109 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
110 | in_SPR_READ_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_spr_read]; |
---|
111 | out_SPR_READ_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_spr_read]; |
---|
112 | if (_param->_have_port_ooo_engine_id == true) |
---|
113 | in_SPR_READ_OOO_ENGINE_ID = new SC_IN (Tcontext_t ) * [_param->_nb_spr_read]; |
---|
114 | in_SPR_READ_NUM_REG = new SC_IN (Tspecial_address_t) * [_param->_nb_spr_read]; |
---|
115 | out_SPR_READ_DATA = new SC_OUT(Tspecial_data_t ) * [_param->_nb_spr_read]; |
---|
116 | out_SPR_READ_DATA_VAL = new SC_OUT(Tcontrol_t ) * [_param->_nb_spr_read]; |
---|
117 | |
---|
118 | for (uint32_t i=0; i<_param->_nb_spr_read; i++) |
---|
119 | { |
---|
120 | Interface_fifo * interface = _interfaces->set_interface("spr_read_"+toString(i) |
---|
121 | #ifdef POSITION |
---|
122 | ,IN |
---|
123 | ,NORTH, |
---|
124 | "Interface to read the register file" |
---|
125 | #endif |
---|
126 | ); |
---|
127 | |
---|
128 | in_SPR_READ_VAL [i]= interface->set_signal_valack_in (VAL); |
---|
129 | out_SPR_READ_ACK [i]= interface->set_signal_valack_out (ACK); |
---|
130 | if (_param->_have_port_ooo_engine_id == true) |
---|
131 | in_SPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); |
---|
132 | in_SPR_READ_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , _param->_size_spr_address); |
---|
133 | out_SPR_READ_DATA [i]= interface->set_signal_out<Tspecial_data_t > ("data" , _param->_size_special_data); |
---|
134 | out_SPR_READ_DATA_VAL [i]= interface->set_signal_out<Tcontrol_t > ("data_val" , 1); |
---|
135 | } |
---|
136 | |
---|
137 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
138 | in_SPR_WRITE_VAL = new SC_IN (Tcontrol_t ) * [_param->_nb_spr_write]; |
---|
139 | out_SPR_WRITE_ACK = new SC_OUT(Tcontrol_t ) * [_param->_nb_spr_write]; |
---|
140 | if (_param->_have_port_ooo_engine_id == true) |
---|
141 | in_SPR_WRITE_OOO_ENGINE_ID = new SC_IN (Tcontext_t ) * [_param->_nb_spr_write]; |
---|
142 | in_SPR_WRITE_NUM_REG = new SC_IN (Tspecial_address_t) * [_param->_nb_spr_write]; |
---|
143 | in_SPR_WRITE_DATA = new SC_IN (Tspecial_data_t ) * [_param->_nb_spr_write]; |
---|
144 | |
---|
145 | for (uint32_t i=0; i<_param->_nb_spr_write; i++) |
---|
146 | { |
---|
147 | Interface_fifo * interface = _interfaces->set_interface("spr_write_"+toString(i) |
---|
148 | #ifdef POSITION |
---|
149 | ,IN |
---|
150 | ,NORTH, |
---|
151 | "Interface to write the register file" |
---|
152 | #endif |
---|
153 | ); |
---|
154 | |
---|
155 | in_SPR_WRITE_VAL [i]= interface->set_signal_valack_in (VAL); |
---|
156 | out_SPR_WRITE_ACK [i]= interface->set_signal_valack_out (ACK); |
---|
157 | if (_param->_have_port_ooo_engine_id == true) |
---|
158 | in_SPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t > ("ooo_engine_id" , log2(_param->_nb_ooo_engine)); |
---|
159 | in_SPR_WRITE_NUM_REG [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg" , _param->_size_spr_address); |
---|
160 | in_SPR_WRITE_DATA [i]= interface->set_signal_in <Tspecial_data_t > ("data" , _param->_size_special_data); |
---|
161 | } |
---|
162 | |
---|
163 | // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
164 | in_INSERT_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
165 | out_INSERT_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
166 | in_INSERT_ROB_RD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
167 | in_INSERT_ROB_RD_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
168 | in_INSERT_ROB_RE_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
169 | in_INSERT_ROB_RE_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
170 | |
---|
171 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
172 | { |
---|
173 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
174 | |
---|
175 | in_INSERT_ROB_VAL [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
176 | out_INSERT_ROB_ACK [i] = new SC_OUT(Tcontrol_t ) * [x]; |
---|
177 | in_INSERT_ROB_RD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
178 | in_INSERT_ROB_RD_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
179 | in_INSERT_ROB_RE_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
180 | in_INSERT_ROB_RE_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
181 | |
---|
182 | for (uint32_t j=0; j<x; j++) |
---|
183 | { |
---|
184 | Interface_fifo * interface = _interfaces->set_interface("insert_rob_"+toString(i)+"_"+toString(j) |
---|
185 | #ifdef POSITION |
---|
186 | ,IN |
---|
187 | ,WEST |
---|
188 | ,"Interface to update status (insert)" |
---|
189 | #endif |
---|
190 | ); |
---|
191 | |
---|
192 | |
---|
193 | in_INSERT_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); |
---|
194 | out_INSERT_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); |
---|
195 | in_INSERT_ROB_RD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_use" , 1); |
---|
196 | in_INSERT_ROB_RD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_num_reg", _param->_size_gpr_address); |
---|
197 | in_INSERT_ROB_RE_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_use" , 1); |
---|
198 | in_INSERT_ROB_RE_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_num_reg", _param->_size_spr_address); |
---|
199 | |
---|
200 | } |
---|
201 | } |
---|
202 | |
---|
203 | // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
204 | in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
205 | out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
206 | in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
207 | in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
208 | in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
209 | in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
210 | in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
211 | in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
212 | in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
213 | in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
214 | |
---|
215 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
216 | { |
---|
217 | uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
218 | |
---|
219 | in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
220 | out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t ) * [x]; |
---|
221 | in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
222 | in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
223 | in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
224 | in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
225 | in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
226 | in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
227 | in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
228 | in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
229 | |
---|
230 | for (uint32_t j=0; j<x; j++) |
---|
231 | { |
---|
232 | Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j) |
---|
233 | #ifdef POSITION |
---|
234 | ,IN |
---|
235 | ,WEST |
---|
236 | ,"Interface to update status (retire)" |
---|
237 | #endif |
---|
238 | ); |
---|
239 | |
---|
240 | |
---|
241 | in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); |
---|
242 | out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); |
---|
243 | in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_old_use" , 1); |
---|
244 | in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address); |
---|
245 | in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_old_use" , 1); |
---|
246 | in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address); |
---|
247 | in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_new_use" , 1); |
---|
248 | in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address); |
---|
249 | in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_new_use" , 1); |
---|
250 | in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address); |
---|
251 | } |
---|
252 | } |
---|
253 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
254 | |
---|
255 | std::string name; |
---|
256 | |
---|
257 | component_gpr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
258 | component_gpr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
259 | component_spr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
260 | component_spr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
261 | |
---|
262 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
263 | { |
---|
264 | name = _name+"_gpr_"+toString(i); |
---|
265 | |
---|
266 | component_gpr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
267 | (name.c_str() |
---|
268 | #ifdef STATISTICS |
---|
269 | ,param_statistics |
---|
270 | #endif |
---|
271 | ,_param->_param_gpr [i] |
---|
272 | ); |
---|
273 | |
---|
274 | _component->set_component (component_gpr[i]->_component |
---|
275 | #ifdef POSITION |
---|
276 | , 50 |
---|
277 | , 50 |
---|
278 | , 10 |
---|
279 | , 10 |
---|
280 | #endif |
---|
281 | ); |
---|
282 | |
---|
283 | |
---|
284 | name = _name+"_gpr_status_"+toString(i); |
---|
285 | |
---|
286 | component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
287 | (name.c_str() |
---|
288 | #ifdef STATISTICS |
---|
289 | ,param_statistics |
---|
290 | #endif |
---|
291 | ,_param->_param_gpr_status [i] |
---|
292 | ); |
---|
293 | |
---|
294 | _component->set_component (component_gpr_status[i]->_component |
---|
295 | #ifdef POSITION |
---|
296 | , 50 |
---|
297 | , 50 |
---|
298 | , 10 |
---|
299 | , 10 |
---|
300 | #endif |
---|
301 | ); |
---|
302 | |
---|
303 | |
---|
304 | name = _name+"_spr_"+toString(i); |
---|
305 | |
---|
306 | component_spr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
307 | (name.c_str() |
---|
308 | #ifdef STATISTICS |
---|
309 | ,param_statistics |
---|
310 | #endif |
---|
311 | ,_param->_param_spr [i] |
---|
312 | ); |
---|
313 | |
---|
314 | _component->set_component (component_spr[i]->_component |
---|
315 | #ifdef POSITION |
---|
316 | , 50 |
---|
317 | , 50 |
---|
318 | , 10 |
---|
319 | , 10 |
---|
320 | #endif |
---|
321 | ); |
---|
322 | |
---|
323 | name = _name+"_spr_status_"+toString(i); |
---|
324 | |
---|
325 | component_spr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
326 | (name.c_str() |
---|
327 | #ifdef STATISTICS |
---|
328 | ,param_statistics |
---|
329 | #endif |
---|
330 | ,_param->_param_spr_status [i] |
---|
331 | ); |
---|
332 | |
---|
333 | _component->set_component (component_spr_status[i]->_component |
---|
334 | #ifdef POSITION |
---|
335 | , 50 |
---|
336 | , 50 |
---|
337 | , 10 |
---|
338 | , 10 |
---|
339 | #endif |
---|
340 | ); |
---|
341 | } |
---|
342 | |
---|
343 | |
---|
344 | name = _name+"_glue"; |
---|
345 | |
---|
346 | component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Register_unit_Glue::Register_unit_Glue |
---|
347 | (name.c_str() |
---|
348 | #ifdef STATISTICS |
---|
349 | ,param_statistics |
---|
350 | #endif |
---|
351 | ,_param->_param_glue |
---|
352 | ); |
---|
353 | |
---|
354 | _component->set_component (component_glue->_component |
---|
355 | #ifdef POSITION |
---|
356 | , 50 |
---|
357 | , 50 |
---|
358 | , 10 |
---|
359 | , 10 |
---|
360 | #endif |
---|
361 | ); |
---|
362 | |
---|
363 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
364 | std::string name_component; |
---|
365 | |
---|
366 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
367 | { |
---|
368 | name_component = _name+"_gpr_"+toString(i); |
---|
369 | |
---|
370 | std::cout << "Instance : " << name_component << std::endl; |
---|
371 | |
---|
372 | #ifdef POSITION |
---|
373 | _component->interface_map (name_component,"", |
---|
374 | _name ,""); |
---|
375 | #endif |
---|
376 | |
---|
377 | _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); |
---|
378 | _component->port_map(name_component,"in_NRESET" , _name, "in_NRESET"); |
---|
379 | |
---|
380 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
381 | { |
---|
382 | _component->port_map(name_component, |
---|
383 | "in_READ_"+toString(j)+"_VAL", |
---|
384 | _name+"_glue", |
---|
385 | "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
386 | _component->port_map(name_component, |
---|
387 | "out_READ_"+toString(j)+"_ACK", |
---|
388 | _name+"_glue", |
---|
389 | "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
390 | _component->port_map(name_component, |
---|
391 | "out_READ_"+toString(j)+"_DATA", |
---|
392 | _name+"_glue", |
---|
393 | "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
394 | _component->port_map(name_component, |
---|
395 | "in_READ_"+toString(j)+"_ADDRESS", |
---|
396 | _name, |
---|
397 | "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
398 | } |
---|
399 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
400 | { |
---|
401 | _component->port_map(name_component, |
---|
402 | "in_WRITE_"+toString(j)+"_VAL", |
---|
403 | _name+"_glue", |
---|
404 | "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
405 | _component->port_map(name_component, |
---|
406 | "out_WRITE_"+toString(j)+"_ACK", |
---|
407 | _name+"_glue", |
---|
408 | "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
409 | _component->port_map(name_component, |
---|
410 | "in_WRITE_"+toString(j)+"_ADDRESS", |
---|
411 | _name, |
---|
412 | "in_GPR_WRITE_"+toString(j)+"_NUM_REG" |
---|
413 | ); |
---|
414 | _component->port_map(name_component, |
---|
415 | "in_WRITE_"+toString(j)+"_DATA", |
---|
416 | _name, |
---|
417 | "in_GPR_WRITE_"+toString(j)+"_DATA"); |
---|
418 | } |
---|
419 | |
---|
420 | }// gpr |
---|
421 | |
---|
422 | { |
---|
423 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
424 | { |
---|
425 | name_component = _name+"_gpr_status_"+toString(i); |
---|
426 | |
---|
427 | std::cout << "Instance : " << name_component << std::endl; |
---|
428 | |
---|
429 | #ifdef POSITION |
---|
430 | _component->interface_map (name_component,"", |
---|
431 | _name ,""); |
---|
432 | #endif |
---|
433 | |
---|
434 | _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); |
---|
435 | _component->port_map(name_component,"in_NRESET", _name, "in_NRESET"); |
---|
436 | |
---|
437 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
438 | { |
---|
439 | _component->port_map(name_component, |
---|
440 | "in_READ_"+toString(j)+"_VAL" , |
---|
441 | _name+"_glue", |
---|
442 | "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
443 | _component->port_map(name_component, |
---|
444 | "out_READ_"+toString(j)+"_ACK", |
---|
445 | _name+"_glue", |
---|
446 | "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
447 | _component->port_map(name_component, |
---|
448 | "out_READ_"+toString(j)+"_DATA", |
---|
449 | _name+"_glue", |
---|
450 | "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" ); |
---|
451 | _component->port_map(name_component, |
---|
452 | "in_READ_"+toString(j)+"_ADDRESS", |
---|
453 | _name, |
---|
454 | "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
455 | } |
---|
456 | |
---|
457 | uint32_t x=0; |
---|
458 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
459 | { |
---|
460 | _component->port_map(name_component, |
---|
461 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
462 | _name+"_glue", |
---|
463 | "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
464 | _component->port_map(name_component, |
---|
465 | "out_WRITE_"+toString(x)+"_ACK", |
---|
466 | _name+"_glue", |
---|
467 | "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
468 | _component->port_map(name_component, |
---|
469 | "in_WRITE_"+toString(x)+"_DATA" , |
---|
470 | _name+"_glue", |
---|
471 | "out_CONST_1"); |
---|
472 | |
---|
473 | _component->port_map(_name+"_glue", |
---|
474 | "out_CONST_1", |
---|
475 | name_component, |
---|
476 | "in_WRITE_"+toString(x)+"_DATA" ); |
---|
477 | |
---|
478 | |
---|
479 | _component->port_map(name_component, |
---|
480 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
481 | _name, |
---|
482 | "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
483 | } |
---|
484 | |
---|
485 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
486 | { |
---|
487 | _component->port_map(name_component, |
---|
488 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
489 | _name+"_glue", |
---|
490 | "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
491 | _component->port_map(name_component, |
---|
492 | "out_WRITE_"+toString(x)+"_ACK", |
---|
493 | _name+"_glue", |
---|
494 | "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
495 | |
---|
496 | _component->port_map(name_component, |
---|
497 | "in_WRITE_"+toString(x)+"_DATA", |
---|
498 | _name+"_glue", |
---|
499 | "out_CONST_0" |
---|
500 | ); |
---|
501 | _component->port_map( _name+"_glue", |
---|
502 | "out_CONST_0", |
---|
503 | name_component, |
---|
504 | "in_WRITE_"+toString(x)+"_DATA"); |
---|
505 | |
---|
506 | _component->port_map(name_component, |
---|
507 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
508 | _name, |
---|
509 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); |
---|
510 | |
---|
511 | } |
---|
512 | |
---|
513 | for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++) |
---|
514 | { |
---|
515 | _component->port_map(name_component, |
---|
516 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
517 | _name+"_glue", |
---|
518 | "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
519 | _component->port_map(name_component, |
---|
520 | "out_WRITE_"+toString(x)+"_ACK", |
---|
521 | _name+"_glue", |
---|
522 | "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
523 | |
---|
524 | _component->port_map(name_component, |
---|
525 | "in_WRITE_"+toString(x)+"_DATA" , |
---|
526 | _name+"_glue", |
---|
527 | "out_CONST_0"); |
---|
528 | _component->port_map(_name+"_glue", |
---|
529 | "out_CONST_0", |
---|
530 | name_component, |
---|
531 | "in_WRITE_"+toString(x)+"_DATA" ); |
---|
532 | |
---|
533 | _component->port_map(name_component, |
---|
534 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
535 | _name, |
---|
536 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG"); |
---|
537 | |
---|
538 | _component->port_map(name_component, |
---|
539 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
540 | _name+"_glue", |
---|
541 | "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
542 | _component->port_map(name_component, |
---|
543 | "out_WRITE_"+toString(x)+"_ACK", |
---|
544 | _name+"_glue", |
---|
545 | "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
546 | |
---|
547 | _component->port_map(name_component, |
---|
548 | "in_WRITE_"+toString(x)+"_DATA" , |
---|
549 | _name+"_glue", |
---|
550 | "out_CONST_1" |
---|
551 | ); |
---|
552 | _component->port_map(_name+"_glue", |
---|
553 | "out_CONST_1", |
---|
554 | name_component, |
---|
555 | "in_WRITE_"+toString(x)+"_DATA" |
---|
556 | ); |
---|
557 | |
---|
558 | _component->port_map(name_component, |
---|
559 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
560 | _name, |
---|
561 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG"); |
---|
562 | } |
---|
563 | |
---|
564 | } |
---|
565 | }// gpr_status |
---|
566 | |
---|
567 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
568 | { |
---|
569 | name_component = _name+"_spr_"+toString(i); |
---|
570 | |
---|
571 | std::cout << "Instance : " << name_component << std::endl; |
---|
572 | |
---|
573 | #ifdef POSITION |
---|
574 | _component->interface_map (name_component,"", |
---|
575 | _name ,""); |
---|
576 | #endif |
---|
577 | |
---|
578 | _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); |
---|
579 | _component->port_map(name_component,"in_NRESET", _name, "in_NRESET"); |
---|
580 | |
---|
581 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
582 | { |
---|
583 | _component->port_map(name_component, |
---|
584 | "in_READ_"+toString(j)+"_VAL", |
---|
585 | _name+"_glue", |
---|
586 | "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
587 | _component->port_map(name_component, |
---|
588 | "out_READ_"+toString(j)+"_ACK", |
---|
589 | _name+"_glue", |
---|
590 | "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
591 | _component->port_map(name_component, |
---|
592 | "out_READ_"+toString(j)+"_DATA", |
---|
593 | _name+"_glue", |
---|
594 | "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
595 | _component->port_map(name_component, |
---|
596 | "in_READ_"+toString(j)+"_ADDRESS", |
---|
597 | _name, |
---|
598 | "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
599 | } |
---|
600 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
601 | { |
---|
602 | _component->port_map(name_component, |
---|
603 | "in_WRITE_"+toString(j)+"_VAL", |
---|
604 | _name+"_glue", |
---|
605 | "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
606 | _component->port_map(name_component, |
---|
607 | "out_WRITE_"+toString(j)+"_ACK", |
---|
608 | _name+"_glue", |
---|
609 | "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
610 | _component->port_map(name_component, |
---|
611 | "in_WRITE_"+toString(j)+"_ADDRESS", |
---|
612 | _name, |
---|
613 | "in_SPR_WRITE_"+toString(j)+"_NUM_REG" |
---|
614 | ); |
---|
615 | _component->port_map(name_component, |
---|
616 | "in_WRITE_"+toString(j)+"_DATA", |
---|
617 | _name, |
---|
618 | "in_SPR_WRITE_"+toString(j)+"_DATA"); |
---|
619 | } |
---|
620 | |
---|
621 | }// spr |
---|
622 | |
---|
623 | { |
---|
624 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
625 | { |
---|
626 | name_component = _name+"_spr_status_"+toString(i); |
---|
627 | |
---|
628 | std::cout << "Instance : " << name_component << std::endl; |
---|
629 | |
---|
630 | #ifdef POSITION |
---|
631 | _component->interface_map (name_component,"", |
---|
632 | _name ,""); |
---|
633 | #endif |
---|
634 | |
---|
635 | _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); |
---|
636 | _component->port_map(name_component,"in_NRESET", _name, "in_NRESET"); |
---|
637 | |
---|
638 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
639 | { |
---|
640 | _component->port_map(name_component, |
---|
641 | "in_READ_"+toString(j)+"_VAL" , |
---|
642 | _name+"_glue", |
---|
643 | "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
644 | _component->port_map(name_component, |
---|
645 | "out_READ_"+toString(j)+"_ACK", |
---|
646 | _name+"_glue", |
---|
647 | "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
648 | _component->port_map(name_component, |
---|
649 | "out_READ_"+toString(j)+"_DATA", |
---|
650 | _name+"_glue", |
---|
651 | "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" ); |
---|
652 | _component->port_map(name_component, |
---|
653 | "in_READ_"+toString(j)+"_ADDRESS", |
---|
654 | _name, |
---|
655 | "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
656 | } |
---|
657 | |
---|
658 | uint32_t x=0; |
---|
659 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
660 | { |
---|
661 | _component->port_map(name_component, |
---|
662 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
663 | _name+"_glue", |
---|
664 | "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
665 | _component->port_map(name_component, |
---|
666 | "out_WRITE_"+toString(x)+"_ACK", |
---|
667 | _name+"_glue", |
---|
668 | "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
669 | _component->port_map(name_component, |
---|
670 | "in_WRITE_"+toString(x)+"_DATA" , |
---|
671 | _name+"_glue", |
---|
672 | "out_CONST_1"); |
---|
673 | _component->port_map(_name+"_glue", |
---|
674 | "out_CONST_1", |
---|
675 | name_component, |
---|
676 | "in_WRITE_"+toString(x)+"_DATA" |
---|
677 | ); |
---|
678 | |
---|
679 | _component->port_map(name_component, |
---|
680 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
681 | _name, |
---|
682 | "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
683 | } |
---|
684 | |
---|
685 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
686 | { |
---|
687 | _component->port_map(name_component, |
---|
688 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
689 | _name+"_glue", |
---|
690 | "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
691 | _component->port_map(name_component, |
---|
692 | "out_WRITE_"+toString(x)+"_ACK", |
---|
693 | _name+"_glue", |
---|
694 | "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
695 | |
---|
696 | _component->port_map(name_component, |
---|
697 | "in_WRITE_"+toString(x)+"_DATA", |
---|
698 | _name+"_glue", |
---|
699 | "out_CONST_0" |
---|
700 | ); |
---|
701 | _component->port_map( _name+"_glue", |
---|
702 | "out_CONST_0", |
---|
703 | name_component, |
---|
704 | "in_WRITE_"+toString(x)+"_DATA" |
---|
705 | ); |
---|
706 | |
---|
707 | _component->port_map(name_component, |
---|
708 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
709 | _name, |
---|
710 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); |
---|
711 | |
---|
712 | } |
---|
713 | |
---|
714 | for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++) |
---|
715 | { |
---|
716 | _component->port_map(name_component, |
---|
717 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
718 | _name+"_glue", |
---|
719 | "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
720 | _component->port_map(name_component, |
---|
721 | "out_WRITE_"+toString(x)+"_ACK", |
---|
722 | _name+"_glue", |
---|
723 | "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
724 | |
---|
725 | _component->port_map(name_component, |
---|
726 | "in_WRITE_"+toString(x)+"_DATA" , |
---|
727 | _name+"_glue", |
---|
728 | "out_CONST_0"); |
---|
729 | _component->port_map(_name+"_glue", |
---|
730 | "out_CONST_0", |
---|
731 | name_component, |
---|
732 | "in_WRITE_"+toString(x)+"_DATA" |
---|
733 | ); |
---|
734 | |
---|
735 | _component->port_map(name_component, |
---|
736 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
737 | _name, |
---|
738 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG"); |
---|
739 | |
---|
740 | _component->port_map(name_component, |
---|
741 | "in_WRITE_"+toString(x)+"_VAL" , |
---|
742 | _name+"_glue", |
---|
743 | "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
744 | _component->port_map(name_component, |
---|
745 | "out_WRITE_"+toString(x)+"_ACK", |
---|
746 | _name+"_glue", |
---|
747 | "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
748 | |
---|
749 | _component->port_map(name_component, |
---|
750 | "in_WRITE_"+toString(x)+"_DATA" , |
---|
751 | _name+"_glue", |
---|
752 | "out_CONST_1" |
---|
753 | ); |
---|
754 | _component->port_map(_name+"_glue", |
---|
755 | "out_CONST_1", |
---|
756 | name_component, |
---|
757 | "in_WRITE_"+toString(x)+"_DATA" |
---|
758 | ); |
---|
759 | |
---|
760 | _component->port_map(name_component, |
---|
761 | "in_WRITE_"+toString(x++)+"_ADDRESS", |
---|
762 | _name, |
---|
763 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG"); |
---|
764 | } |
---|
765 | |
---|
766 | } |
---|
767 | }// spr_status |
---|
768 | |
---|
769 | { |
---|
770 | name_component = _name+"_glue"; |
---|
771 | |
---|
772 | std::cout << "Instance : " << name_component << std::endl; |
---|
773 | |
---|
774 | #ifdef POSITION |
---|
775 | _component->interface_map (name_component,"", |
---|
776 | _name ,""); |
---|
777 | #endif |
---|
778 | |
---|
779 | _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK" ); |
---|
780 | _component->port_map(name_component,"in_NRESET", _name, "in_NRESET"); |
---|
781 | // _component->port_map(name_component,"out_CONST_0",_name,"out_CONST_0"); |
---|
782 | // _component->port_map(name_component,"out_CONST_1",_name,"out_CONST_1"); |
---|
783 | |
---|
784 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
785 | { |
---|
786 | _component->port_map(name_component, |
---|
787 | "in_GPR_READ_"+toString(j)+"_VAL", |
---|
788 | _name, |
---|
789 | "in_GPR_READ_"+toString(j)+"_VAL"); |
---|
790 | _component->port_map(name_component, |
---|
791 | "out_GPR_READ_"+toString(j)+"_ACK", |
---|
792 | _name, |
---|
793 | "out_GPR_READ_"+toString(j)+"_ACK" ); |
---|
794 | if (_param->_have_port_ooo_engine_id == true) |
---|
795 | _component->port_map(name_component, |
---|
796 | "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID" , |
---|
797 | _name, |
---|
798 | "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
799 | _component->port_map(name_component, |
---|
800 | "out_GPR_READ_"+toString(j)+"_DATA" , |
---|
801 | _name, |
---|
802 | "out_GPR_READ_"+toString(j)+"_DATA"); |
---|
803 | _component->port_map(name_component, |
---|
804 | "out_GPR_READ_"+toString(j)+"_DATA_VAL" , |
---|
805 | _name, |
---|
806 | "out_GPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
807 | |
---|
808 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
809 | { |
---|
810 | _component->port_map(name_component , |
---|
811 | "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
812 | _name+"_gpr_"+toString(i), |
---|
813 | "in_READ_"+toString(j)+"_VAL" ); |
---|
814 | _component->port_map(name_component, |
---|
815 | "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
816 | _name+"_gpr_"+toString(i), |
---|
817 | "out_READ_"+toString(j)+"_ACK" ); |
---|
818 | _component->port_map(name_component, |
---|
819 | "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" , |
---|
820 | _name+"_gpr_"+toString(i), |
---|
821 | "out_READ_"+toString(j)+"_DATA"); |
---|
822 | _component->port_map(name_component, |
---|
823 | "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
824 | _name+"_gpr_status_"+toString(i), |
---|
825 | "in_READ_"+toString(j)+"_VAL" ); |
---|
826 | _component->port_map(name_component, |
---|
827 | "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
828 | _name+"_gpr_status_"+toString(i), |
---|
829 | "out_READ_"+toString(j)+"_ACK"); |
---|
830 | _component->port_map(name_component, |
---|
831 | "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" , |
---|
832 | _name+"_gpr_status_"+toString(i), |
---|
833 | "out_READ_"+toString(j)+"_DATA"); |
---|
834 | } |
---|
835 | } |
---|
836 | |
---|
837 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
838 | { |
---|
839 | _component->port_map(name_component, |
---|
840 | "in_GPR_WRITE_"+toString(j)+"_VAL", |
---|
841 | _name, |
---|
842 | "in_GPR_WRITE_"+toString(j)+"_VAL" ); |
---|
843 | _component->port_map(name_component, |
---|
844 | "out_GPR_WRITE_"+toString(j)+"_ACK", |
---|
845 | _name, |
---|
846 | "out_GPR_WRITE_"+toString(j)+"_ACK" ); |
---|
847 | if (_param->_have_port_ooo_engine_id == true) |
---|
848 | _component->port_map(name_component, |
---|
849 | "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
850 | _name, |
---|
851 | "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" ); |
---|
852 | |
---|
853 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
854 | { |
---|
855 | _component->port_map(name_component, |
---|
856 | "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
857 | _name+"_gpr_"+toString(i), |
---|
858 | "in_WRITE_"+toString(j)+"_VAL" ); |
---|
859 | _component->port_map(name_component, |
---|
860 | "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
861 | _name+"_gpr_"+toString(i), |
---|
862 | "out_WRITE_"+toString(j)+"_ACK" ); |
---|
863 | _component->port_map(name_component, |
---|
864 | "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
865 | _name+"_gpr_status_"+toString(i), |
---|
866 | "in_WRITE_"+toString(j)+"_VAL" ); |
---|
867 | _component->port_map(name_component, |
---|
868 | "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
869 | _name+"_gpr_status_"+toString(i), |
---|
870 | "out_WRITE_"+toString(j)+"_ACK" ); |
---|
871 | } |
---|
872 | } |
---|
873 | |
---|
874 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
875 | { |
---|
876 | _component->port_map(name_component, |
---|
877 | "in_SPR_READ_"+toString(j)+"_VAL", |
---|
878 | _name, |
---|
879 | "in_SPR_READ_"+toString(j)+"_VAL"); |
---|
880 | _component->port_map(name_component, |
---|
881 | "out_SPR_READ_"+toString(j)+"_ACK", |
---|
882 | _name, |
---|
883 | "out_SPR_READ_"+toString(j)+"_ACK" ); |
---|
884 | if (_param->_have_port_ooo_engine_id == true) |
---|
885 | _component->port_map(name_component, |
---|
886 | "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID" , |
---|
887 | _name, |
---|
888 | "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
889 | _component->port_map(name_component, |
---|
890 | "out_SPR_READ_"+toString(j)+"_DATA" , |
---|
891 | _name, |
---|
892 | "out_SPR_READ_"+toString(j)+"_DATA"); |
---|
893 | _component->port_map(name_component, |
---|
894 | "out_SPR_READ_"+toString(j)+"_DATA_VAL" , |
---|
895 | _name, |
---|
896 | "out_SPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
897 | |
---|
898 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
899 | { |
---|
900 | _component->port_map(name_component , |
---|
901 | "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
902 | _name+"_spr_"+toString(i), |
---|
903 | "in_READ_"+toString(j)+"_VAL" ); |
---|
904 | _component->port_map(name_component, |
---|
905 | "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
906 | _name+"_spr_"+toString(i), |
---|
907 | "out_READ_"+toString(j)+"_ACK" ); |
---|
908 | _component->port_map(name_component, |
---|
909 | "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" , |
---|
910 | _name+"_spr_"+toString(i), |
---|
911 | "out_READ_"+toString(j)+"_DATA"); |
---|
912 | _component->port_map(name_component, |
---|
913 | "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
914 | _name+"_spr_status_"+toString(i), |
---|
915 | "in_READ_"+toString(j)+"_VAL" ); |
---|
916 | _component->port_map(name_component, |
---|
917 | "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
918 | _name+"_spr_status_"+toString(i), |
---|
919 | "out_READ_"+toString(j)+"_ACK"); |
---|
920 | _component->port_map(name_component, |
---|
921 | "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" , |
---|
922 | _name+"_spr_status_"+toString(i), |
---|
923 | "out_READ_"+toString(j)+"_DATA"); |
---|
924 | } |
---|
925 | } |
---|
926 | |
---|
927 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
928 | { |
---|
929 | _component->port_map(name_component, |
---|
930 | "in_SPR_WRITE_"+toString(j)+"_VAL", |
---|
931 | _name, |
---|
932 | "in_SPR_WRITE_"+toString(j)+"_VAL" ); |
---|
933 | _component->port_map(name_component, |
---|
934 | "out_SPR_WRITE_"+toString(j)+"_ACK", |
---|
935 | _name, |
---|
936 | "out_SPR_WRITE_"+toString(j)+"_ACK" ); |
---|
937 | if (_param->_have_port_ooo_engine_id == true) |
---|
938 | _component->port_map(name_component, |
---|
939 | "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
940 | _name, |
---|
941 | "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" ); |
---|
942 | |
---|
943 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
944 | { |
---|
945 | _component->port_map(name_component, |
---|
946 | "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
947 | _name+"_spr_"+toString(i), |
---|
948 | "in_WRITE_"+toString(j)+"_VAL" ); |
---|
949 | _component->port_map(name_component, |
---|
950 | "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
951 | _name+"_spr_"+toString(i), |
---|
952 | "out_WRITE_"+toString(j)+"_ACK" ); |
---|
953 | _component->port_map(name_component, |
---|
954 | "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
955 | _name+"_spr_status_"+toString(i), |
---|
956 | "in_WRITE_"+toString(j)+"_VAL" ); |
---|
957 | _component->port_map(name_component, |
---|
958 | "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
959 | _name+"_spr_status_"+toString(i), |
---|
960 | "out_WRITE_"+toString(j)+"_ACK" ); |
---|
961 | } |
---|
962 | } |
---|
963 | |
---|
964 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
965 | { |
---|
966 | uint32_t x =_param->_nb_inst_insert_rob [i]; |
---|
967 | uint32_t gpr_j = _param->_nb_gpr_write; |
---|
968 | uint32_t spr_j = _param->_nb_spr_write; |
---|
969 | |
---|
970 | for (uint32_t j=0; j<x; j++) |
---|
971 | { |
---|
972 | _component->port_map(name_component, |
---|
973 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
974 | _name, |
---|
975 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
976 | _component->port_map(name_component, |
---|
977 | "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
978 | _name, |
---|
979 | "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
980 | _component->port_map(name_component, |
---|
981 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE", |
---|
982 | _name, |
---|
983 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE"); |
---|
984 | _component->port_map(name_component, |
---|
985 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE", |
---|
986 | _name, |
---|
987 | "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE"); |
---|
988 | _component->port_map(name_component, |
---|
989 | "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
990 | _name+"_gpr_status_"+toString(i), |
---|
991 | "in_WRITE_"+toString(gpr_j)+"_VAL"); |
---|
992 | _component->port_map(name_component, |
---|
993 | "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
994 | _name+"_gpr_status_"+toString(i), |
---|
995 | "out_WRITE_"+toString(gpr_j++)+"_ACK"); |
---|
996 | _component->port_map(name_component, |
---|
997 | "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
998 | _name+"_spr_status_"+toString(i), |
---|
999 | "in_WRITE_"+toString(spr_j)+"_VAL"); |
---|
1000 | _component->port_map(name_component, |
---|
1001 | "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
1002 | _name+"_spr_status_"+toString(i), |
---|
1003 | "out_WRITE_"+toString(spr_j++)+"_ACK"); |
---|
1004 | } |
---|
1005 | } |
---|
1006 | |
---|
1007 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
1008 | { |
---|
1009 | uint32_t x =_param->_nb_inst_retire_rob [i]; |
---|
1010 | uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i]; |
---|
1011 | uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i]; |
---|
1012 | |
---|
1013 | for (uint32_t j=0; j<x; j++) |
---|
1014 | { |
---|
1015 | _component->port_map(name_component, |
---|
1016 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
1017 | _name, |
---|
1018 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
1019 | _component->port_map(name_component, |
---|
1020 | "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
1021 | _name, |
---|
1022 | "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
1023 | _component->port_map(name_component, |
---|
1024 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE", |
---|
1025 | _name, |
---|
1026 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE"); |
---|
1027 | _component->port_map(name_component, |
---|
1028 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE", |
---|
1029 | _name, |
---|
1030 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE"); |
---|
1031 | _component->port_map(name_component, |
---|
1032 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE", |
---|
1033 | _name, |
---|
1034 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE"); |
---|
1035 | _component->port_map(name_component, |
---|
1036 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE", |
---|
1037 | _name, |
---|
1038 | "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE"); |
---|
1039 | |
---|
1040 | _component->port_map(name_component, |
---|
1041 | "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
1042 | _name+"_gpr_status_"+toString(i), |
---|
1043 | "in_WRITE_"+toString(gpr_j)+"_VAL"); |
---|
1044 | _component->port_map(name_component, |
---|
1045 | "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
1046 | _name+"_gpr_status_"+toString(i), |
---|
1047 | "out_WRITE_"+toString(gpr_j++)+"_ACK"); |
---|
1048 | _component->port_map(name_component, |
---|
1049 | "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
1050 | _name+"_gpr_status_"+toString(i), |
---|
1051 | "in_WRITE_"+toString(gpr_j)+"_VAL"); |
---|
1052 | _component->port_map(name_component, |
---|
1053 | "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
1054 | _name+"_gpr_status_"+toString(i), |
---|
1055 | "out_WRITE_"+toString(gpr_j++)+"_ACK"); |
---|
1056 | _component->port_map(name_component, |
---|
1057 | "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
1058 | _name+"_spr_status_"+toString(i), |
---|
1059 | "in_WRITE_"+toString(spr_j)+"_VAL"); |
---|
1060 | _component->port_map(name_component, |
---|
1061 | "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
1062 | _name+"_spr_status_"+toString(i), |
---|
1063 | "out_WRITE_"+toString(spr_j++)+"_ACK"); |
---|
1064 | _component->port_map(name_component, |
---|
1065 | "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
1066 | _name+"_spr_status_"+toString(i), |
---|
1067 | "in_WRITE_"+toString(spr_j)+"_VAL"); |
---|
1068 | _component->port_map(name_component, |
---|
1069 | "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
1070 | _name+"_spr_status_"+toString(i), |
---|
1071 | "out_WRITE_"+toString(spr_j++)+"_ACK"); |
---|
1072 | } |
---|
1073 | } |
---|
1074 | }// glue |
---|
1075 | |
---|
1076 | // _component->test_map (); |
---|
1077 | |
---|
1078 | #ifdef POSITION |
---|
1079 | _component->generate_file(); |
---|
1080 | #endif |
---|
1081 | |
---|
1082 | // std::cout << *_component << std::endl; |
---|
1083 | |
---|
1084 | log_printf(FUNC,Register_unit,FUNCTION,"End"); |
---|
1085 | }; |
---|
1086 | |
---|
1087 | }; // end namespace register_unit |
---|
1088 | }; // end namespace execute_loop |
---|
1089 | }; // end namespace multi_execute_loop |
---|
1090 | }; // end namespace core |
---|
1091 | |
---|
1092 | }; // end namespace behavioural |
---|
1093 | }; // end namespace morpheo |
---|