[60] | 1 | /* |
---|
| 2 | * $Id: Register_unit_allocation.cpp 128 2009-06-26 08:43:23Z 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 ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[128] | 294 | std::string src,dest; |
---|
[75] | 295 | |
---|
[60] | 296 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 297 | { |
---|
[128] | 298 | src = _name+"_gpr_"+toString(i); |
---|
[60] | 299 | |
---|
[128] | 300 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[60] | 301 | |
---|
[128] | 302 | { |
---|
| 303 | dest = _name; |
---|
[60] | 304 | #ifdef POSITION |
---|
[128] | 305 | _component->interface_map (src ,"", |
---|
| 306 | dest,""); |
---|
[60] | 307 | #endif |
---|
[128] | 308 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 309 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 310 | } |
---|
[60] | 311 | |
---|
| 312 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 313 | { |
---|
[128] | 314 | dest = _name+"_glue"; |
---|
| 315 | |
---|
| 316 | #ifdef POSITION |
---|
| 317 | _component->interface_map (src , "read_"+toString(j), |
---|
| 318 | dest,"gpr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 319 | #endif |
---|
| 320 | |
---|
| 321 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 322 | dest,"out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 323 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 324 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 325 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 326 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 327 | |
---|
| 328 | dest = _name; |
---|
| 329 | |
---|
| 330 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 331 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 332 | } |
---|
[128] | 333 | |
---|
[60] | 334 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 335 | { |
---|
[128] | 336 | dest = _name+"_glue"; |
---|
| 337 | |
---|
| 338 | #ifdef POSITION |
---|
| 339 | _component->interface_map (src , "write_"+toString(j), |
---|
| 340 | dest,"gpr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 341 | #endif |
---|
| 342 | |
---|
| 343 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
| 344 | dest,"out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 345 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
| 346 | dest, "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 347 | |
---|
| 348 | dest = _name; |
---|
| 349 | |
---|
| 350 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
| 351 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
| 352 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
| 353 | dest, "in_GPR_WRITE_"+toString(j)+"_DATA"); |
---|
[60] | 354 | } |
---|
| 355 | |
---|
| 356 | }// gpr |
---|
| 357 | |
---|
| 358 | { |
---|
| 359 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 360 | { |
---|
[128] | 361 | src = _name+"_gpr_status_"+toString(i); |
---|
[60] | 362 | |
---|
[128] | 363 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 364 | |
---|
| 365 | { |
---|
| 366 | dest = _name; |
---|
[60] | 367 | #ifdef POSITION |
---|
[128] | 368 | _component->interface_map (src ,"", |
---|
| 369 | dest,""); |
---|
[60] | 370 | #endif |
---|
[128] | 371 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 372 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 373 | } |
---|
| 374 | |
---|
[60] | 375 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 376 | { |
---|
[128] | 377 | dest = _name+"_glue"; |
---|
| 378 | |
---|
| 379 | #ifdef POSITION |
---|
| 380 | _component->interface_map (src , "read_"+toString(j), |
---|
| 381 | dest,"gpr_read_status_"+toString(i)+"_"+toString(j)); |
---|
| 382 | #endif |
---|
| 383 | |
---|
| 384 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 385 | dest,"out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 386 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 387 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 388 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 389 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
| 390 | |
---|
| 391 | dest = _name; |
---|
| 392 | |
---|
| 393 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 394 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 395 | } |
---|
| 396 | |
---|
| 397 | uint32_t x=0; |
---|
| 398 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 399 | { |
---|
[128] | 400 | dest = _name+"_glue"; |
---|
| 401 | |
---|
| 402 | #ifdef POSITION |
---|
| 403 | _component->interface_map (src , "write_"+toString(j), |
---|
| 404 | dest,"gpr_write_status_"+toString(i)+"_"+toString(j)); |
---|
| 405 | #endif |
---|
[78] | 406 | |
---|
[128] | 407 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 408 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 409 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 410 | dest, "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 411 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 412 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 413 | // dest,"out_CONST_1"); |
---|
| 414 | |
---|
| 415 | dest = _name; |
---|
| 416 | |
---|
| 417 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 418 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
[78] | 419 | |
---|
[128] | 420 | x++; |
---|
[60] | 421 | } |
---|
| 422 | |
---|
| 423 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
| 424 | { |
---|
[128] | 425 | dest = _name+"_glue"; |
---|
| 426 | |
---|
| 427 | #ifdef POSITION |
---|
| 428 | _component->interface_map (src , "write_"+toString(j), |
---|
| 429 | dest,"insert_rob_gpr_status_"+toString(i)+"_"+toString(j)); |
---|
| 430 | #endif |
---|
[60] | 431 | |
---|
[128] | 432 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 433 | dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 434 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 435 | dest, "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 436 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 437 | dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 438 | // dest,"out_CONST_0"); |
---|
| 439 | |
---|
| 440 | dest = _name; |
---|
| 441 | |
---|
| 442 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 443 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); |
---|
[60] | 444 | |
---|
[128] | 445 | x++; |
---|
[60] | 446 | } |
---|
| 447 | |
---|
| 448 | } |
---|
| 449 | }// gpr_status |
---|
| 450 | |
---|
| 451 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 452 | { |
---|
[128] | 453 | src = _name+"_spr_"+toString(i); |
---|
[60] | 454 | |
---|
[128] | 455 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[60] | 456 | |
---|
[128] | 457 | { |
---|
| 458 | dest = _name; |
---|
[60] | 459 | #ifdef POSITION |
---|
[128] | 460 | _component->interface_map (src ,"", |
---|
| 461 | dest,""); |
---|
[60] | 462 | #endif |
---|
[128] | 463 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 464 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 465 | } |
---|
[60] | 466 | |
---|
| 467 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 468 | { |
---|
[128] | 469 | dest = _name+"_glue"; |
---|
| 470 | |
---|
| 471 | #ifdef POSITION |
---|
| 472 | _component->interface_map (src , "read_"+toString(j), |
---|
| 473 | dest,"spr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 474 | #endif |
---|
| 475 | |
---|
| 476 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 477 | dest,"out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 478 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 479 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 480 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 481 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 482 | |
---|
| 483 | dest = _name; |
---|
| 484 | |
---|
| 485 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 486 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 487 | } |
---|
[128] | 488 | |
---|
[60] | 489 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 490 | { |
---|
[128] | 491 | dest = _name+"_glue"; |
---|
| 492 | |
---|
| 493 | #ifdef POSITION |
---|
| 494 | _component->interface_map (src , "write_"+toString(j), |
---|
| 495 | dest,"spr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 496 | #endif |
---|
| 497 | |
---|
| 498 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
| 499 | dest,"out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 500 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
| 501 | dest, "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 502 | |
---|
| 503 | dest = _name; |
---|
| 504 | |
---|
| 505 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
| 506 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
| 507 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
| 508 | dest, "in_SPR_WRITE_"+toString(j)+"_DATA"); |
---|
[60] | 509 | } |
---|
| 510 | |
---|
| 511 | }// spr |
---|
| 512 | |
---|
| 513 | { |
---|
| 514 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 515 | { |
---|
[128] | 516 | src = _name+"_spr_status_"+toString(i); |
---|
[60] | 517 | |
---|
[128] | 518 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[88] | 519 | |
---|
[128] | 520 | { |
---|
| 521 | dest = _name; |
---|
[60] | 522 | #ifdef POSITION |
---|
[128] | 523 | _component->interface_map (src ,"", |
---|
| 524 | dest,""); |
---|
[60] | 525 | #endif |
---|
[128] | 526 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 527 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 528 | } |
---|
| 529 | |
---|
[60] | 530 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 531 | { |
---|
[128] | 532 | dest = _name+"_glue"; |
---|
| 533 | |
---|
| 534 | #ifdef POSITION |
---|
| 535 | _component->interface_map (src , "read_"+toString(j), |
---|
| 536 | dest,"spr_read_status_"+toString(i)+"_"+toString(j)); |
---|
| 537 | #endif |
---|
| 538 | |
---|
| 539 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 540 | dest,"out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 541 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 542 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 543 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 544 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
| 545 | |
---|
| 546 | dest = _name; |
---|
| 547 | |
---|
| 548 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 549 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 550 | } |
---|
| 551 | |
---|
| 552 | uint32_t x=0; |
---|
| 553 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 554 | { |
---|
[128] | 555 | dest = _name+"_glue"; |
---|
| 556 | |
---|
| 557 | #ifdef POSITION |
---|
| 558 | _component->interface_map (src , "write_"+toString(j), |
---|
| 559 | dest,"spr_write_status_"+toString(i)+"_"+toString(j)); |
---|
| 560 | #endif |
---|
[78] | 561 | |
---|
[128] | 562 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 563 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 564 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 565 | dest, "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 566 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 567 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 568 | // dest,"out_CONST_1"); |
---|
| 569 | |
---|
| 570 | dest = _name; |
---|
| 571 | |
---|
| 572 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 573 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
| 574 | |
---|
| 575 | x++; |
---|
[60] | 576 | } |
---|
| 577 | |
---|
| 578 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
| 579 | { |
---|
[128] | 580 | dest = _name+"_glue"; |
---|
| 581 | |
---|
| 582 | #ifdef POSITION |
---|
| 583 | _component->interface_map (src , "write_"+toString(j), |
---|
| 584 | dest,"insert_rob_spr_status_"+toString(i)+"_"+toString(j)); |
---|
| 585 | #endif |
---|
[60] | 586 | |
---|
[128] | 587 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 588 | dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 589 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 590 | dest, "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 591 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 592 | dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 593 | // dest,"out_CONST_0"); |
---|
| 594 | |
---|
| 595 | dest = _name; |
---|
| 596 | |
---|
| 597 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 598 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); |
---|
[60] | 599 | |
---|
[128] | 600 | x++; |
---|
[60] | 601 | } |
---|
| 602 | |
---|
| 603 | |
---|
| 604 | } |
---|
| 605 | }// spr_status |
---|
| 606 | |
---|
| 607 | { |
---|
[128] | 608 | src = _name+"_glue"; |
---|
[60] | 609 | |
---|
[128] | 610 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[88] | 611 | |
---|
[128] | 612 | { |
---|
| 613 | dest = _name; |
---|
[60] | 614 | #ifdef POSITION |
---|
[128] | 615 | _component->interface_map (src ,"", |
---|
| 616 | dest,""); |
---|
[60] | 617 | #endif |
---|
[128] | 618 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 619 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 620 | } |
---|
[62] | 621 | |
---|
[60] | 622 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 623 | { |
---|
[128] | 624 | dest = _name; |
---|
| 625 | |
---|
| 626 | #ifdef POSITION |
---|
| 627 | _component->interface_map (src ,"gpr_read_"+toString(j), |
---|
| 628 | dest,"gpr_read_"+toString(j)); |
---|
| 629 | #endif |
---|
| 630 | |
---|
| 631 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_VAL", |
---|
| 632 | dest, "in_GPR_READ_"+toString(j)+"_VAL"); |
---|
| 633 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_ACK", |
---|
| 634 | dest,"out_GPR_READ_"+toString(j)+"_ACK"); |
---|
[60] | 635 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 636 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 637 | dest, "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 638 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA", |
---|
| 639 | dest,"out_GPR_READ_"+toString(j)+"_DATA"); |
---|
| 640 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA_VAL", |
---|
| 641 | dest,"out_GPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
[60] | 642 | |
---|
[128] | 643 | // out_GPR_READ_REGISTERFILE_VAL - gpr. in_READ_VAL |
---|
| 644 | // in_GPR_READ_REGISTERFILE_ACK - gpr.out_READ_ACK |
---|
| 645 | // in_GPR_READ_REGISTERFILE_DATA - gpr.out_READ_DATA |
---|
| 646 | |
---|
| 647 | // out_GPR_READ_STATUS_VAL - gpr. in_READ_VAL |
---|
| 648 | // in_GPR_READ_STATUS_ACK - gpr.out_READ_ACK |
---|
| 649 | // in_GPR_READ_STATUS_DATA_VAL - gpr.out_READ_DATA |
---|
[60] | 650 | } |
---|
| 651 | |
---|
| 652 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 653 | { |
---|
[128] | 654 | dest = _name; |
---|
| 655 | |
---|
| 656 | #ifdef POSITION |
---|
| 657 | _component->interface_map (src ,"gpr_write_"+toString(j), |
---|
| 658 | dest,"gpr_write_"+toString(j)); |
---|
| 659 | #endif |
---|
| 660 | |
---|
| 661 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_VAL", |
---|
| 662 | dest, "in_GPR_WRITE_"+toString(j)+"_VAL"); |
---|
| 663 | PORT_MAP(_component,src ,"out_GPR_WRITE_"+toString(j)+"_ACK", |
---|
| 664 | dest,"out_GPR_WRITE_"+toString(j)+"_ACK"); |
---|
[60] | 665 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 666 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 667 | dest, "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 668 | |
---|
| 669 | // out_GPR_WRITE_REGISTERFILE_VAL - gpr. in_WRITE_VAL |
---|
| 670 | // in_GPR_WRITE_REGISTERFILE_ACK - gpr.out_WRITE_ACK |
---|
| 671 | // out_GPR_WRITE_STATUS_VAL - gpr. in_WRITE_VAL |
---|
| 672 | // in_GPR_WRITE_STATUS_ACK - gpr.out_WRITE_ACK |
---|
| 673 | // out_GPR_WRITE_STATUS_DATA - gpr. in_WRITE_DATA |
---|
[60] | 674 | } |
---|
[128] | 675 | |
---|
[60] | 676 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 677 | { |
---|
[128] | 678 | dest = _name; |
---|
| 679 | |
---|
| 680 | #ifdef POSITION |
---|
| 681 | _component->interface_map (src ,"spr_read_"+toString(j), |
---|
| 682 | dest,"spr_read_"+toString(j)); |
---|
| 683 | #endif |
---|
| 684 | |
---|
| 685 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_VAL", |
---|
| 686 | dest, "in_SPR_READ_"+toString(j)+"_VAL"); |
---|
| 687 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_ACK", |
---|
| 688 | dest,"out_SPR_READ_"+toString(j)+"_ACK"); |
---|
[60] | 689 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 690 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 691 | dest, "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 692 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA", |
---|
| 693 | dest,"out_SPR_READ_"+toString(j)+"_DATA"); |
---|
| 694 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA_VAL", |
---|
| 695 | dest,"out_SPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
[60] | 696 | |
---|
[128] | 697 | // out_SPR_READ_REGISTERFILE_VAL - spr. in_READ_VAL |
---|
| 698 | // in_SPR_READ_REGISTERFILE_ACK - spr.out_READ_ACK |
---|
| 699 | // in_SPR_READ_REGISTERFILE_DATA - spr.out_READ_DATA |
---|
| 700 | |
---|
| 701 | // out_SPR_READ_STATUS_VAL - spr. in_READ_VAL |
---|
| 702 | // in_SPR_READ_STATUS_ACK - spr.out_READ_ACK |
---|
| 703 | // in_SPR_READ_STATUS_DATA_VAL - spr.out_READ_DATA |
---|
[60] | 704 | } |
---|
| 705 | |
---|
| 706 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 707 | { |
---|
[128] | 708 | dest = _name; |
---|
| 709 | |
---|
| 710 | #ifdef POSITION |
---|
| 711 | _component->interface_map (src ,"spr_write_"+toString(j), |
---|
| 712 | dest,"spr_write_"+toString(j)); |
---|
| 713 | #endif |
---|
| 714 | |
---|
| 715 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_VAL", |
---|
| 716 | dest, "in_SPR_WRITE_"+toString(j)+"_VAL"); |
---|
| 717 | PORT_MAP(_component,src ,"out_SPR_WRITE_"+toString(j)+"_ACK", |
---|
| 718 | dest,"out_SPR_WRITE_"+toString(j)+"_ACK"); |
---|
[60] | 719 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 720 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 721 | dest, "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 722 | |
---|
| 723 | // out_SPR_WRITE_REGISTERFILE_VAL - spr. in_WRITE_VAL |
---|
| 724 | // in_SPR_WRITE_REGISTERFILE_ACK - spr.out_WRITE_ACK |
---|
| 725 | // out_SPR_WRITE_STATUS_VAL - spr. in_WRITE_VAL |
---|
| 726 | // in_SPR_WRITE_STATUS_ACK - spr.out_WRITE_ACK |
---|
| 727 | // out_SPR_WRITE_STATUS_DATA - spr. in_WRITE_DATA |
---|
[60] | 728 | } |
---|
| 729 | |
---|
| 730 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 731 | { |
---|
| 732 | uint32_t x =_param->_nb_inst_insert_rob [i]; |
---|
| 733 | |
---|
| 734 | for (uint32_t j=0; j<x; j++) |
---|
| 735 | { |
---|
[128] | 736 | dest = _name; |
---|
| 737 | |
---|
| 738 | #ifdef POSITION |
---|
| 739 | _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j), |
---|
| 740 | dest,"insert_rob_"+toString(i)+"_"+toString(j)); |
---|
| 741 | #endif |
---|
| 742 | |
---|
| 743 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
| 744 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 745 | PORT_MAP(_component,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
| 746 | dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 747 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE", |
---|
| 748 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE"); |
---|
| 749 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE", |
---|
| 750 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE"); |
---|
| 751 | |
---|
| 752 | // out_INSERT_ROB_GPR_STATUS_VAL - gpr_status. in_WRITE_VAL |
---|
| 753 | // in_INSERT_ROB_GPR_STATUS_ACK - gpr_status. out_WRITE_ACK |
---|
| 754 | // out_INSERT_ROB_GPR_STATUS_DATA- gpr_status. in_WRITE_DATA |
---|
| 755 | // out_INSERT_ROB_SPR_STATUS_VAL - spr_status. in_WRITE_VAL |
---|
| 756 | // in_INSERT_ROB_SPR_STATUS_ACK - spr_status. out_WRITE_ACK |
---|
| 757 | // in_INSERT_ROB_SPR_STATUS_DATA- spr_status. out_WRITE_DATA |
---|
[60] | 758 | } |
---|
| 759 | } |
---|
[128] | 760 | |
---|
[60] | 761 | }// glue |
---|
| 762 | |
---|
[88] | 763 | #if DEBUG_Register_unit == true |
---|
| 764 | _component->test_map (); |
---|
| 765 | #endif |
---|
[60] | 766 | |
---|
| 767 | #ifdef POSITION |
---|
[88] | 768 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 769 | _component->generate_file(); |
---|
[60] | 770 | #endif |
---|
| 771 | |
---|
[75] | 772 | // std::cout << *_component << std::endl; |
---|
[60] | 773 | |
---|
| 774 | log_printf(FUNC,Register_unit,FUNCTION,"End"); |
---|
| 775 | }; |
---|
| 776 | |
---|
| 777 | }; // end namespace register_unit |
---|
| 778 | }; // end namespace execute_loop |
---|
| 779 | }; // end namespace multi_execute_loop |
---|
| 780 | }; // end namespace core |
---|
| 781 | |
---|
| 782 | }; // end namespace behavioural |
---|
| 783 | }; // end namespace morpheo |
---|