Changeset 139 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src
- Timestamp:
- Jul 30, 2010, 4:47:27 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
r137 r139 120 120 _ALLOC2_SIGNAL_OUT(out_RETIRE_STORE_QUEUE_PTR_WRITE ,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 121 121 _ALLOC2_SIGNAL_OUT(out_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 122 // 123 // 124 // 125 // 126 // 127 // 122 // _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RA ,"read_ra" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 123 // _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RA_PHY ,"num_reg_ra_phy" ,Tgeneral_address_t,_param->_size_general_register ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 124 // _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RB ,"read_rb" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 125 // _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RB_PHY ,"num_reg_rb_phy" ,Tgeneral_address_t,_param->_size_general_register ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 126 // _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RC ,"read_rc" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 127 // _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RC_PHY ,"num_reg_rc_phy" ,Tspecial_address_t,_param->_size_special_register ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 128 128 _ALLOC2_SIGNAL_OUT(out_RETIRE_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 129 129 _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RD_LOG ,"num_reg_rd_log" ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); … … 134 134 _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RE_PHY_OLD ,"num_reg_re_phy_old" ,Tspecial_address_t,_param->_size_special_register ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 135 135 _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RE_PHY_NEW ,"num_reg_re_phy_new" ,Tspecial_address_t,_param->_size_special_register ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 136 _ALLOC2_SIGNAL_OUT(out_RETIRE_RESTORE ,"RESTORE" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 137 _ALLOC2_SIGNAL_OUT(out_RETIRE_RESTORE_RD_PHY_OLD ,"RESTORE_RD_PHY_OLD" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 138 _ALLOC2_SIGNAL_OUT(out_RETIRE_RESTORE_RE_PHY_OLD ,"RESTORE_RE_PHY_OLD" ,Tcontrol_t ,1 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 136 139 137 140 ALLOC2_INTERFACE_END(_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); … … 142 145 ALLOC2_INTERFACE_BEGIN("retire_event",OUT,SOUTH, _("Interface to update rename_unit."),_param->_nb_front_end,_param->_nb_context[it1]); 143 146 144 _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_VAL ,VAL,_param->_nb_front_end,_param->_nb_context[it1]); 145 _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_ACK ,ACK,_param->_nb_front_end,_param->_nb_context[it1]); 146 _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STATE ,"state" ,Tevent_state_t ,_param->_size_event_state ,_param->_nb_front_end,_param->_nb_context[it1]); 147 // _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_FLUSH ,"flush" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_nb_context[it1]); 148 _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STOP ,"stop" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_nb_context[it1]); 147 _ALLOC2_VALACK_OUT (out_RETIRE_EVENT_VAL ,VAL,_param->_nb_front_end,_param->_nb_context[it1]); 148 _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_ACK ,ACK,_param->_nb_front_end,_param->_nb_context[it1]); 149 _ALLOC2_SIGNAL_OUT (out_RETIRE_EVENT_STATE ,"state" ,Tevent_state_t ,_param->_size_event_state,_param->_nb_front_end,_param->_nb_context[it1]); 150 // _ALLOC2_SIGNAL_OUT (out_RETIRE_EVENT_FLUSH ,"flush" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_nb_context[it1]); 151 _ALLOC2_SIGNAL_OUT (out_RETIRE_EVENT_STOP ,"stop" ,Tcontrol_t ,1 ,_param->_nb_front_end,_param->_nb_context[it1]); 152 _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_TYPE ,"type" ,Tevent_type_t ,_param->_size_event_type ,_param->_nb_front_end,_param->_nb_context[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE); 153 _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth ,_param->_nb_front_end,_param->_nb_context[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE); 149 154 150 155 ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]); … … 306 311 ALLOC2(internal_BANK_COMMIT_ENTRY ,entry_t * ,_param->_nb_bank,_param->_nb_bank_access_commit); 307 312 308 ALLOC1(internal_BANK_RETIRE_VAL ,Tcontrol_t,_param->_nb_bank); 309 ALLOC1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,uint32_t ,_param->_nb_bank); 310 ALLOC1(internal_BANK_RETIRE_NUM_INST ,uint32_t ,_param->_nb_bank); 313 ALLOC1(internal_BANK_RETIRE_VAL ,Tcontrol_t,_param->_nb_bank); 314 ALLOC1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,uint32_t ,_param->_nb_bank); 315 ALLOC1(internal_BANK_RETIRE_NUM_INST ,uint32_t ,_param->_nb_bank); 316 // ALLOC1(internal_BANK_RETIRE_RESTORE ,Tcontrol_t,_param->_nb_bank); 317 ALLOC1(internal_BANK_RETIRE_RESTORE_RD_PHY_OLD,Tcontrol_t,_param->_nb_bank); 318 ALLOC1(internal_BANK_RETIRE_RESTORE_RE_PHY_OLD,Tcontrol_t,_param->_nb_bank); 311 319 312 320 ALLOC1(internal_REEXECUTE_VAL ,Tcontrol_t,_param->_nb_inst_reexecute); … … 318 326 ALLOC2(internal_EVENT_ACK ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]); 319 327 ALLOC2(internal_RETIRE_EVENT_VAL ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]); 328 329 ALLOC3(internal_rat_gpr_update_table ,bool ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic); 330 ALLOC3(internal_rat_spr_update_table ,bool ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic); 331 320 332 321 333 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 329 341 330 342 ALLOC2(reg_EVENT_STATE ,Tcommit_event_state_t,_param->_nb_front_end,_param->_nb_context [it1]); 343 ALLOC2(reg_EVENT_TYPE ,Tevent_type_t ,_param->_nb_front_end,_param->_nb_context [it1]); 331 344 // ALLOC2(reg_EVENT_FLUSH ,bool ,_param->_nb_front_end,_param->_nb_context [it1]); 332 345 // ALLOC2(reg_EVENT_STOP ,bool ,_param->_nb_front_end,_param->_nb_context [it1]); 333 334 346 // ALLOC2(reg_EVENT_NUM_BANK ,uint32_t ,_param->_nb_front_end,_param->_nb_context [it1]); 347 // ALLOC2(reg_EVENT_NUM_PTR ,uint32_t ,_param->_nb_front_end,_param->_nb_context [it1]); 335 348 // ALLOC2(reg_EVENT_CAN_RESTART ,bool ,_param->_nb_front_end,_param->_nb_context [it1]); 336 349 ALLOC2(reg_EVENT_PACKET ,uint32_t ,_param->_nb_front_end,_param->_nb_context [it1]); 350 ALLOC2(reg_EVENT_DEPTH ,Tdepth_t ,_param->_nb_front_end,_param->_nb_context [it1]); 337 351 ALLOC2(reg_EVENT_NB_INST ,uint32_t ,_param->_nb_front_end,_param->_nb_context [it1]); 338 352 ALLOC2(reg_EVENT_LAST ,bool ,_param->_nb_front_end,_param->_nb_context [it1]); … … 348 362 ALLOC2(reg_PC_CURRENT_IS_DS_TAKE,Taddress_t ,_param->_nb_front_end,_param->_nb_context [it1]); 349 363 ALLOC2(reg_PC_NEXT ,Taddress_t ,_param->_nb_front_end,_param->_nb_context [it1]); 364 365 ALLOC3(rat_gpr_update_table ,bool ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic); 366 ALLOC3(rat_spr_update_table ,bool ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic); 350 367 } 351 368 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
r137 r139 96 96 DELETE2_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_OLD ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_special_register ); 97 97 DELETE2_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_NEW ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_special_register ); 98 99 DELETE2_SIGNAL(out_RETIRE_EVENT_VAL ,_param->_nb_front_end,_param->_nb_context[it1],1); 100 DELETE2_SIGNAL( in_RETIRE_EVENT_ACK ,_param->_nb_front_end,_param->_nb_context[it1],1); 101 DELETE2_SIGNAL(out_RETIRE_EVENT_STATE ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_state); 102 // DELETE2_SIGNAL(out_RETIRE_EVENT_FLUSH ,_param->_nb_front_end,_param->_nb_context[it1],1); 103 DELETE2_SIGNAL(out_RETIRE_EVENT_STOP ,_param->_nb_front_end,_param->_nb_context[it1],1); 98 DELETE2_SIGNAL(out_RETIRE_RESTORE ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1); 99 DELETE2_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1); 100 DELETE2_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1); 101 102 DELETE2_SIGNAL (out_RETIRE_EVENT_VAL ,_param->_nb_front_end,_param->_nb_context[it1],1); 103 DELETE2_SIGNAL ( in_RETIRE_EVENT_ACK ,_param->_nb_front_end,_param->_nb_context[it1],1); 104 DELETE2_SIGNAL (out_RETIRE_EVENT_STATE ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_state); 105 // DELETE2_SIGNAL (out_RETIRE_EVENT_FLUSH ,_param->_nb_front_end,_param->_nb_context[it1],1); 106 DELETE2_SIGNAL (out_RETIRE_EVENT_STOP ,_param->_nb_front_end,_param->_nb_context[it1],1); 107 DELETE2_SIGNAL_COND(out_RETIRE_EVENT_TYPE ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_type,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE); 108 DELETE2_SIGNAL_COND(out_RETIRE_EVENT_DEPTH ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth ,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE); 104 109 105 110 DELETE1_SIGNAL( in_COMMIT_VAL ,_param->_nb_inst_commit,1 ); … … 187 192 DELETE2(internal_BANK_COMMIT_ENTRY ,_param->_nb_bank,_param->_nb_bank_access_commit); 188 193 189 DELETE1(internal_BANK_RETIRE_VAL ,_param->_nb_bank); 190 DELETE1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,_param->_nb_bank); 191 DELETE1(internal_BANK_RETIRE_NUM_INST ,_param->_nb_bank); 194 DELETE1(internal_BANK_RETIRE_VAL ,_param->_nb_bank); 195 DELETE1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,_param->_nb_bank); 196 DELETE1(internal_BANK_RETIRE_NUM_INST ,_param->_nb_bank); 197 // DELETE1(internal_BANK_RETIRE_RESTORE ,_param->_nb_bank); 198 DELETE1(internal_BANK_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_bank); 199 DELETE1(internal_BANK_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_bank); 192 200 193 201 DELETE1(internal_REEXECUTE_VAL ,_param->_nb_inst_reexecute); … … 200 208 201 209 DELETE2(internal_RETIRE_EVENT_VAL ,_param->_nb_front_end,_param->_nb_context[it1]); 210 211 DELETE3(internal_rat_gpr_update_table ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic); 212 DELETE3(internal_rat_spr_update_table ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic); 202 213 203 214 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 217 228 218 229 DELETE2(reg_EVENT_STATE ,_param->_nb_front_end,_param->_nb_context [it1]); 230 DELETE2(reg_EVENT_TYPE ,_param->_nb_front_end,_param->_nb_context [it1]); 219 231 // DELETE2(reg_EVENT_FLUSH ,_param->_nb_front_end,_param->_nb_context [it1]); 220 232 // DELETE2(reg_EVENT_STOP ,_param->_nb_front_end,_param->_nb_context [it1]); 221 222 233 // DELETE2(reg_EVENT_NUM_BANK ,_param->_nb_front_end,_param->_nb_context [it1]); 234 // DELETE2(reg_EVENT_NUM_PTR ,_param->_nb_front_end,_param->_nb_context [it1]); 223 235 // DELETE2(reg_EVENT_CAN_RESTART ,_param->_nb_front_end,_param->_nb_context [it1]); 224 236 DELETE2(reg_EVENT_PACKET ,_param->_nb_front_end,_param->_nb_context [it1]); 237 DELETE2(reg_EVENT_DEPTH ,_param->_nb_front_end,_param->_nb_context [it1]); 225 238 DELETE2(reg_EVENT_NB_INST ,_param->_nb_front_end,_param->_nb_context [it1]); 226 239 DELETE2(reg_EVENT_LAST ,_param->_nb_front_end,_param->_nb_context [it1]); … … 236 249 DELETE2(reg_PC_CURRENT_IS_DS_TAKE,_param->_nb_front_end,_param->_nb_context [it1]); 237 250 DELETE2(reg_PC_NEXT ,_param->_nb_front_end,_param->_nb_context [it1]); 251 252 DELETE3(rat_gpr_update_table ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic); 253 DELETE3(rat_spr_update_table ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic); 238 254 } 239 255 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp
r133 r139 60 60 spr_write_sr_cy [i][j] = 0; // not necessary 61 61 spr_write_sr_ov [i][j] = 0; // not necessary 62 63 // Init internal update table 64 65 // Test if an event occure 66 // bool event = (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) != EVENT_STATE_NO_EVENT); 67 bool reset_update_table = (commit_event_state_to_event_state(reg_EVENT_STATE[i][j]) == EVENT_STATE_EVENT); 68 69 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION," * reset_update_table : %d",reset_update_table); 70 71 // not event -> update_table == 1 -> always update 72 // event -> update_table and not reset 73 for (uint32_t k=0; k<_param->_nb_general_register_logic; ++k) 74 internal_rat_gpr_update_table [i][j][k] = // not event or 75 (not reset_update_table and rat_gpr_update_table [i][j][k]); 76 for (uint32_t k=0; k<_param->_nb_special_register_logic; ++k) 77 internal_rat_spr_update_table [i][j][k] = // not event or 78 (not reset_update_table and rat_spr_update_table [i][j][k]); 62 79 } 63 80 … … 116 133 ) 117 134 { 135 Tcontrol_t write_rd = entry->write_rd; 118 136 Tcontrol_t write_re = entry->write_re; 137 Tgeneral_address_t num_reg_rd_log = entry->num_reg_rd_log; 119 138 Tspecial_address_t num_reg_re_log = entry->num_reg_re_log; 120 139 … … 172 191 } 173 192 174 internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank] = x; 175 internal_BANK_RETIRE_NUM_INST [num_bank] = y; 193 // Restore Old Register 194 Tcontrol_t retire_restore = (commit_event_state_to_event_state(reg_EVENT_STATE[front_end_id][context_id]) != EVENT_STATE_NO_EVENT); 195 196 // Test if event -> need restore ? 197 if (retire_restore) 198 { 199 log_printf(TRACE,Commit_unit,FUNCTION," * Restore"); 200 201 // Test and update update table 202 if (write_rd) 203 { 204 internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank] = (internal_rat_gpr_update_table[front_end_id][context_id][num_reg_rd_log] == 0); 205 206 internal_rat_gpr_update_table[front_end_id][context_id][num_reg_rd_log] = 1; 207 } 208 if (write_re) 209 { 210 internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank] = (internal_rat_spr_update_table[front_end_id][context_id][num_reg_re_log] == 0); 211 212 internal_rat_spr_update_table[front_end_id][context_id][num_reg_re_log] = 1; 213 } 214 215 log_printf(TRACE,Commit_unit,FUNCTION," * restore_rd_phy_old : %d",internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank]); 216 log_printf(TRACE,Commit_unit,FUNCTION," * restore_re_phy_old : %d",internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank]); 217 } 218 219 internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank] = x; 220 internal_BANK_RETIRE_NUM_INST [num_bank] = y; 176 221 177 222 if (_param->_have_port_front_end_id) … … 199 244 PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_OLD [x][y], entry->num_reg_re_phy_old ); 200 245 PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_NEW [x][y], entry->num_reg_re_phy_new ); 246 PORT_WRITE(out_RETIRE_RESTORE [x][y],retire_restore); 247 PORT_WRITE(out_RETIRE_RESTORE_RD_PHY_OLD [x][y],internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank]); 248 PORT_WRITE(out_RETIRE_RESTORE_RE_PHY_OLD [x][y],internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank]); 201 249 202 250 // Event -> rob must be manage this event -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp
r129 r139 331 331 PORT_WRITE(out_RETIRE_EVENT_STOP [i][j], ((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_NOT_YET_EVENT) or 332 332 reg_EVENT_NEXT_STOP [i][j])); 333 if (_param->_rat_scheme[i] == RAT_DEPTH_SAVE) 334 { 335 PORT_WRITE(out_RETIRE_EVENT_TYPE [i][j], reg_EVENT_TYPE [i][j]); 336 if (_param->_have_port_depth) 337 PORT_WRITE(out_RETIRE_EVENT_DEPTH [i][j], reg_EVENT_DEPTH [i][j]); 338 } 333 339 } 334 340 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r137 r139 54 54 // reg_EVENT_FLUSH [i][j] = false; 55 55 // reg_EVENT_STOP [i][j] = false; 56 57 58 //reg_EVENT_CAN_RESTART [i][j] = 0; // not necessary56 // reg_EVENT_NUM_BANK [i][j] = 0; // not necessary 57 // reg_EVENT_NUM_PTR [i][j] = 0; // not necessary 58 // reg_EVENT_CAN_RESTART [i][j] = 0; // not necessary 59 59 reg_EVENT_PACKET [i][j] = 0; // not necessary 60 reg_EVENT_DEPTH [i][j] = 0; // not necessary 60 61 reg_EVENT_NB_INST [i][j] = 0; 61 62 reg_EVENT_LAST [i][j] = false; … … 72 73 reg_PC_NEXT [i][j] = (0x100+4)>>2; 73 74 } 75 76 // Resert RAT_UPDATE_TABLE 77 for (uint32_t i=0; i<_param->_nb_front_end; i++) 78 for (uint32_t j=0; j<_param->_nb_context[i]; j++) 79 { 80 for (uint32_t k=0; k<_param->_nb_general_register_logic; k++) 81 rat_gpr_update_table [i][j][k] = false; // not necessary 82 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) 83 rat_spr_update_table [i][j][k] = false; // not necessary 84 } 74 85 75 86 // Reset priority algorithm … … 114 125 // else 115 126 reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END; 127 128 // Reset update_table 129 for (uint32_t k=0; k<_param->_nb_general_register_logic; k++) 130 rat_gpr_update_table [i][j][k] = false; 131 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) 132 rat_spr_update_table [i][j][k] = false; 116 133 } 117 134 … … 180 197 else 181 198 { 199 uint32_t next_packet = reg_EVENT_NEXT_PACKET [i][j]; 200 182 201 reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_NOT_YET_EVENT; 183 202 184 203 reg_EVENT_NEXT_STOP [i][j] = false; 185 reg_EVENT_PACKET [i][j] = reg_EVENT_NEXT_PACKET [i][j]; 204 reg_EVENT_PACKET [i][j] = next_packet; 205 // reg_EVENT_DEPTH [i][j] = _rob[next_packet].depth; 186 206 reg_EVENT_NB_INST [i][j] = reg_NB_INST_COMMIT_ALL [i][j]; 187 207 //reg_EVENT_STOP [i][j] = true; … … 596 616 reg_EVENT_STATE [front_end_id][context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT; 597 617 618 // reg_EVENT_DEPTH [front_end_id][context_id] = _rob[packet].depth; 598 619 reg_EVENT_NB_INST [front_end_id][context_id] = reg_NB_INST_COMMIT_ALL [front_end_id][context_id]; 599 620 … … 697 718 #endif 698 719 699 700 720 #ifdef STATISTICS 701 if (usage_is_set(_usage,USE_STATISTICS)) 702 (*_stat_nb_inst_retire [x]) ++; 703 721 if (usage_is_set(_usage,USE_STATISTICS)) 722 (*_stat_nb_inst_retire [x]) ++; 704 723 #endif 705 724 … … 709 728 entry->state_old = entry->state; 710 729 entry->state = ROB_END; 730 731 732 // Update RAT_UPDATE_TABLE 733 Tcontext_t front_end_id = entry->front_end_id; 734 Tcontext_t context_id = entry->context_id ; 735 736 if (entry->write_rd and internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank]) 737 rat_gpr_update_table [front_end_id][context_id][entry->num_reg_rd_log] = true; 738 if (entry->write_re and internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank]) 739 rat_spr_update_table [front_end_id][context_id][entry->num_reg_re_log] = true; 711 740 } 712 741 } … … 771 800 { 772 801 reg_EVENT_STATE [front_end_id][context_id] = COMMIT_EVENT_STATE_EVENT; 802 reg_EVENT_TYPE [front_end_id][context_id] = rob_state_to_event_type(state); 773 803 // reg_EVENT_STOP [front_end_id][context_id] = false; // instruction flow can continue 774 804 reg_EVENT_LAST [front_end_id][context_id] = false; 775 805 // it the head ! 776 806 reg_EVENT_PACKET [front_end_id][context_id] = packet_id; 777 807 reg_EVENT_DEPTH [front_end_id][context_id] = entry->depth; 808 778 809 // // If event is an load_miss, many instruction can be inserted. 779 810 // // -> new last instruction … … 947 978 // In all case, stop instruction flow 948 979 reg_EVENT_STATE [entry->front_end_id][entry->context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT; 980 // reg_EVENT_DEPTH [entry->front_end_id][entry->context_id] = _rob[packet]._depth; 949 981 reg_EVENT_NB_INST [entry->front_end_id][entry->context_id] = reg_NB_INST_COMMIT_ALL [entry->front_end_id][entry->context_id]; 950 951 982 // reg_EVENT_STOP [entry->front_end_id][entry->context_id] = true; 952 983 … … 1283 1314 // log_printf(TRACE,Commit_unit,FUNCTION," * EVENT : %d (bank %d, ptr %d)",((reg_EVENT_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_NUM_BANK [i][j]), reg_EVENT_NUM_BANK [i][j],reg_EVENT_NUM_PTR [i][j]); 1284 1315 // log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_CAN_RESTART : %d",reg_EVENT_CAN_RESTART [i][j]); 1316 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_DEPTH : %d - type %s",reg_EVENT_DEPTH [i][j],toString(reg_EVENT_TYPE [i][j]).c_str()); 1285 1317 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_LAST : %d - packet %d - ptr %d (bank %d, ptr %d)",reg_EVENT_LAST [i][j],reg_EVENT_PACKET[i][j],((reg_EVENT_LAST_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_LAST_NUM_BANK [i][j]), reg_EVENT_LAST_NUM_BANK [i][j],reg_EVENT_LAST_NUM_PTR [i][j]); 1286 1318 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_NEXT : stop : %d - packet : %d",reg_EVENT_NEXT_STOP [i][j],reg_EVENT_NEXT_PACKET[i][j]); … … 1370 1402 } 1371 1403 1404 log_printf(TRACE,Commit_unit,FUNCTION," * Dump RAT Update Table"); 1405 for (uint32_t i=0; i<_param->_nb_front_end; ++i) 1406 for (uint32_t j=0; j<_param->_nb_context[i]; ++j) 1407 { 1408 { 1409 std::string str = ""; 1410 for (uint32_t k=0; k<_param->_nb_general_register_logic; k++) 1411 str+=toString("%.1d ",rat_gpr_update_table[i][j][k]); 1412 1413 log_printf(TRACE,Commit_unit,FUNCTION," * GPR [%d][%d] %s",i,j,str.c_str()); 1414 } 1415 1416 { 1417 std::string str = ""; 1418 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) 1419 str+=toString("%.1d ",rat_spr_update_table[i][j][k]); 1420 1421 log_printf(TRACE,Commit_unit,FUNCTION," * GPR [%d][%d] %s",i,j,str.c_str()); 1422 } 1423 } 1424 1372 1425 log_printf(TRACE,Commit_unit,FUNCTION," * nb_write_rd : %d",nb_write_rd); 1373 1426 log_printf(TRACE,Commit_unit,FUNCTION," * nb_write_re : %d",nb_write_re); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp
r138 r139 22 22 #define FUNCTION "Commit_unit::Parameters" 23 23 Parameters::Parameters (uint32_t nb_front_end , 24 uint32_t * nb_context , 25 uint32_t nb_rename_unit , 26 uint32_t size_queue , 27 uint32_t nb_bank , 28 Tretire_ooo_scheme_t retire_ooo_scheme , 29 uint32_t * nb_inst_insert , 30 uint32_t * nb_inst_retire , 31 uint32_t nb_inst_commit , 32 uint32_t nb_inst_reexecute , 33 uint32_t nb_inst_branch_complete , 34 uint32_t ** nb_branch_speculated , 24 uint32_t * nb_context ,//[nb_front_end] 25 uint32_t nb_rename_unit , 26 uint32_t size_queue , 27 uint32_t nb_bank , 28 Tretire_ooo_scheme_t retire_ooo_scheme , 29 uint32_t * nb_inst_insert ,//[nb_rename_unit] 30 uint32_t * nb_inst_retire ,//[nb_rename_unit] 31 uint32_t nb_inst_commit , 32 uint32_t nb_inst_reexecute , 33 uint32_t nb_inst_branch_complete , 34 uint32_t ** nb_branch_speculated ,//[nb_front_end][nb_context] 35 35 uint32_t size_nb_inst_decod , 36 36 uint32_t size_general_data , … … 39 39 uint32_t size_general_register , 40 40 uint32_t size_special_register , 41 Trat_scheme_t * rat_scheme ,//[nb_front_end] 41 42 Tpriority_t priority , 42 43 Tload_balancing_t load_balancing , 43 44 uint32_t nb_rename_unit_select , 44 45 uint32_t nb_thread , 45 uint32_t ** translate_num_context_to_num_thread, 46 uint32_t ** translate_num_context_to_num_thread,//[nb_front_end][nb_context] 46 47 bool is_toplevel): 47 48 _nb_bank_access_commit (1 ) … … 61 62 _nb_inst_branch_complete = nb_inst_branch_complete ; 62 63 _nb_branch_speculated = nb_branch_speculated ; 64 _rat_scheme = rat_scheme ; 63 65 _priority = priority ; 64 66 _load_balancing = load_balancing ;
Note: See TracChangeset
for help on using the changeset viewer.