[60] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.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 | namespace register_unit_glue { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Register_unit_Glue::Register_unit_Glue" |
---|
| 21 | Register_unit_Glue::Register_unit_Glue |
---|
| 22 | ( |
---|
| 23 | #ifdef SYSTEMC |
---|
| 24 | sc_module_name name, |
---|
| 25 | #else |
---|
[75] | 26 | std::string name, |
---|
[60] | 27 | #endif |
---|
| 28 | #ifdef STATISTICS |
---|
| 29 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
| 30 | #endif |
---|
| 31 | morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters * param, |
---|
| 32 | morpheo::behavioural::Tusage_t usage |
---|
| 33 | ): |
---|
| 34 | _name (name) |
---|
| 35 | ,_param (param) |
---|
| 36 | ,_usage (usage) |
---|
| 37 | { |
---|
| 38 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); |
---|
| 39 | |
---|
| 40 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation"); |
---|
| 41 | allocation (); |
---|
| 42 | |
---|
| 43 | #ifdef STATISTICS |
---|
| 44 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation of statistics"); |
---|
| 45 | |
---|
| 46 | // Allocation of statistics |
---|
[75] | 47 | statistics_declaration(param_statistics); |
---|
[60] | 48 | #endif |
---|
| 49 | |
---|
| 50 | #ifdef VHDL |
---|
| 51 | // generate the vhdl |
---|
| 52 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate the vhdl"); |
---|
| 53 | |
---|
| 54 | vhdl(); |
---|
| 55 | #endif |
---|
| 56 | |
---|
| 57 | #ifdef SYSTEMC |
---|
| 58 | // Constant |
---|
| 59 | |
---|
| 60 | PORT_WRITE(out_CONST_0 ,0); |
---|
| 61 | PORT_WRITE(out_CONST_1 ,1); |
---|
| 62 | |
---|
| 63 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - transition"); |
---|
| 64 | |
---|
| 65 | SC_METHOD (transition); |
---|
| 66 | dont_initialize (); |
---|
| 67 | sensitive_pos << *(in_CLOCK); |
---|
| 68 | |
---|
| 69 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 70 | // List dependency information |
---|
| 71 | #endif |
---|
| 72 | |
---|
| 73 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read"); |
---|
| 74 | |
---|
| 75 | SC_METHOD (genMealy_gpr_read); |
---|
| 76 | dont_initialize (); |
---|
[61] | 77 | // sensitive_neg << *(in_CLOCK); |
---|
[60] | 78 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 79 | { |
---|
| 80 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 81 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
| 82 | |
---|
| 83 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 84 | sensitive << *(in_GPR_READ_REGISTERFILE_ACK [i][j]) |
---|
| 85 | << *(in_GPR_READ_REGISTERFILE_DATA [i][j]) |
---|
| 86 | << *(in_GPR_READ_STATUS_ACK [i][j]) |
---|
| 87 | << *(in_GPR_READ_STATUS_DATA_VAL [i][j]); |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 91 | // List dependency information |
---|
| 92 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 93 | { |
---|
| 94 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 95 | { |
---|
| 96 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
| 97 | (*(out_GPR_READ_DATA_VAL [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
| 98 | (*(out_GPR_READ_DATA [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
| 99 | } |
---|
| 100 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 101 | { |
---|
| 102 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_REGISTERFILE_ACK [i][j])); |
---|
| 103 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_STATUS_ACK [i][j])); |
---|
| 104 | (*(out_GPR_READ_DATA [j])) (*( in_GPR_READ_REGISTERFILE_DATA [i][j])); |
---|
| 105 | (*(out_GPR_READ_DATA_VAL [j])) (*( in_GPR_READ_STATUS_DATA_VAL [i][j])); |
---|
[61] | 106 | } |
---|
| 107 | } |
---|
| 108 | #endif |
---|
[60] | 109 | |
---|
[61] | 110 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_status"); |
---|
[60] | 111 | |
---|
[61] | 112 | SC_METHOD (genMealy_gpr_read_status); |
---|
| 113 | dont_initialize (); |
---|
| 114 | // sensitive_neg << *(in_CLOCK); |
---|
| 115 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 116 | { |
---|
| 117 | sensitive << *(in_GPR_READ_VAL [j]); |
---|
| 118 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 119 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
| 120 | |
---|
| 121 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 122 | sensitive << *(in_GPR_READ_REGISTERFILE_ACK [i][j]); |
---|
| 123 | } |
---|
| 124 | |
---|
| 125 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 126 | // List dependency information |
---|
| 127 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 128 | { |
---|
| 129 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 130 | { |
---|
[60] | 131 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_VAL [j])); |
---|
| 132 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_REGISTERFILE_ACK [i][j])); |
---|
| 133 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 134 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
| 135 | } |
---|
| 136 | } |
---|
| 137 | #endif |
---|
| 138 | |
---|
[61] | 139 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_registerfile"); |
---|
| 140 | |
---|
| 141 | SC_METHOD (genMealy_gpr_read_registerfile); |
---|
| 142 | dont_initialize (); |
---|
| 143 | // sensitive_neg << *(in_CLOCK); |
---|
| 144 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 145 | { |
---|
| 146 | sensitive << *(in_GPR_READ_VAL [j]); |
---|
| 147 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 148 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
| 149 | |
---|
| 150 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 151 | sensitive << *(in_GPR_READ_STATUS_ACK [i][j]); |
---|
| 152 | } |
---|
| 153 | |
---|
| 154 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 155 | // List dependency information |
---|
| 156 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 157 | { |
---|
| 158 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 159 | { |
---|
| 160 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_VAL [j])); |
---|
| 161 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_STATUS_ACK [i][j])); |
---|
| 162 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 163 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
| 164 | } |
---|
| 165 | } |
---|
| 166 | #endif |
---|
| 167 | |
---|
[60] | 168 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write"); |
---|
| 169 | |
---|
| 170 | SC_METHOD (genMealy_gpr_write); |
---|
| 171 | dont_initialize (); |
---|
[61] | 172 | // sensitive_neg << *(in_CLOCK); |
---|
[60] | 173 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 174 | { |
---|
| 175 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 176 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
| 177 | |
---|
| 178 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 179 | sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK [i][j]) |
---|
| 180 | << *(in_GPR_WRITE_STATUS_ACK [i][j]); |
---|
| 181 | } |
---|
| 182 | |
---|
| 183 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 184 | // List dependency information |
---|
| 185 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 186 | { |
---|
| 187 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 188 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
| 189 | |
---|
| 190 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 191 | { |
---|
| 192 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
| 193 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_STATUS_ACK [i][j])); |
---|
[61] | 194 | } |
---|
| 195 | } |
---|
| 196 | #endif |
---|
[60] | 197 | |
---|
[61] | 198 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_status"); |
---|
| 199 | |
---|
| 200 | SC_METHOD (genMealy_gpr_write_status); |
---|
| 201 | dont_initialize (); |
---|
| 202 | // sensitive_neg << *(in_CLOCK); |
---|
| 203 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 204 | { |
---|
| 205 | sensitive << *(in_GPR_WRITE_VAL [j]); |
---|
| 206 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 207 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
| 208 | |
---|
| 209 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 210 | sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK [i][j]); |
---|
| 211 | } |
---|
| 212 | |
---|
| 213 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 214 | // List dependency information |
---|
| 215 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 216 | { |
---|
| 217 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 218 | { |
---|
[60] | 219 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_VAL [j])); |
---|
| 220 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
| 221 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 222 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
| 223 | } |
---|
| 224 | } |
---|
| 225 | #endif |
---|
| 226 | |
---|
[61] | 227 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_registerfile"); |
---|
[60] | 228 | |
---|
[61] | 229 | SC_METHOD (genMealy_gpr_write_registerfile); |
---|
| 230 | dont_initialize (); |
---|
[60] | 231 | // sensitive_neg << *(in_CLOCK); |
---|
[61] | 232 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 233 | { |
---|
| 234 | sensitive << *(in_GPR_WRITE_VAL [j]); |
---|
| 235 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 236 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
[60] | 237 | |
---|
[61] | 238 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 239 | sensitive << *(in_GPR_WRITE_STATUS_ACK [i][j]); |
---|
| 240 | } |
---|
[60] | 241 | |
---|
[61] | 242 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 243 | // List dependency information |
---|
| 244 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 245 | { |
---|
| 246 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 247 | { |
---|
| 248 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_VAL [j])); |
---|
| 249 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_STATUS_ACK [i][j])); |
---|
| 250 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 251 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
| 252 | } |
---|
| 253 | } |
---|
| 254 | #endif |
---|
[60] | 255 | |
---|
| 256 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read"); |
---|
| 257 | |
---|
| 258 | SC_METHOD (genMealy_spr_read); |
---|
| 259 | dont_initialize (); |
---|
[61] | 260 | // sensitive_neg << *(in_CLOCK); |
---|
[60] | 261 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 262 | { |
---|
| 263 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 264 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
| 265 | |
---|
| 266 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 267 | sensitive << *(in_SPR_READ_REGISTERFILE_ACK [i][j]) |
---|
| 268 | << *(in_SPR_READ_REGISTERFILE_DATA [i][j]) |
---|
| 269 | << *(in_SPR_READ_STATUS_ACK [i][j]) |
---|
| 270 | << *(in_SPR_READ_STATUS_DATA_VAL [i][j]); |
---|
| 271 | } |
---|
| 272 | |
---|
| 273 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 274 | // List dependency information |
---|
| 275 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 276 | { |
---|
| 277 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 278 | { |
---|
| 279 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
| 280 | (*(out_SPR_READ_DATA_VAL [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
| 281 | (*(out_SPR_READ_DATA [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
| 282 | } |
---|
| 283 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 284 | { |
---|
| 285 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_REGISTERFILE_ACK [i][j])); |
---|
| 286 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_STATUS_ACK [i][j])); |
---|
| 287 | (*(out_SPR_READ_DATA [j])) (*( in_SPR_READ_REGISTERFILE_DATA [i][j])); |
---|
| 288 | (*(out_SPR_READ_DATA_VAL [j])) (*( in_SPR_READ_STATUS_DATA_VAL [i][j])); |
---|
[61] | 289 | } |
---|
| 290 | } |
---|
| 291 | #endif |
---|
[60] | 292 | |
---|
[61] | 293 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_status"); |
---|
| 294 | |
---|
| 295 | SC_METHOD (genMealy_spr_read_status); |
---|
| 296 | dont_initialize (); |
---|
| 297 | // sensitive_neg << *(in_CLOCK); |
---|
| 298 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 299 | { |
---|
| 300 | sensitive << *(in_SPR_READ_VAL [j]); |
---|
| 301 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 302 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
| 303 | |
---|
| 304 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 305 | sensitive << *(in_SPR_READ_REGISTERFILE_ACK [i][j]); |
---|
| 306 | } |
---|
| 307 | |
---|
| 308 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 309 | // List dependency information |
---|
| 310 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 311 | { |
---|
| 312 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 313 | { |
---|
[60] | 314 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_VAL [j])); |
---|
| 315 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_REGISTERFILE_ACK [i][j])); |
---|
| 316 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 317 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
| 318 | } |
---|
| 319 | } |
---|
| 320 | #endif |
---|
| 321 | |
---|
[61] | 322 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_registerfile"); |
---|
| 323 | |
---|
| 324 | SC_METHOD (genMealy_spr_read_registerfile); |
---|
| 325 | dont_initialize (); |
---|
| 326 | // sensitive_neg << *(in_CLOCK); |
---|
| 327 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 328 | { |
---|
| 329 | sensitive << *(in_SPR_READ_VAL [j]); |
---|
| 330 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 331 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
| 332 | |
---|
| 333 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 334 | sensitive << *(in_SPR_READ_STATUS_ACK [i][j]); |
---|
| 335 | } |
---|
| 336 | |
---|
| 337 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 338 | // List dependency information |
---|
| 339 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 340 | { |
---|
| 341 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 342 | { |
---|
| 343 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_VAL [j])); |
---|
| 344 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_STATUS_ACK [i][j])); |
---|
| 345 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 346 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
| 347 | } |
---|
| 348 | } |
---|
| 349 | #endif |
---|
| 350 | |
---|
[60] | 351 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write"); |
---|
| 352 | |
---|
| 353 | SC_METHOD (genMealy_spr_write); |
---|
| 354 | dont_initialize (); |
---|
[61] | 355 | // sensitive_neg << *(in_CLOCK); |
---|
[60] | 356 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 357 | { |
---|
| 358 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 359 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
| 360 | |
---|
| 361 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 362 | sensitive << *(in_SPR_WRITE_REGISTERFILE_ACK [i][j]) |
---|
| 363 | << *(in_SPR_WRITE_STATUS_ACK [i][j]); |
---|
| 364 | } |
---|
| 365 | |
---|
| 366 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 367 | // List dependency information |
---|
| 368 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 369 | { |
---|
| 370 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 371 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
| 372 | |
---|
| 373 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 374 | { |
---|
| 375 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
| 376 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_STATUS_ACK [i][j])); |
---|
[61] | 377 | } |
---|
| 378 | } |
---|
| 379 | #endif |
---|
[60] | 380 | |
---|
[61] | 381 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_status"); |
---|
| 382 | |
---|
| 383 | SC_METHOD (genMealy_spr_write_status); |
---|
| 384 | dont_initialize (); |
---|
| 385 | // sensitive_neg << *(in_CLOCK); |
---|
| 386 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 387 | { |
---|
| 388 | sensitive << *(in_SPR_WRITE_VAL [j]); |
---|
| 389 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 390 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
| 391 | |
---|
| 392 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 393 | sensitive << *(in_SPR_WRITE_REGISTERFILE_ACK [i][j]); |
---|
| 394 | } |
---|
| 395 | |
---|
| 396 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 397 | // List dependency information |
---|
| 398 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 399 | { |
---|
| 400 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 401 | { |
---|
[60] | 402 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_VAL [j])); |
---|
| 403 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
| 404 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 405 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
| 406 | } |
---|
| 407 | } |
---|
| 408 | #endif |
---|
| 409 | |
---|
[61] | 410 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_registerfile"); |
---|
| 411 | |
---|
| 412 | SC_METHOD (genMealy_spr_write_registerfile); |
---|
| 413 | dont_initialize (); |
---|
| 414 | // sensitive_neg << *(in_CLOCK); |
---|
| 415 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 416 | { |
---|
| 417 | sensitive << *(in_SPR_WRITE_VAL [j]); |
---|
| 418 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 419 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
| 420 | |
---|
| 421 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 422 | sensitive << *(in_SPR_WRITE_STATUS_ACK [i][j]); |
---|
| 423 | } |
---|
| 424 | |
---|
| 425 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 426 | // List dependency information |
---|
| 427 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 428 | { |
---|
| 429 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 430 | { |
---|
| 431 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_VAL [j])); |
---|
| 432 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_STATUS_ACK [i][j])); |
---|
| 433 | if (_param->_have_port_ooo_engine_id == true) |
---|
| 434 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
| 435 | } |
---|
| 436 | } |
---|
| 437 | #endif |
---|
| 438 | |
---|
[60] | 439 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_insert"); |
---|
| 440 | |
---|
| 441 | SC_METHOD (genMealy_insert); |
---|
| 442 | dont_initialize (); |
---|
[61] | 443 | // sensitive_neg << *(in_CLOCK); |
---|
[60] | 444 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 445 | { |
---|
| 446 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
| 447 | for (uint32_t j=0; j<x; j++) |
---|
| 448 | sensitive << *( in_INSERT_ROB_VAL [i][j]) |
---|
| 449 | << *( in_INSERT_ROB_RD_USE [i][j]) |
---|
| 450 | << *( in_INSERT_ROB_RE_USE [i][j]) |
---|
| 451 | << *( in_INSERT_ROB_GPR_STATUS_ACK [i][j]) |
---|
| 452 | << *( in_INSERT_ROB_SPR_STATUS_ACK [i][j]); |
---|
| 453 | } |
---|
| 454 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 455 | // List dependency information |
---|
| 456 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 457 | { |
---|
| 458 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
| 459 | for (uint32_t j=0; j<x; j++) |
---|
| 460 | { |
---|
| 461 | (*(out_INSERT_ROB_ACK [i][j]))(*( in_INSERT_ROB_GPR_STATUS_ACK [i][j])); |
---|
| 462 | (*(out_INSERT_ROB_ACK [i][j]))(*( in_INSERT_ROB_SPR_STATUS_ACK [i][j])); |
---|
| 463 | |
---|
| 464 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_VAL [i][j])); |
---|
| 465 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_RD_USE [i][j])); |
---|
| 466 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_SPR_STATUS_ACK [i][j])); |
---|
| 467 | |
---|
| 468 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_VAL [i][j])); |
---|
| 469 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_RE_USE [i][j])); |
---|
| 470 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_GPR_STATUS_ACK [i][j])); |
---|
| 471 | } |
---|
| 472 | } |
---|
| 473 | #endif |
---|
| 474 | |
---|
| 475 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_retire"); |
---|
| 476 | |
---|
| 477 | SC_METHOD (genMealy_retire); |
---|
| 478 | dont_initialize (); |
---|
[61] | 479 | // sensitive_neg << *(in_CLOCK); |
---|
[60] | 480 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 481 | { |
---|
| 482 | uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
| 483 | for (uint32_t j=0; j<x; j++) |
---|
| 484 | sensitive << *( in_RETIRE_ROB_VAL [i][j]) |
---|
| 485 | << *( in_RETIRE_ROB_RD_OLD_USE [i][j]) |
---|
| 486 | << *( in_RETIRE_ROB_RD_NEW_USE [i][j]) |
---|
| 487 | << *( in_RETIRE_ROB_RE_OLD_USE [i][j]) |
---|
| 488 | << *( in_RETIRE_ROB_RE_NEW_USE [i][j]) |
---|
| 489 | << *( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]) |
---|
| 490 | << *( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]) |
---|
| 491 | << *( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]) |
---|
| 492 | << *( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]); |
---|
| 493 | } |
---|
| 494 | #ifdef SYSTEMCASS_SPECIFIC |
---|
| 495 | // List dependency information |
---|
| 496 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 497 | { |
---|
| 498 | uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
| 499 | for (uint32_t j=0; j<x; j++) |
---|
| 500 | { |
---|
| 501 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
| 502 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
| 503 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
| 504 | (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
| 505 | |
---|
| 506 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
| 507 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE [i][j])); |
---|
| 508 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
| 509 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
| 510 | (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
| 511 | |
---|
| 512 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
| 513 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE [i][j])); |
---|
| 514 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
| 515 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
| 516 | (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
| 517 | |
---|
| 518 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
| 519 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE [i][j])); |
---|
| 520 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
| 521 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
| 522 | (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
| 523 | |
---|
| 524 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
| 525 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE [i][j])); |
---|
| 526 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
| 527 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
| 528 | (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
| 529 | } |
---|
| 530 | } |
---|
| 531 | #endif |
---|
| 532 | |
---|
| 533 | #endif |
---|
| 534 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); |
---|
| 535 | }; |
---|
| 536 | |
---|
| 537 | #undef FUNCTION |
---|
| 538 | #define FUNCTION "Register_unit_Glue::~Register_unit_Glue" |
---|
| 539 | Register_unit_Glue::~Register_unit_Glue (void) |
---|
| 540 | { |
---|
| 541 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); |
---|
| 542 | |
---|
| 543 | #ifdef STATISTICS |
---|
| 544 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file"); |
---|
| 545 | |
---|
| 546 | delete _stat; |
---|
| 547 | #endif |
---|
| 548 | |
---|
| 549 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Deallocation"); |
---|
| 550 | deallocation (); |
---|
| 551 | |
---|
| 552 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); |
---|
| 553 | }; |
---|
| 554 | |
---|
| 555 | }; // end namespace register_unit_glue |
---|
| 556 | }; // end namespace register_unit |
---|
| 557 | }; // end namespace execute_loop |
---|
| 558 | }; // end namespace multi_execute_loop |
---|
| 559 | }; // end namespace core |
---|
| 560 | |
---|
| 561 | }; // end namespace behavioural |
---|
| 562 | }; // end namespace morpheo |
---|
[61] | 563 | |
---|
| 564 | |
---|
| 565 | |
---|