- Timestamp:
- May 16, 2009, 4:42:39 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h
r111 r117 41 41 CONTEXT_STATE_KO_MSYNC_EXEC , // wait completion of msync operation 42 42 // CONTEXT_STATE_KO_PSYNC , // wait completion of all operation and after flush pipeline 43 CONTEXT_STATE_KO_PSYNC_FLUSH , // wait completion of all 43 CONTEXT_STATE_KO_PSYNC_FLUSH , // wait completion of all 44 44 CONTEXT_STATE_KO_PSYNC_ADDR , // wait completion of all 45 45 // CONTEXT_STATE_KO_CSYNC , // wait completion of all operation and after flush pipeline and flush ALL units (MMU, cache ...) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r111 r117 352 352 log_printf(TRACE,Context_State,FUNCTION," * BRANCH_COMPLETE [%d]",i); 353 353 354 context_state_t state = reg_STATE [i]; 354 Tcontext_t context_id = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0; 355 356 context_state_t state = reg_STATE [context_id]; 355 357 356 358 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0; 357 Tdepth_t depth_cur = reg_EVENT_DEPTH [ i];358 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [ i]):0;359 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [ i];359 Tdepth_t depth_cur = reg_EVENT_DEPTH [context_id]; 360 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context_id]):0; 361 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [context_id]; 360 362 361 363 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min)); … … 375 377 ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth 376 378 379 log_printf(TRACE,Context_State,FUNCTION," * context_id: %d",context_id); 377 380 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth ); 378 381 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur ); … … 387 390 if (is_valid) 388 391 { 389 // reg_STATE [ i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;390 reg_STATE [ i] = CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE;391 reg_EVENT_DEPTH [ i] = depth;392 // reg_STATE [context_id] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 393 reg_STATE [context_id] = CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE; 394 reg_EVENT_DEPTH [context_id] = depth; 392 395 } 393 396 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/src/Instruction.cpp
r101 r117 24 24 namespace decod { 25 25 26 #define EXTENDS(x,nb_bits) extend<Tgeneral_data_t>( 32, x,true ,nb_bits)27 #define EXTENDZ(x,nb_bits) extend<Tgeneral_data_t>( 32, x,false,nb_bits)26 #define EXTENDS(x,nb_bits) extend<Tgeneral_data_t>(param->_size_data, x,true ,nb_bits) 27 #define EXTENDZ(x,nb_bits) extend<Tgeneral_data_t>(param->_size_data, x,false,nb_bits) 28 28 29 29 void instruction_decod (decod_instruction_t * inst, decod_param_t * param) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp
r112 r117 52 52 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 53 53 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 54 55 sc_signal<Tcontrol_t > *** in_IFETCH_VAL ; 56 sc_signal<Tcontrol_t > *** out_IFETCH_ACK ; 57 sc_signal<Tinstruction_t > *** in_IFETCH_INSTRUCTION ; 58 59 sc_signal<Tcontext_t > ** in_IFETCH_CONTEXT_ID ; 60 sc_signal<Tgeneral_address_t > ** in_IFETCH_ADDRESS ; 61 //sc_signal<Tgeneral_address_t > ** in_IFETCH_ADDRESS_NEXT ; 62 sc_signal<Tinst_ifetch_ptr_t > ** in_IFETCH_INST_IFETCH_PTR ; 63 sc_signal<Tbranch_state_t > ** in_IFETCH_BRANCH_STATE ; 64 sc_signal<Tprediction_ptr_t > ** in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ; 65 sc_signal<Texception_t > ** in_IFETCH_EXCEPTION ; 66 67 sc_signal<Tcontrol_t > ** out_DECOD_VAL ; 68 sc_signal<Tcontrol_t > ** in_DECOD_ACK ; 69 sc_signal<Tcontext_t > ** out_DECOD_CONTEXT_ID ; 70 sc_signal<Tdepth_t > ** out_DECOD_DEPTH ; 71 sc_signal<Ttype_t > ** out_DECOD_TYPE ; 72 sc_signal<Toperation_t > ** out_DECOD_OPERATION ; 73 sc_signal<Tcontrol_t > ** out_DECOD_NO_EXECUTE ; 74 sc_signal<Tcontrol_t > ** out_DECOD_IS_DELAY_SLOT ; 75 sc_signal<Tgeneral_data_t > ** out_DECOD_ADDRESS ; 76 77 sc_signal<Tgeneral_data_t > ** out_DECOD_ADDRESS_NEXT ; 78 sc_signal<Tcontrol_t > ** out_DECOD_HAS_IMMEDIAT ; 79 sc_signal<Tgeneral_data_t > ** out_DECOD_IMMEDIAT ; 80 sc_signal<Tcontrol_t > ** out_DECOD_READ_RA ; 81 sc_signal<Tgeneral_address_t > ** out_DECOD_NUM_REG_RA ; 82 sc_signal<Tcontrol_t > ** out_DECOD_READ_RB ; 83 sc_signal<Tgeneral_address_t > ** out_DECOD_NUM_REG_RB ; 84 sc_signal<Tcontrol_t > ** out_DECOD_READ_RC ; 85 sc_signal<Tspecial_address_t > ** out_DECOD_NUM_REG_RC ; 86 sc_signal<Tcontrol_t > ** out_DECOD_WRITE_RD ; 87 sc_signal<Tgeneral_address_t > ** out_DECOD_NUM_REG_RD ; 88 sc_signal<Tcontrol_t > ** out_DECOD_WRITE_RE ; 89 sc_signal<Tspecial_address_t > ** out_DECOD_NUM_REG_RE ; 90 sc_signal<Texception_t > ** out_DECOD_EXCEPTION_USE ; 91 sc_signal<Texception_t > ** out_DECOD_EXCEPTION ; 92 93 sc_signal<Tcontrol_t > ** out_PREDICT_VAL ; 94 sc_signal<Tcontrol_t > ** in_PREDICT_ACK ; 95 sc_signal<Tcontext_t > ** out_PREDICT_CONTEXT_ID ; 96 sc_signal<Tcontrol_t > ** out_PREDICT_MATCH_INST_IFETCH_PTR ; 97 sc_signal<Tbranch_state_t > ** out_PREDICT_BRANCH_STATE ; 98 sc_signal<Tprediction_ptr_t > ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID; 99 sc_signal<Tbranch_condition_t> ** out_PREDICT_BRANCH_CONDITION ; 100 //sc_signal<Tcontrol_t > ** out_PREDICT_BRANCH_STACK_WRITE ; 101 sc_signal<Tcontrol_t > ** out_PREDICT_BRANCH_DIRECTION ; 102 sc_signal<Tgeneral_data_t > ** out_PREDICT_ADDRESS_SRC ; 103 sc_signal<Tgeneral_data_t > ** out_PREDICT_ADDRESS_DEST ; 104 sc_signal<Tcontrol_t > ** in_PREDICT_CAN_CONTINUE ; 105 106 sc_signal<Tdepth_t > ** in_DEPTH_MIN ; 107 sc_signal<Tdepth_t > ** in_DEPTH_MAX ; 108 sc_signal<Tcontrol_t > ** in_DEPTH_FULL ; 109 110 sc_signal<Tcounter_t > ** out_NB_INST_DECOD_ALL ; 111 112 sc_signal<Tcontrol_t > ** in_CONTEXT_DECOD_ENABLE ; 113 sc_signal<Tcontrol_t > ** in_CONTEXT_DEPTH_VAL ; 114 sc_signal<Tdepth_t > ** in_CONTEXT_DEPTH ; 115 116 sc_signal<Tcontrol_t > * out_CONTEXT_EVENT_VAL ; 117 sc_signal<Tcontrol_t > * in_CONTEXT_EVENT_ACK ; 118 sc_signal<Tcontext_t > * out_CONTEXT_EVENT_CONTEXT_ID ; 119 sc_signal<Tdepth_t > * out_CONTEXT_EVENT_DEPTH ; 120 sc_signal<Tevent_type_t > * out_CONTEXT_EVENT_TYPE ; 121 sc_signal<Tcontrol_t > * out_CONTEXT_EVENT_IS_DELAY_SLOT ; 122 sc_signal<Tgeneral_data_t > * out_CONTEXT_EVENT_ADDRESS ; 123 sc_signal<Tgeneral_data_t > * out_CONTEXT_EVENT_ADDRESS_EPCR ; 124 125 54 126 55 127 ALLOC2_SC_SIGNAL( in_IFETCH_VAL ," in_IFETCH_VAL ",Tcontrol_t ,_param->_nb_context, _param->_nb_inst_fetch[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
r112 r117 242 242 243 243 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 244 directory_init (); 245 244 246 branchement_log_file = new std::ofstream [_param->_nb_thread]; 245 247 for (uint32_t i=0; i<_param->_nb_thread; ++i) 246 248 if (_param->_have_thread [i]) 247 249 { 248 std::string filename = "Branchement_prediction-thread_" + toString(i) +".log";250 std::string filename = MORPHEO_LOG+"/"+toString(getpid())+"-Branchement_prediction-thread_"+toString(i)+".log"; 249 251 250 252 branchement_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc);
Note: See TracChangeset
for help on using the changeset viewer.