source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp @ 62

Last change on this file since 62 was 62, checked in by rosiere, 17 years ago

Modification en profondeur de Component-port_map.
Compilation ok pour Register_unit ... a tester (systemC et vhdl)

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