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