1 | /* |
---|
2 | * $Id: Register_unit_allocation.cpp 131 2009-07-08 18:40:08Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h" |
---|
9 | #include "Behavioural/include/Allocation.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_execute_loop { |
---|
15 | namespace execute_loop { |
---|
16 | namespace register_unit { |
---|
17 | |
---|
18 | #undef FUNCTION |
---|
19 | #define FUNCTION "Register_unit::allocation" |
---|
20 | void Register_unit::allocation ( |
---|
21 | #ifdef STATISTICS |
---|
22 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
23 | #else |
---|
24 | void |
---|
25 | #endif |
---|
26 | ) |
---|
27 | { |
---|
28 | log_printf(FUNC,Register_unit,FUNCTION,"Begin"); |
---|
29 | |
---|
30 | _component = new Component (_usage); |
---|
31 | |
---|
32 | Entity * entity = _component->set_entity (_name |
---|
33 | ,"Register_unit" |
---|
34 | #ifdef POSITION |
---|
35 | ,COMBINATORY |
---|
36 | #endif |
---|
37 | ); |
---|
38 | |
---|
39 | _interfaces = entity->set_interfaces(); |
---|
40 | |
---|
41 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
42 | |
---|
43 | Interface * interface = _interfaces->set_interface("" |
---|
44 | #ifdef POSITION |
---|
45 | ,IN |
---|
46 | ,SOUTH, |
---|
47 | "Generalist interface" |
---|
48 | #endif |
---|
49 | ); |
---|
50 | |
---|
51 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
52 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
53 | |
---|
54 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
55 | { |
---|
56 | ALLOC1_INTERFACE_BEGIN("gpr_read",IN,NORTH,_("Interface to read the register file"),_param->_nb_gpr_read); |
---|
57 | |
---|
58 | ALLOC1_VALACK_IN ( in_GPR_READ_VAL ,VAL); |
---|
59 | ALLOC1_VALACK_OUT(out_GPR_READ_ACK ,ACK); |
---|
60 | ALLOC1_SIGNAL_IN ( in_GPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
61 | ALLOC1_SIGNAL_IN ( in_GPR_READ_NUM_REG ,"num_reg" ,Tgeneral_address_t,_param->_size_gpr_address); |
---|
62 | ALLOC1_SIGNAL_OUT(out_GPR_READ_DATA ,"data" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
63 | ALLOC1_SIGNAL_OUT(out_GPR_READ_DATA_VAL ,"data_val" ,Tcontrol_t ,1); |
---|
64 | |
---|
65 | ALLOC1_INTERFACE_END(_param->_nb_gpr_read); |
---|
66 | } |
---|
67 | |
---|
68 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
69 | { |
---|
70 | ALLOC1_INTERFACE_BEGIN("gpr_write",IN,NORTH,_("Interface to write the register file"),_param->_nb_gpr_write); |
---|
71 | |
---|
72 | ALLOC1_VALACK_IN ( in_GPR_WRITE_VAL ,VAL); |
---|
73 | ALLOC1_VALACK_OUT(out_GPR_WRITE_ACK ,ACK); |
---|
74 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
75 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_NUM_REG ,"num_reg" ,Tgeneral_address_t,_param->_size_gpr_address); |
---|
76 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_DATA ,"data" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
77 | |
---|
78 | ALLOC1_INTERFACE_END(_param->_nb_gpr_write); |
---|
79 | } |
---|
80 | |
---|
81 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
82 | { |
---|
83 | ALLOC1_INTERFACE_BEGIN("spr_read",IN,NORTH,_("Interface to read the register file"),_param->_nb_spr_read); |
---|
84 | |
---|
85 | ALLOC1_VALACK_IN ( in_SPR_READ_VAL ,VAL); |
---|
86 | ALLOC1_VALACK_OUT(out_SPR_READ_ACK ,ACK); |
---|
87 | ALLOC1_SIGNAL_IN ( in_SPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
88 | ALLOC1_SIGNAL_IN ( in_SPR_READ_NUM_REG ,"num_reg" ,Tspecial_address_t,_param->_size_spr_address); |
---|
89 | ALLOC1_SIGNAL_OUT(out_SPR_READ_DATA ,"data" ,Tspecial_data_t ,_param->_size_special_data); |
---|
90 | ALLOC1_SIGNAL_OUT(out_SPR_READ_DATA_VAL ,"data_val" ,Tcontrol_t ,1); |
---|
91 | |
---|
92 | ALLOC1_INTERFACE_END(_param->_nb_spr_read); |
---|
93 | } |
---|
94 | |
---|
95 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
96 | { |
---|
97 | ALLOC1_INTERFACE_BEGIN("spr_write",IN,NORTH,_("Interface to write the register file"),_param->_nb_spr_write); |
---|
98 | |
---|
99 | ALLOC1_VALACK_IN ( in_SPR_WRITE_VAL ,VAL); |
---|
100 | ALLOC1_VALACK_OUT(out_SPR_WRITE_ACK ,ACK); |
---|
101 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
102 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_NUM_REG ,"num_reg" ,Tspecial_address_t,_param->_size_spr_address); |
---|
103 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_DATA ,"data" ,Tspecial_data_t ,_param->_size_special_data); |
---|
104 | |
---|
105 | ALLOC1_INTERFACE_END(_param->_nb_spr_write); |
---|
106 | } |
---|
107 | |
---|
108 | // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
109 | { |
---|
110 | ALLOC2_INTERFACE_BEGIN("insert_rob",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
111 | |
---|
112 | _ALLOC2_VALACK_IN ( in_INSERT_ROB_VAL ,VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
113 | _ALLOC2_VALACK_OUT(out_INSERT_ROB_ACK ,ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
114 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_USE ,"rd_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
115 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_NUM_REG,"rd_num_reg",Tgeneral_address_t,_param->_size_gpr_address,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
116 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_USE ,"re_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
117 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_NUM_REG,"re_num_reg",Tspecial_address_t,_param->_size_spr_address,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
118 | |
---|
119 | ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
120 | } |
---|
121 | |
---|
122 | // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
123 | // in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
124 | // out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
125 | // in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
126 | // in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
127 | // in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
128 | // in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
129 | // in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
130 | // in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
131 | // in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
132 | // in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
133 | |
---|
134 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
135 | // { |
---|
136 | // uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
137 | |
---|
138 | // in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
139 | // out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t ) * [x]; |
---|
140 | // in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
141 | // in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
142 | // in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
143 | // in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
144 | // in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
145 | // in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
146 | // in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
147 | // in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
148 | |
---|
149 | // for (uint32_t j=0; j<x; j++) |
---|
150 | // { |
---|
151 | // Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j) |
---|
152 | // #ifdef POSITION |
---|
153 | // ,IN |
---|
154 | // ,WEST |
---|
155 | // ,"Interface to update status (retire)" |
---|
156 | // #endif |
---|
157 | // ); |
---|
158 | |
---|
159 | |
---|
160 | // in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); |
---|
161 | // out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); |
---|
162 | // in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_old_use" , 1); |
---|
163 | // in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address); |
---|
164 | // in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_old_use" , 1); |
---|
165 | // in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address); |
---|
166 | // in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_new_use" , 1); |
---|
167 | // in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address); |
---|
168 | // in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_new_use" , 1); |
---|
169 | // in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address); |
---|
170 | // } |
---|
171 | // } |
---|
172 | |
---|
173 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
174 | |
---|
175 | std::string name; |
---|
176 | |
---|
177 | component_gpr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
178 | component_gpr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
179 | component_spr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
180 | component_spr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
181 | |
---|
182 | // component_gpr = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked * [_param->_nb_ooo_engine]; |
---|
183 | // component_gpr_status = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic * [_param->_nb_ooo_engine]; |
---|
184 | // component_spr = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked * [_param->_nb_ooo_engine]; |
---|
185 | // component_spr_status = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic * [_param->_nb_ooo_engine]; |
---|
186 | |
---|
187 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
188 | { |
---|
189 | name = _name+"_gpr_"+toString(i); |
---|
190 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
191 | |
---|
192 | component_gpr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
193 | // component_gpr [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked |
---|
194 | (name.c_str() |
---|
195 | #ifdef STATISTICS |
---|
196 | ,param_statistics |
---|
197 | #endif |
---|
198 | ,_param->_param_gpr [i]//->_param_registerfile_multi_banked |
---|
199 | ,_usage |
---|
200 | ); |
---|
201 | |
---|
202 | _component->set_component (component_gpr[i]->_component |
---|
203 | #ifdef POSITION |
---|
204 | , 50 |
---|
205 | , 50 |
---|
206 | , 10 |
---|
207 | , 10 |
---|
208 | #endif |
---|
209 | ); |
---|
210 | |
---|
211 | |
---|
212 | name = _name+"_gpr_status_"+toString(i); |
---|
213 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
214 | |
---|
215 | component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
216 | // component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic |
---|
217 | (name.c_str() |
---|
218 | #ifdef STATISTICS |
---|
219 | ,param_statistics |
---|
220 | #endif |
---|
221 | ,_param->_param_gpr_status [i]//->_param_registerfile_monolithic |
---|
222 | ,_usage |
---|
223 | ); |
---|
224 | |
---|
225 | _component->set_component (component_gpr_status[i]->_component |
---|
226 | #ifdef POSITION |
---|
227 | , 50 |
---|
228 | , 50 |
---|
229 | , 10 |
---|
230 | , 10 |
---|
231 | #endif |
---|
232 | ); |
---|
233 | |
---|
234 | |
---|
235 | name = _name+"_spr_"+toString(i); |
---|
236 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
237 | |
---|
238 | component_spr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
239 | // component_spr [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked |
---|
240 | (name.c_str() |
---|
241 | #ifdef STATISTICS |
---|
242 | ,param_statistics |
---|
243 | #endif |
---|
244 | ,_param->_param_spr [i]//->_param_registerfile_multi_banked |
---|
245 | ,_usage |
---|
246 | ); |
---|
247 | |
---|
248 | _component->set_component (component_spr[i]->_component |
---|
249 | #ifdef POSITION |
---|
250 | , 50 |
---|
251 | , 50 |
---|
252 | , 10 |
---|
253 | , 10 |
---|
254 | #endif |
---|
255 | ); |
---|
256 | |
---|
257 | name = _name+"_spr_status_"+toString(i); |
---|
258 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
259 | |
---|
260 | component_spr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
261 | // component_spr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic::RegisterFile_Monolithic |
---|
262 | (name.c_str() |
---|
263 | #ifdef STATISTICS |
---|
264 | ,param_statistics |
---|
265 | #endif |
---|
266 | ,_param->_param_spr_status [i]//->_param_registerfile_monolithic |
---|
267 | ,_usage |
---|
268 | ); |
---|
269 | |
---|
270 | _component->set_component (component_spr_status[i]->_component |
---|
271 | #ifdef POSITION |
---|
272 | , 50 |
---|
273 | , 50 |
---|
274 | , 10 |
---|
275 | , 10 |
---|
276 | #endif |
---|
277 | ); |
---|
278 | } |
---|
279 | |
---|
280 | { |
---|
281 | name = _name+"_glue"; |
---|
282 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
283 | |
---|
284 | component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Register_unit_Glue::Register_unit_Glue |
---|
285 | (name.c_str() |
---|
286 | #ifdef STATISTICS |
---|
287 | ,param_statistics |
---|
288 | #endif |
---|
289 | ,_param->_param_glue |
---|
290 | ,_usage |
---|
291 | ); |
---|
292 | |
---|
293 | _component->set_component (component_glue->_component |
---|
294 | #ifdef POSITION |
---|
295 | , 50 |
---|
296 | , 50 |
---|
297 | , 10 |
---|
298 | , 10 |
---|
299 | #endif |
---|
300 | ); |
---|
301 | } |
---|
302 | |
---|
303 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
304 | std::string src,dest; |
---|
305 | |
---|
306 | // ------------------------------------------------------------------- |
---|
307 | // -----[ gpr ]------------------------------------------------------- |
---|
308 | // ------------------------------------------------------------------- |
---|
309 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
310 | { |
---|
311 | src = _name+"_gpr_"+toString(i); |
---|
312 | |
---|
313 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
314 | |
---|
315 | // -----[ instance "" ]----------------------------------------------- |
---|
316 | { |
---|
317 | dest = _name; |
---|
318 | #ifdef POSITION |
---|
319 | _component->interface_map (src ,"", |
---|
320 | dest,""); |
---|
321 | #endif |
---|
322 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
323 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
324 | } |
---|
325 | |
---|
326 | // -----[ instance "read" ]------------------------------------------- |
---|
327 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
328 | { |
---|
329 | dest = _name+"_glue"; |
---|
330 | |
---|
331 | #ifdef POSITION |
---|
332 | _component->interface_map (src , "read_"+toString(j), |
---|
333 | dest,"gpr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
334 | #endif |
---|
335 | |
---|
336 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
337 | dest,"out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
338 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
339 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
340 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
341 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
342 | |
---|
343 | dest = _name; |
---|
344 | |
---|
345 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
346 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
347 | } |
---|
348 | |
---|
349 | // -----[ instance "write" ]------------------------------------------ |
---|
350 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
351 | { |
---|
352 | dest = _name+"_glue"; |
---|
353 | |
---|
354 | #ifdef POSITION |
---|
355 | _component->interface_map (src , "write_"+toString(j), |
---|
356 | dest,"gpr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
357 | #endif |
---|
358 | |
---|
359 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
360 | dest,"out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
361 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
362 | dest, "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
363 | |
---|
364 | dest = _name; |
---|
365 | |
---|
366 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
367 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
368 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
369 | dest, "in_GPR_WRITE_"+toString(j)+"_DATA"); |
---|
370 | } |
---|
371 | }// gpr |
---|
372 | |
---|
373 | // ------------------------------------------------------------------- |
---|
374 | // -----[ gpr_status ]------------------------------------------------ |
---|
375 | // ------------------------------------------------------------------- |
---|
376 | { |
---|
377 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
378 | { |
---|
379 | src = _name+"_gpr_status_"+toString(i); |
---|
380 | |
---|
381 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
382 | |
---|
383 | { |
---|
384 | dest = _name; |
---|
385 | #ifdef POSITION |
---|
386 | _component->interface_map (src ,"", |
---|
387 | dest,""); |
---|
388 | #endif |
---|
389 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
390 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
391 | } |
---|
392 | |
---|
393 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
394 | { |
---|
395 | dest = _name+"_glue"; |
---|
396 | |
---|
397 | #ifdef POSITION |
---|
398 | _component->interface_map (src , "read_"+toString(j), |
---|
399 | dest,"gpr_read_status_"+toString(i)+"_"+toString(j)); |
---|
400 | #endif |
---|
401 | |
---|
402 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
403 | dest,"out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
404 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
405 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
406 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
407 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
408 | |
---|
409 | dest = _name; |
---|
410 | |
---|
411 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
412 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
413 | } |
---|
414 | |
---|
415 | uint32_t x=0; |
---|
416 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
417 | { |
---|
418 | dest = _name+"_glue"; |
---|
419 | |
---|
420 | #ifdef POSITION |
---|
421 | _component->interface_map (src , "write_"+toString(x), |
---|
422 | dest,"gpr_write_status_"+toString(i)+"_"+toString(j)); |
---|
423 | #endif |
---|
424 | |
---|
425 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
426 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
427 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
428 | dest, "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
429 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
430 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
431 | // dest,"out_CONST_1"); |
---|
432 | |
---|
433 | dest = _name; |
---|
434 | |
---|
435 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
436 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
437 | |
---|
438 | x++; |
---|
439 | } |
---|
440 | |
---|
441 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
442 | { |
---|
443 | dest = _name+"_glue"; |
---|
444 | |
---|
445 | #ifdef POSITION |
---|
446 | _component->interface_map (src , "write_"+toString(j), |
---|
447 | dest,"insert_rob_gpr_status_"+toString(i)+"_"+toString(j)); |
---|
448 | #endif |
---|
449 | |
---|
450 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
451 | dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
452 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
453 | dest, "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
454 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
455 | dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
456 | // dest,"out_CONST_0"); |
---|
457 | |
---|
458 | dest = _name; |
---|
459 | |
---|
460 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
461 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); |
---|
462 | |
---|
463 | x++; |
---|
464 | } |
---|
465 | } |
---|
466 | }// gpr_status |
---|
467 | |
---|
468 | // ------------------------------------------------------------------- |
---|
469 | // -----[ spr ]------------------------------------------------------- |
---|
470 | // ------------------------------------------------------------------- |
---|
471 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
472 | { |
---|
473 | src = _name+"_spr_"+toString(i); |
---|
474 | |
---|
475 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
476 | |
---|
477 | { |
---|
478 | dest = _name; |
---|
479 | #ifdef POSITION |
---|
480 | _component->interface_map (src ,"", |
---|
481 | dest,""); |
---|
482 | #endif |
---|
483 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
484 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
485 | } |
---|
486 | |
---|
487 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
488 | { |
---|
489 | dest = _name+"_glue"; |
---|
490 | |
---|
491 | #ifdef POSITION |
---|
492 | _component->interface_map (src , "read_"+toString(j), |
---|
493 | dest,"spr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
494 | #endif |
---|
495 | |
---|
496 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
497 | dest,"out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
498 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
499 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
500 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
501 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
502 | |
---|
503 | dest = _name; |
---|
504 | |
---|
505 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
506 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
507 | } |
---|
508 | |
---|
509 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
510 | { |
---|
511 | dest = _name+"_glue"; |
---|
512 | |
---|
513 | #ifdef POSITION |
---|
514 | _component->interface_map (src , "write_"+toString(j), |
---|
515 | dest,"spr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
516 | #endif |
---|
517 | |
---|
518 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
519 | dest,"out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
520 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
521 | dest, "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
522 | |
---|
523 | dest = _name; |
---|
524 | |
---|
525 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
526 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
527 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
528 | dest, "in_SPR_WRITE_"+toString(j)+"_DATA"); |
---|
529 | } |
---|
530 | }// spr |
---|
531 | |
---|
532 | // ------------------------------------------------------------------- |
---|
533 | // -----[ spr_status ]------------------------------------------------ |
---|
534 | // ------------------------------------------------------------------- |
---|
535 | { |
---|
536 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
537 | { |
---|
538 | src = _name+"_spr_status_"+toString(i); |
---|
539 | |
---|
540 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
541 | |
---|
542 | { |
---|
543 | dest = _name; |
---|
544 | #ifdef POSITION |
---|
545 | _component->interface_map (src ,"", |
---|
546 | dest,""); |
---|
547 | #endif |
---|
548 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
549 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
550 | } |
---|
551 | |
---|
552 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
553 | { |
---|
554 | dest = _name+"_glue"; |
---|
555 | |
---|
556 | #ifdef POSITION |
---|
557 | _component->interface_map (src , "read_"+toString(j), |
---|
558 | dest,"spr_read_status_"+toString(i)+"_"+toString(j)); |
---|
559 | #endif |
---|
560 | |
---|
561 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
562 | dest,"out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
563 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
564 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
565 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
566 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
567 | |
---|
568 | dest = _name; |
---|
569 | |
---|
570 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
571 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
572 | } |
---|
573 | |
---|
574 | uint32_t x=0; |
---|
575 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
576 | { |
---|
577 | dest = _name+"_glue"; |
---|
578 | |
---|
579 | #ifdef POSITION |
---|
580 | _component->interface_map (src , "write_"+toString(x), |
---|
581 | dest,"spr_write_status_"+toString(i)+"_"+toString(j)); |
---|
582 | #endif |
---|
583 | |
---|
584 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
585 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
586 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
587 | dest, "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
588 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
589 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
590 | // dest,"out_CONST_1"); |
---|
591 | |
---|
592 | dest = _name; |
---|
593 | |
---|
594 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
595 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
596 | |
---|
597 | x++; |
---|
598 | } |
---|
599 | |
---|
600 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
601 | { |
---|
602 | dest = _name+"_glue"; |
---|
603 | |
---|
604 | #ifdef POSITION |
---|
605 | _component->interface_map (src , "write_"+toString(x), |
---|
606 | dest,"insert_rob_spr_status_"+toString(i)+"_"+toString(j)); |
---|
607 | #endif |
---|
608 | |
---|
609 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
610 | dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
611 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
612 | dest, "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
613 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
614 | dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
615 | // dest,"out_CONST_0"); |
---|
616 | |
---|
617 | dest = _name; |
---|
618 | |
---|
619 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
620 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); |
---|
621 | |
---|
622 | x++; |
---|
623 | } |
---|
624 | } |
---|
625 | }// spr_status |
---|
626 | |
---|
627 | // ------------------------------------------------------------------- |
---|
628 | // -----[ glue ]------------------------------------------------------ |
---|
629 | // ------------------------------------------------------------------- |
---|
630 | { |
---|
631 | src = _name+"_glue"; |
---|
632 | |
---|
633 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
634 | |
---|
635 | { |
---|
636 | dest = _name; |
---|
637 | #ifdef POSITION |
---|
638 | _component->interface_map (src ,"", |
---|
639 | dest,""); |
---|
640 | #endif |
---|
641 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
642 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
643 | } |
---|
644 | |
---|
645 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
646 | { |
---|
647 | dest = _name; |
---|
648 | |
---|
649 | #ifdef POSITION |
---|
650 | _component->interface_map (src ,"gpr_read_"+toString(j), |
---|
651 | dest,"gpr_read_"+toString(j)); |
---|
652 | #endif |
---|
653 | |
---|
654 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_VAL", |
---|
655 | dest, "in_GPR_READ_"+toString(j)+"_VAL"); |
---|
656 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_ACK", |
---|
657 | dest,"out_GPR_READ_"+toString(j)+"_ACK"); |
---|
658 | if (_param->_have_port_ooo_engine_id == true) |
---|
659 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
660 | dest, "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
661 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA", |
---|
662 | dest,"out_GPR_READ_"+toString(j)+"_DATA"); |
---|
663 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA_VAL", |
---|
664 | dest,"out_GPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
665 | |
---|
666 | // out_GPR_READ_REGISTERFILE_VAL - gpr. in_READ_VAL |
---|
667 | // in_GPR_READ_REGISTERFILE_ACK - gpr.out_READ_ACK |
---|
668 | // in_GPR_READ_REGISTERFILE_DATA - gpr.out_READ_DATA |
---|
669 | |
---|
670 | // out_GPR_READ_STATUS_VAL - gpr. in_READ_VAL |
---|
671 | // in_GPR_READ_STATUS_ACK - gpr.out_READ_ACK |
---|
672 | // in_GPR_READ_STATUS_DATA_VAL - gpr.out_READ_DATA |
---|
673 | } |
---|
674 | |
---|
675 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
676 | { |
---|
677 | dest = _name; |
---|
678 | |
---|
679 | #ifdef POSITION |
---|
680 | _component->interface_map (src ,"gpr_write_"+toString(j), |
---|
681 | dest,"gpr_write_"+toString(j)); |
---|
682 | #endif |
---|
683 | |
---|
684 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_VAL", |
---|
685 | dest, "in_GPR_WRITE_"+toString(j)+"_VAL"); |
---|
686 | PORT_MAP(_component,src ,"out_GPR_WRITE_"+toString(j)+"_ACK", |
---|
687 | dest,"out_GPR_WRITE_"+toString(j)+"_ACK"); |
---|
688 | if (_param->_have_port_ooo_engine_id == true) |
---|
689 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
690 | dest, "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
691 | |
---|
692 | // out_GPR_WRITE_REGISTERFILE_VAL - gpr. in_WRITE_VAL |
---|
693 | // in_GPR_WRITE_REGISTERFILE_ACK - gpr.out_WRITE_ACK |
---|
694 | // out_GPR_WRITE_STATUS_VAL - gpr. in_WRITE_VAL |
---|
695 | // in_GPR_WRITE_STATUS_ACK - gpr.out_WRITE_ACK |
---|
696 | // out_GPR_WRITE_STATUS_DATA - gpr. in_WRITE_DATA |
---|
697 | } |
---|
698 | |
---|
699 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
700 | { |
---|
701 | dest = _name; |
---|
702 | |
---|
703 | #ifdef POSITION |
---|
704 | _component->interface_map (src ,"spr_read_"+toString(j), |
---|
705 | dest,"spr_read_"+toString(j)); |
---|
706 | #endif |
---|
707 | |
---|
708 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_VAL", |
---|
709 | dest, "in_SPR_READ_"+toString(j)+"_VAL"); |
---|
710 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_ACK", |
---|
711 | dest,"out_SPR_READ_"+toString(j)+"_ACK"); |
---|
712 | if (_param->_have_port_ooo_engine_id == true) |
---|
713 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
714 | dest, "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
715 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA", |
---|
716 | dest,"out_SPR_READ_"+toString(j)+"_DATA"); |
---|
717 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA_VAL", |
---|
718 | dest,"out_SPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
719 | |
---|
720 | // out_SPR_READ_REGISTERFILE_VAL - spr. in_READ_VAL |
---|
721 | // in_SPR_READ_REGISTERFILE_ACK - spr.out_READ_ACK |
---|
722 | // in_SPR_READ_REGISTERFILE_DATA - spr.out_READ_DATA |
---|
723 | |
---|
724 | // out_SPR_READ_STATUS_VAL - spr. in_READ_VAL |
---|
725 | // in_SPR_READ_STATUS_ACK - spr.out_READ_ACK |
---|
726 | // in_SPR_READ_STATUS_DATA_VAL - spr.out_READ_DATA |
---|
727 | } |
---|
728 | |
---|
729 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
730 | { |
---|
731 | dest = _name; |
---|
732 | |
---|
733 | #ifdef POSITION |
---|
734 | _component->interface_map (src ,"spr_write_"+toString(j), |
---|
735 | dest,"spr_write_"+toString(j)); |
---|
736 | #endif |
---|
737 | |
---|
738 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_VAL", |
---|
739 | dest, "in_SPR_WRITE_"+toString(j)+"_VAL"); |
---|
740 | PORT_MAP(_component,src ,"out_SPR_WRITE_"+toString(j)+"_ACK", |
---|
741 | dest,"out_SPR_WRITE_"+toString(j)+"_ACK"); |
---|
742 | if (_param->_have_port_ooo_engine_id == true) |
---|
743 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
744 | dest, "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
745 | |
---|
746 | // out_SPR_WRITE_REGISTERFILE_VAL - spr. in_WRITE_VAL |
---|
747 | // in_SPR_WRITE_REGISTERFILE_ACK - spr.out_WRITE_ACK |
---|
748 | // out_SPR_WRITE_STATUS_VAL - spr. in_WRITE_VAL |
---|
749 | // in_SPR_WRITE_STATUS_ACK - spr.out_WRITE_ACK |
---|
750 | // out_SPR_WRITE_STATUS_DATA - spr. in_WRITE_DATA |
---|
751 | } |
---|
752 | |
---|
753 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
754 | { |
---|
755 | uint32_t x = _param->_nb_inst_insert_rob [i]; |
---|
756 | |
---|
757 | for (uint32_t j=0; j<x; j++) |
---|
758 | { |
---|
759 | dest = _name; |
---|
760 | |
---|
761 | #ifdef POSITION |
---|
762 | _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j), |
---|
763 | dest,"insert_rob_"+toString(i)+"_"+toString(j)); |
---|
764 | #endif |
---|
765 | |
---|
766 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
767 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
768 | PORT_MAP(_component,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
769 | dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
770 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE", |
---|
771 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE"); |
---|
772 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE", |
---|
773 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE"); |
---|
774 | |
---|
775 | // out_INSERT_ROB_GPR_STATUS_VAL - gpr_status. in_WRITE_VAL |
---|
776 | // in_INSERT_ROB_GPR_STATUS_ACK - gpr_status. out_WRITE_ACK |
---|
777 | // out_INSERT_ROB_GPR_STATUS_DATA- gpr_status. in_WRITE_DATA |
---|
778 | // out_INSERT_ROB_SPR_STATUS_VAL - spr_status. in_WRITE_VAL |
---|
779 | // in_INSERT_ROB_SPR_STATUS_ACK - spr_status. out_WRITE_ACK |
---|
780 | // in_INSERT_ROB_SPR_STATUS_DATA- spr_status. out_WRITE_DATA |
---|
781 | } |
---|
782 | } |
---|
783 | }// glue |
---|
784 | |
---|
785 | #if DEBUG_Register_unit == true |
---|
786 | _component->test_map (); |
---|
787 | #endif |
---|
788 | |
---|
789 | #ifdef POSITION |
---|
790 | if (usage_is_set(_usage,USE_POSITION)) |
---|
791 | _component->generate_file(); |
---|
792 | #endif |
---|
793 | |
---|
794 | // std::cout << *_component << std::endl; |
---|
795 | |
---|
796 | log_printf(FUNC,Register_unit,FUNCTION,"End"); |
---|
797 | }; |
---|
798 | |
---|
799 | }; // end namespace register_unit |
---|
800 | }; // end namespace execute_loop |
---|
801 | }; // end namespace multi_execute_loop |
---|
802 | }; // end namespace core |
---|
803 | |
---|
804 | }; // end namespace behavioural |
---|
805 | }; // end namespace morpheo |
---|