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