1 | /* |
---|
2 | * $Id: Register_unit_allocation.cpp 136 2009-10-20 18:52:15Z 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 "issue" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
109 | { |
---|
110 | ALLOC1_INTERFACE_BEGIN("issue",IN,WEST,_("Interface to update status (issue)"),_param->_nb_inst_issue); |
---|
111 | |
---|
112 | ALLOC1_VALACK_IN ( in_ISSUE_VAL ,VAL); |
---|
113 | ALLOC1_VALACK_OUT(out_ISSUE_ACK ,ACK); |
---|
114 | ALLOC1_SIGNAL_IN ( in_ISSUE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
115 | ALLOC1_SIGNAL_IN ( in_ISSUE_RD_USE ,"rd_use" ,Tcontrol_t ,1 ); |
---|
116 | ALLOC1_SIGNAL_IN ( in_ISSUE_RD_NUM_REG ,"rd_num_reg" ,Tgeneral_address_t,_param->_size_gpr_address ); |
---|
117 | ALLOC1_SIGNAL_IN ( in_ISSUE_RE_USE ,"re_use" ,Tcontrol_t ,1 ); |
---|
118 | ALLOC1_SIGNAL_IN ( in_ISSUE_RE_NUM_REG ,"re_num_reg" ,Tspecial_address_t,_param->_size_spr_address ); |
---|
119 | |
---|
120 | ALLOC1_INTERFACE_END(_param->_nb_inst_issue); |
---|
121 | } |
---|
122 | |
---|
123 | // // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
124 | // { |
---|
125 | // ALLOC2_INTERFACE_BEGIN("insert_rob",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
126 | |
---|
127 | // _ALLOC2_VALACK_IN ( in_INSERT_ROB_VAL ,VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
128 | // _ALLOC2_VALACK_OUT(out_INSERT_ROB_ACK ,ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
129 | // _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_USE ,"rd_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
130 | // _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]); |
---|
131 | // _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_USE ,"re_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
132 | // _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]); |
---|
133 | |
---|
134 | // ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
135 | // } |
---|
136 | |
---|
137 | // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
138 | // in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
139 | // out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
140 | // in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
141 | // in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
142 | // in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
143 | // in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
144 | // in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
145 | // in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
146 | // in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
147 | // in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
148 | |
---|
149 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
150 | // { |
---|
151 | // uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
152 | |
---|
153 | // in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
154 | // out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t ) * [x]; |
---|
155 | // in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
156 | // in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
157 | // in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
158 | // in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
159 | // in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
160 | // in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
161 | // in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
162 | // in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
163 | |
---|
164 | // for (uint32_t j=0; j<x; j++) |
---|
165 | // { |
---|
166 | // Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j) |
---|
167 | // #ifdef POSITION |
---|
168 | // ,IN |
---|
169 | // ,WEST |
---|
170 | // ,"Interface to update status (retire)" |
---|
171 | // #endif |
---|
172 | // ); |
---|
173 | |
---|
174 | |
---|
175 | // in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); |
---|
176 | // out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); |
---|
177 | // in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_old_use" , 1); |
---|
178 | // in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address); |
---|
179 | // in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_old_use" , 1); |
---|
180 | // in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address); |
---|
181 | // in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_new_use" , 1); |
---|
182 | // in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address); |
---|
183 | // in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_new_use" , 1); |
---|
184 | // in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address); |
---|
185 | // } |
---|
186 | // } |
---|
187 | |
---|
188 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
189 | |
---|
190 | std::string name; |
---|
191 | |
---|
192 | component_gpr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
193 | component_gpr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
194 | component_spr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
195 | component_spr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
196 | |
---|
197 | // component_gpr = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked * [_param->_nb_ooo_engine]; |
---|
198 | // component_gpr_status = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic * [_param->_nb_ooo_engine]; |
---|
199 | // component_spr = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked * [_param->_nb_ooo_engine]; |
---|
200 | // component_spr_status = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic * [_param->_nb_ooo_engine]; |
---|
201 | |
---|
202 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
203 | { |
---|
204 | name = _name+"_gpr_"+toString(i); |
---|
205 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
206 | |
---|
207 | component_gpr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
208 | // component_gpr [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked |
---|
209 | (name.c_str() |
---|
210 | #ifdef STATISTICS |
---|
211 | ,param_statistics |
---|
212 | #endif |
---|
213 | ,_param->_param_gpr [i]//->_param_registerfile_multi_banked |
---|
214 | ,_usage |
---|
215 | ); |
---|
216 | |
---|
217 | _component->set_component (component_gpr[i]->_component |
---|
218 | #ifdef POSITION |
---|
219 | , 50 |
---|
220 | , 50 |
---|
221 | , 10 |
---|
222 | , 10 |
---|
223 | #endif |
---|
224 | ); |
---|
225 | |
---|
226 | |
---|
227 | name = _name+"_gpr_status_"+toString(i); |
---|
228 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
229 | |
---|
230 | component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
231 | // component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic |
---|
232 | (name.c_str() |
---|
233 | #ifdef STATISTICS |
---|
234 | ,param_statistics |
---|
235 | #endif |
---|
236 | ,_param->_param_gpr_status [i]//->_param_registerfile_monolithic |
---|
237 | ,_usage |
---|
238 | ); |
---|
239 | |
---|
240 | _component->set_component (component_gpr_status[i]->_component |
---|
241 | #ifdef POSITION |
---|
242 | , 50 |
---|
243 | , 50 |
---|
244 | , 10 |
---|
245 | , 10 |
---|
246 | #endif |
---|
247 | ); |
---|
248 | |
---|
249 | |
---|
250 | name = _name+"_spr_"+toString(i); |
---|
251 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
252 | |
---|
253 | component_spr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
254 | // component_spr [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked |
---|
255 | (name.c_str() |
---|
256 | #ifdef STATISTICS |
---|
257 | ,param_statistics |
---|
258 | #endif |
---|
259 | ,_param->_param_spr [i]//->_param_registerfile_multi_banked |
---|
260 | ,_usage |
---|
261 | ); |
---|
262 | |
---|
263 | _component->set_component (component_spr[i]->_component |
---|
264 | #ifdef POSITION |
---|
265 | , 50 |
---|
266 | , 50 |
---|
267 | , 10 |
---|
268 | , 10 |
---|
269 | #endif |
---|
270 | ); |
---|
271 | |
---|
272 | name = _name+"_spr_status_"+toString(i); |
---|
273 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
274 | |
---|
275 | component_spr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
276 | // component_spr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic::RegisterFile_Monolithic |
---|
277 | (name.c_str() |
---|
278 | #ifdef STATISTICS |
---|
279 | ,param_statistics |
---|
280 | #endif |
---|
281 | ,_param->_param_spr_status [i]//->_param_registerfile_monolithic |
---|
282 | ,_usage |
---|
283 | ); |
---|
284 | |
---|
285 | _component->set_component (component_spr_status[i]->_component |
---|
286 | #ifdef POSITION |
---|
287 | , 50 |
---|
288 | , 50 |
---|
289 | , 10 |
---|
290 | , 10 |
---|
291 | #endif |
---|
292 | ); |
---|
293 | } |
---|
294 | |
---|
295 | { |
---|
296 | name = _name+"_glue"; |
---|
297 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
298 | |
---|
299 | component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Register_unit_Glue::Register_unit_Glue |
---|
300 | (name.c_str() |
---|
301 | #ifdef STATISTICS |
---|
302 | ,param_statistics |
---|
303 | #endif |
---|
304 | ,_param->_param_glue |
---|
305 | ,_usage |
---|
306 | ); |
---|
307 | |
---|
308 | _component->set_component (component_glue->_component |
---|
309 | #ifdef POSITION |
---|
310 | , 50 |
---|
311 | , 50 |
---|
312 | , 10 |
---|
313 | , 10 |
---|
314 | #endif |
---|
315 | ); |
---|
316 | } |
---|
317 | |
---|
318 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
319 | std::string src,dest; |
---|
320 | |
---|
321 | // ------------------------------------------------------------------- |
---|
322 | // -----[ gpr ]------------------------------------------------------- |
---|
323 | // ------------------------------------------------------------------- |
---|
324 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
325 | { |
---|
326 | src = _name+"_gpr_"+toString(i); |
---|
327 | |
---|
328 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
329 | |
---|
330 | // -----[ instance "" ]----------------------------------------------- |
---|
331 | { |
---|
332 | dest = _name; |
---|
333 | #ifdef POSITION |
---|
334 | _component->interface_map (src ,"", |
---|
335 | dest,""); |
---|
336 | #endif |
---|
337 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
338 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
339 | } |
---|
340 | |
---|
341 | // -----[ instance "read" ]------------------------------------------- |
---|
342 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
343 | { |
---|
344 | dest = _name+"_glue"; |
---|
345 | |
---|
346 | #ifdef POSITION |
---|
347 | _component->interface_map (src , "read_"+toString(j), |
---|
348 | dest,"gpr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
349 | #endif |
---|
350 | |
---|
351 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
352 | dest,"out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
353 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
354 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
355 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
356 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
357 | |
---|
358 | dest = _name; |
---|
359 | |
---|
360 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
361 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
362 | } |
---|
363 | |
---|
364 | // -----[ instance "write" ]------------------------------------------ |
---|
365 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
366 | { |
---|
367 | dest = _name+"_glue"; |
---|
368 | |
---|
369 | #ifdef POSITION |
---|
370 | _component->interface_map (src , "write_"+toString(j), |
---|
371 | dest,"gpr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
372 | #endif |
---|
373 | |
---|
374 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
375 | dest,"out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
376 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
377 | dest, "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
378 | |
---|
379 | dest = _name; |
---|
380 | |
---|
381 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
382 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
383 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
384 | dest, "in_GPR_WRITE_"+toString(j)+"_DATA"); |
---|
385 | } |
---|
386 | }// gpr |
---|
387 | |
---|
388 | // ------------------------------------------------------------------- |
---|
389 | // -----[ gpr_status ]------------------------------------------------ |
---|
390 | // ------------------------------------------------------------------- |
---|
391 | { |
---|
392 | uint32_t x=0; |
---|
393 | |
---|
394 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
395 | { |
---|
396 | src = _name+"_gpr_status_"+toString(i); |
---|
397 | |
---|
398 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
399 | |
---|
400 | { |
---|
401 | dest = _name; |
---|
402 | #ifdef POSITION |
---|
403 | _component->interface_map (src ,"", |
---|
404 | dest,""); |
---|
405 | #endif |
---|
406 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
407 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
408 | } |
---|
409 | |
---|
410 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
411 | { |
---|
412 | dest = _name+"_glue"; |
---|
413 | |
---|
414 | #ifdef POSITION |
---|
415 | _component->interface_map (src , "read_"+toString(j), |
---|
416 | dest,"gpr_read_status_"+toString(i)+"_"+toString(j)); |
---|
417 | #endif |
---|
418 | |
---|
419 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
420 | dest,"out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
421 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
422 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
423 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
424 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
425 | |
---|
426 | dest = _name; |
---|
427 | |
---|
428 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
429 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
430 | } |
---|
431 | |
---|
432 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
433 | { |
---|
434 | dest = _name+"_glue"; |
---|
435 | |
---|
436 | #ifdef POSITION |
---|
437 | _component->interface_map (src , "write_"+toString(x), |
---|
438 | dest,"gpr_write_status_"+toString(i)+"_"+toString(j)); |
---|
439 | #endif |
---|
440 | |
---|
441 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
442 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
443 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
444 | dest, "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
445 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
446 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
447 | // dest,"out_CONST_1"); |
---|
448 | |
---|
449 | dest = _name; |
---|
450 | |
---|
451 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
452 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
453 | |
---|
454 | x++; |
---|
455 | } |
---|
456 | |
---|
457 | // for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
458 | // { |
---|
459 | // dest = _name+"_glue"; |
---|
460 | |
---|
461 | // #ifdef POSITION |
---|
462 | // _component->interface_map (src , "write_"+toString(j), |
---|
463 | // dest,"insert_rob_gpr_status_"+toString(i)+"_"+toString(j)); |
---|
464 | // #endif |
---|
465 | |
---|
466 | // COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
467 | // dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
468 | // COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
469 | // dest, "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
470 | // COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
471 | // dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
472 | // // dest,"out_CONST_0"); |
---|
473 | |
---|
474 | // dest = _name; |
---|
475 | |
---|
476 | // PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
477 | // dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); |
---|
478 | |
---|
479 | // x++; |
---|
480 | // } |
---|
481 | |
---|
482 | for (uint32_t j=0; j<_param->_nb_inst_issue; j++) |
---|
483 | { |
---|
484 | dest = _name+"_glue"; |
---|
485 | |
---|
486 | #ifdef POSITION |
---|
487 | _component->interface_map (src ,"write_"+toString(j), |
---|
488 | dest,"issue_gpr_status_"+toString(i)+"_"+toString(j)); |
---|
489 | #endif |
---|
490 | |
---|
491 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
492 | dest,"out_ISSUE_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
493 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
494 | dest, "in_ISSUE_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
495 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
496 | dest,"out_ISSUE_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
497 | // dest,"out_CONST_0"); |
---|
498 | |
---|
499 | dest = _name; |
---|
500 | |
---|
501 | PORT_MAP (_component,src , "in_WRITE_"+toString(x)+"_ADDRESS", |
---|
502 | dest, "in_ISSUE_"+toString(j)+"_RD_NUM_REG"); |
---|
503 | |
---|
504 | x++; |
---|
505 | } |
---|
506 | } |
---|
507 | }// gpr_status |
---|
508 | |
---|
509 | // ------------------------------------------------------------------- |
---|
510 | // -----[ spr ]------------------------------------------------------- |
---|
511 | // ------------------------------------------------------------------- |
---|
512 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
513 | { |
---|
514 | src = _name+"_spr_"+toString(i); |
---|
515 | |
---|
516 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
517 | |
---|
518 | { |
---|
519 | dest = _name; |
---|
520 | #ifdef POSITION |
---|
521 | _component->interface_map (src ,"", |
---|
522 | dest,""); |
---|
523 | #endif |
---|
524 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
525 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
526 | } |
---|
527 | |
---|
528 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
529 | { |
---|
530 | dest = _name+"_glue"; |
---|
531 | |
---|
532 | #ifdef POSITION |
---|
533 | _component->interface_map (src , "read_"+toString(j), |
---|
534 | dest,"spr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
535 | #endif |
---|
536 | |
---|
537 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
538 | dest,"out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
539 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
540 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
541 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
542 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
543 | |
---|
544 | dest = _name; |
---|
545 | |
---|
546 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
547 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
548 | } |
---|
549 | |
---|
550 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
551 | { |
---|
552 | dest = _name+"_glue"; |
---|
553 | |
---|
554 | #ifdef POSITION |
---|
555 | _component->interface_map (src , "write_"+toString(j), |
---|
556 | dest,"spr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
557 | #endif |
---|
558 | |
---|
559 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
560 | dest,"out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
561 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
562 | dest, "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
563 | |
---|
564 | dest = _name; |
---|
565 | |
---|
566 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
567 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
568 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
569 | dest, "in_SPR_WRITE_"+toString(j)+"_DATA"); |
---|
570 | } |
---|
571 | }// spr |
---|
572 | |
---|
573 | // ------------------------------------------------------------------- |
---|
574 | // -----[ spr_status ]------------------------------------------------ |
---|
575 | // ------------------------------------------------------------------- |
---|
576 | { |
---|
577 | uint32_t x=0; |
---|
578 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
579 | { |
---|
580 | src = _name+"_spr_status_"+toString(i); |
---|
581 | |
---|
582 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
583 | |
---|
584 | { |
---|
585 | dest = _name; |
---|
586 | #ifdef POSITION |
---|
587 | _component->interface_map (src ,"", |
---|
588 | dest,""); |
---|
589 | #endif |
---|
590 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
591 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
592 | } |
---|
593 | |
---|
594 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
595 | { |
---|
596 | dest = _name+"_glue"; |
---|
597 | |
---|
598 | #ifdef POSITION |
---|
599 | _component->interface_map (src , "read_"+toString(j), |
---|
600 | dest,"spr_read_status_"+toString(i)+"_"+toString(j)); |
---|
601 | #endif |
---|
602 | |
---|
603 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
604 | dest,"out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
605 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
606 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
607 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
608 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
609 | |
---|
610 | dest = _name; |
---|
611 | |
---|
612 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
613 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
614 | } |
---|
615 | |
---|
616 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
617 | { |
---|
618 | dest = _name+"_glue"; |
---|
619 | |
---|
620 | #ifdef POSITION |
---|
621 | _component->interface_map (src , "write_"+toString(x), |
---|
622 | dest,"spr_write_status_"+toString(i)+"_"+toString(j)); |
---|
623 | #endif |
---|
624 | |
---|
625 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
626 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
627 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
628 | dest, "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
629 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
630 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
631 | // dest,"out_CONST_1"); |
---|
632 | |
---|
633 | dest = _name; |
---|
634 | |
---|
635 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
636 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
637 | |
---|
638 | x++; |
---|
639 | } |
---|
640 | |
---|
641 | // for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
642 | // { |
---|
643 | // dest = _name+"_glue"; |
---|
644 | |
---|
645 | // #ifdef POSITION |
---|
646 | // _component->interface_map (src , "write_"+toString(x), |
---|
647 | // dest,"insert_rob_spr_status_"+toString(i)+"_"+toString(j)); |
---|
648 | // #endif |
---|
649 | |
---|
650 | // COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
651 | // dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
652 | // COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
653 | // dest, "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
654 | // COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
655 | // dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
656 | // // dest,"out_CONST_0"); |
---|
657 | |
---|
658 | // dest = _name; |
---|
659 | |
---|
660 | // PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
661 | // dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); |
---|
662 | |
---|
663 | // x++; |
---|
664 | // } |
---|
665 | |
---|
666 | for (uint32_t j=0; j<_param->_nb_inst_issue; j++) |
---|
667 | { |
---|
668 | dest = _name+"_glue"; |
---|
669 | |
---|
670 | #ifdef POSITION |
---|
671 | _component->interface_map (src , "write_"+toString(x), |
---|
672 | dest,"issue_spr_status_"+toString(i)+"_"+toString(j)); |
---|
673 | #endif |
---|
674 | |
---|
675 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
676 | dest,"out_ISSUE_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
677 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
678 | dest, "in_ISSUE_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
679 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
680 | dest,"out_ISSUE_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
681 | // dest,"out_CONST_0"); |
---|
682 | |
---|
683 | dest = _name; |
---|
684 | |
---|
685 | PORT_MAP (_component,src , "in_WRITE_"+toString(x)+"_ADDRESS", |
---|
686 | dest, "in_ISSUE_"+toString(j)+"_RE_NUM_REG"); |
---|
687 | |
---|
688 | x++; |
---|
689 | } |
---|
690 | |
---|
691 | } |
---|
692 | }// spr_status |
---|
693 | |
---|
694 | // ------------------------------------------------------------------- |
---|
695 | // -----[ glue ]------------------------------------------------------ |
---|
696 | // ------------------------------------------------------------------- |
---|
697 | { |
---|
698 | src = _name+"_glue"; |
---|
699 | |
---|
700 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
701 | |
---|
702 | { |
---|
703 | dest = _name; |
---|
704 | #ifdef POSITION |
---|
705 | _component->interface_map (src ,"", |
---|
706 | dest,""); |
---|
707 | #endif |
---|
708 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
709 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
710 | } |
---|
711 | |
---|
712 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
713 | { |
---|
714 | dest = _name; |
---|
715 | |
---|
716 | #ifdef POSITION |
---|
717 | _component->interface_map (src ,"gpr_read_"+toString(j), |
---|
718 | dest,"gpr_read_"+toString(j)); |
---|
719 | #endif |
---|
720 | |
---|
721 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_VAL", |
---|
722 | dest, "in_GPR_READ_"+toString(j)+"_VAL"); |
---|
723 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_ACK", |
---|
724 | dest,"out_GPR_READ_"+toString(j)+"_ACK"); |
---|
725 | if (_param->_have_port_ooo_engine_id == true) |
---|
726 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
727 | dest, "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
728 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA", |
---|
729 | dest,"out_GPR_READ_"+toString(j)+"_DATA"); |
---|
730 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA_VAL", |
---|
731 | dest,"out_GPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
732 | |
---|
733 | // out_GPR_READ_REGISTERFILE_VAL - gpr. in_READ_VAL |
---|
734 | // in_GPR_READ_REGISTERFILE_ACK - gpr.out_READ_ACK |
---|
735 | // in_GPR_READ_REGISTERFILE_DATA - gpr.out_READ_DATA |
---|
736 | |
---|
737 | // out_GPR_READ_STATUS_VAL - gpr. in_READ_VAL |
---|
738 | // in_GPR_READ_STATUS_ACK - gpr.out_READ_ACK |
---|
739 | // in_GPR_READ_STATUS_DATA_VAL - gpr.out_READ_DATA |
---|
740 | } |
---|
741 | |
---|
742 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
743 | { |
---|
744 | dest = _name; |
---|
745 | |
---|
746 | #ifdef POSITION |
---|
747 | _component->interface_map (src ,"gpr_write_"+toString(j), |
---|
748 | dest,"gpr_write_"+toString(j)); |
---|
749 | #endif |
---|
750 | |
---|
751 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_VAL", |
---|
752 | dest, "in_GPR_WRITE_"+toString(j)+"_VAL"); |
---|
753 | PORT_MAP(_component,src ,"out_GPR_WRITE_"+toString(j)+"_ACK", |
---|
754 | dest,"out_GPR_WRITE_"+toString(j)+"_ACK"); |
---|
755 | if (_param->_have_port_ooo_engine_id == true) |
---|
756 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
757 | dest, "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
758 | |
---|
759 | // out_GPR_WRITE_REGISTERFILE_VAL - gpr. in_WRITE_VAL |
---|
760 | // in_GPR_WRITE_REGISTERFILE_ACK - gpr.out_WRITE_ACK |
---|
761 | // out_GPR_WRITE_STATUS_VAL - gpr. in_WRITE_VAL |
---|
762 | // in_GPR_WRITE_STATUS_ACK - gpr.out_WRITE_ACK |
---|
763 | // out_GPR_WRITE_STATUS_DATA - gpr. in_WRITE_DATA |
---|
764 | } |
---|
765 | |
---|
766 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
767 | { |
---|
768 | dest = _name; |
---|
769 | |
---|
770 | #ifdef POSITION |
---|
771 | _component->interface_map (src ,"spr_read_"+toString(j), |
---|
772 | dest,"spr_read_"+toString(j)); |
---|
773 | #endif |
---|
774 | |
---|
775 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_VAL", |
---|
776 | dest, "in_SPR_READ_"+toString(j)+"_VAL"); |
---|
777 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_ACK", |
---|
778 | dest,"out_SPR_READ_"+toString(j)+"_ACK"); |
---|
779 | if (_param->_have_port_ooo_engine_id == true) |
---|
780 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
781 | dest, "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
782 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA", |
---|
783 | dest,"out_SPR_READ_"+toString(j)+"_DATA"); |
---|
784 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA_VAL", |
---|
785 | dest,"out_SPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
786 | |
---|
787 | // out_SPR_READ_REGISTERFILE_VAL - spr. in_READ_VAL |
---|
788 | // in_SPR_READ_REGISTERFILE_ACK - spr.out_READ_ACK |
---|
789 | // in_SPR_READ_REGISTERFILE_DATA - spr.out_READ_DATA |
---|
790 | |
---|
791 | // out_SPR_READ_STATUS_VAL - spr. in_READ_VAL |
---|
792 | // in_SPR_READ_STATUS_ACK - spr.out_READ_ACK |
---|
793 | // in_SPR_READ_STATUS_DATA_VAL - spr.out_READ_DATA |
---|
794 | } |
---|
795 | |
---|
796 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
797 | { |
---|
798 | dest = _name; |
---|
799 | |
---|
800 | #ifdef POSITION |
---|
801 | _component->interface_map (src ,"spr_write_"+toString(j), |
---|
802 | dest,"spr_write_"+toString(j)); |
---|
803 | #endif |
---|
804 | |
---|
805 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_VAL", |
---|
806 | dest, "in_SPR_WRITE_"+toString(j)+"_VAL"); |
---|
807 | PORT_MAP(_component,src ,"out_SPR_WRITE_"+toString(j)+"_ACK", |
---|
808 | dest,"out_SPR_WRITE_"+toString(j)+"_ACK"); |
---|
809 | if (_param->_have_port_ooo_engine_id == true) |
---|
810 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
811 | dest, "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
812 | |
---|
813 | // out_SPR_WRITE_REGISTERFILE_VAL - spr. in_WRITE_VAL |
---|
814 | // in_SPR_WRITE_REGISTERFILE_ACK - spr.out_WRITE_ACK |
---|
815 | // out_SPR_WRITE_STATUS_VAL - spr. in_WRITE_VAL |
---|
816 | // in_SPR_WRITE_STATUS_ACK - spr.out_WRITE_ACK |
---|
817 | // out_SPR_WRITE_STATUS_DATA - spr. in_WRITE_DATA |
---|
818 | } |
---|
819 | |
---|
820 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
821 | // { |
---|
822 | // uint32_t x = _param->_nb_inst_insert_rob [i]; |
---|
823 | |
---|
824 | // for (uint32_t j=0; j<x; j++) |
---|
825 | // { |
---|
826 | // dest = _name; |
---|
827 | |
---|
828 | // #ifdef POSITION |
---|
829 | // _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j), |
---|
830 | // dest,"insert_rob_"+toString(i)+"_"+toString(j)); |
---|
831 | // #endif |
---|
832 | |
---|
833 | // PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
834 | // dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
835 | // PORT_MAP(_component,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
836 | // dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
837 | // PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE", |
---|
838 | // dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE"); |
---|
839 | // PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE", |
---|
840 | // dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE"); |
---|
841 | |
---|
842 | // // out_INSERT_ROB_GPR_STATUS_VAL - gpr_status. in_WRITE_VAL |
---|
843 | // // in_INSERT_ROB_GPR_STATUS_ACK - gpr_status. out_WRITE_ACK |
---|
844 | // // out_INSERT_ROB_GPR_STATUS_DATA- gpr_status. in_WRITE_DATA |
---|
845 | // // out_INSERT_ROB_SPR_STATUS_VAL - spr_status. in_WRITE_VAL |
---|
846 | // // in_INSERT_ROB_SPR_STATUS_ACK - spr_status. out_WRITE_ACK |
---|
847 | // // in_INSERT_ROB_SPR_STATUS_DATA- spr_status. out_WRITE_DATA |
---|
848 | // } |
---|
849 | // } |
---|
850 | |
---|
851 | for (uint32_t i=0; i<_param->_nb_inst_issue; i++) |
---|
852 | { |
---|
853 | dest = _name; |
---|
854 | |
---|
855 | #ifdef POSITION |
---|
856 | _component->interface_map (src ,"issue_"+toString(i), |
---|
857 | dest,"issue_"+toString(i)); |
---|
858 | #endif |
---|
859 | |
---|
860 | PORT_MAP(_component,src , "in_ISSUE_"+toString(i)+"_VAL", |
---|
861 | dest, "in_ISSUE_"+toString(i)+"_VAL"); |
---|
862 | PORT_MAP(_component,src ,"out_ISSUE_"+toString(i)+"_ACK", |
---|
863 | dest,"out_ISSUE_"+toString(i)+"_ACK"); |
---|
864 | if (_param->_have_port_ooo_engine_id == true) |
---|
865 | PORT_MAP(_component,src , "in_ISSUE_"+toString(i)+"_OOO_ENGINE_ID", |
---|
866 | dest, "in_ISSUE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
867 | PORT_MAP(_component,src , "in_ISSUE_"+toString(i)+"_RD_USE", |
---|
868 | dest, "in_ISSUE_"+toString(i)+"_RD_USE"); |
---|
869 | PORT_MAP(_component,src , "in_ISSUE_"+toString(i)+"_RE_USE", |
---|
870 | dest, "in_ISSUE_"+toString(i)+"_RE_USE"); |
---|
871 | |
---|
872 | // out_ISSUE_GPR_STATUS_VAL - gpr_status. in_WRITE_VAL |
---|
873 | // in_ISSUE_GPR_STATUS_ACK - gpr_status.out_WRITE_ACK |
---|
874 | // out_ISSUE_GPR_STATUS_DATA- gpr_status. in_WRITE_DATA |
---|
875 | // out_ISSUE_SPR_STATUS_VAL - spr_status. in_WRITE_VAL |
---|
876 | // in_ISSUE_SPR_STATUS_ACK - spr_status.out_WRITE_ACK |
---|
877 | // in_ISSUE_SPR_STATUS_DATA- spr_status.out_WRITE_DATA |
---|
878 | } |
---|
879 | |
---|
880 | }// glue |
---|
881 | |
---|
882 | #if DEBUG_Register_unit == true |
---|
883 | _component->test_map (); |
---|
884 | #endif |
---|
885 | |
---|
886 | #ifdef POSITION |
---|
887 | if (usage_is_set(_usage,USE_POSITION)) |
---|
888 | _component->generate_file(); |
---|
889 | #endif |
---|
890 | |
---|
891 | // std::cout << *_component << std::endl; |
---|
892 | |
---|
893 | log_printf(FUNC,Register_unit,FUNCTION,"End"); |
---|
894 | }; |
---|
895 | |
---|
896 | }; // end namespace register_unit |
---|
897 | }; // end namespace execute_loop |
---|
898 | }; // end namespace multi_execute_loop |
---|
899 | }; // end namespace core |
---|
900 | |
---|
901 | }; // end namespace behavioural |
---|
902 | }; // end namespace morpheo |
---|