Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src
- Files:
-
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit.cpp
r81 r88 42 42 allocation (); 43 43 44 #if DEBUG_Functionnal_unit == true 45 log_printf(INFO,Functionnal_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); 46 47 std::cout << *param << std::endl; 48 #endif 49 44 50 #ifdef STATISTICS 45 if ( _usage & USE_STATISTICS)51 if (usage_is_set(_usage,USE_STATISTICS)) 46 52 { 47 53 log_printf(INFO,Functionnal_unit,FUNCTION,"Allocation of statistics"); … … 52 58 53 59 #ifdef VHDL 54 if ( _usage & USE_VHDL)60 if (usage_is_set(_usage,USE_VHDL)) 55 61 { 56 62 // generate the vhdl … … 62 68 63 69 #ifdef SYSTEMC 64 if ( _usage & USE_SYSTEMC)70 if (usage_is_set(_usage,USE_SYSTEMC)) 65 71 { 66 72 log_printf(INFO,Functionnal_unit,FUNCTION,"Method - transition"); … … 84 90 # endif 85 91 86 log_printf(INFO,Functionnal_unit,FUNCTION,"Method - genMealy");87 88 SC_METHOD (genMealy);89 dont_initialize ();90 sensitive << (*(in_CLOCK)).neg()91 << (*(in_EXECUTE_OUT_ACK));92 93 # ifdef SYSTEMCASS_SPECIFIC94 // List dependency information95 (*(out_EXECUTE_IN_ACK)) (*(in_EXECUTE_OUT_ACK));96 # endif97 98 92 #endif 99 93 } … … 108 102 109 103 #ifdef STATISTICS 110 if ( _usage & USE_STATISTICS)104 if (usage_is_set(_usage,USE_STATISTICS)) 111 105 { 112 106 log_printf(INFO,Functionnal_unit,FUNCTION,"Generate Statistics file"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp
r81 r88 67 67 if (_param->_have_port_ooo_engine_id) 68 68 in_EXECUTE_IN_OOO_ENGINE_ID = interface->set_signal_in <Tcontext_t > ("ooo_engine_id", _param->_size_ooo_engine_id); 69 if (_param->_have_port_ packet_id)70 in_EXECUTE_IN_PACKET_ID = interface->set_signal_in <Tpacket_t > ("packet_id" , _param->_size_ packet_id);69 if (_param->_have_port_rob_ptr) 70 in_EXECUTE_IN_PACKET_ID = interface->set_signal_in <Tpacket_t > ("packet_id" , _param->_size_rob_ptr ); 71 71 in_EXECUTE_IN_OPERATION = interface->set_signal_in <Toperation_t > ("operation" , _param->_size_operation ); 72 72 in_EXECUTE_IN_TYPE = interface->set_signal_in <Ttype_t > ("type" , _param->_size_type ); 73 in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write", log2(_param->_size_store_queue));73 in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write",_param->_size_store_queue_ptr); 74 74 if (_param->_have_port_load_queue_ptr) 75 in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" , log2(_param->_size_load_queue));75 in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" ,_param->_size_load_queue_ptr); 76 76 in_EXECUTE_IN_HAS_IMMEDIAT = interface->set_signal_in <Tcontrol_t > ("has_immediat" , 1); 77 77 in_EXECUTE_IN_IMMEDIAT = interface->set_signal_in <Tgeneral_data_t > ("immediat" , _param->_size_general_data); … … 102 102 if (_param->_have_port_ooo_engine_id) 103 103 out_EXECUTE_OUT_OOO_ENGINE_ID = interface->set_signal_out<Tcontext_t > ("ooo_engine_id",_param->_size_ooo_engine_id); 104 if (_param->_have_port_ packet_id)105 out_EXECUTE_OUT_PACKET_ID = interface->set_signal_out<Tpacket_t > ("packet_id" ,_param->_size_ packet_id);104 if (_param->_have_port_rob_ptr) 105 out_EXECUTE_OUT_PACKET_ID = interface->set_signal_out<Tpacket_t > ("packet_id" ,_param->_size_rob_ptr ); 106 106 //out_EXECUTE_OUT_OPERATION = interface->set_signal_out<Toperation_t > ("operation" ,_param->_size_operation ); 107 107 out_EXECUTE_OUT_TYPE = interface->set_signal_out<Ttype_t > ("type" ,_param->_size_type ); … … 117 117 } 118 118 119 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 _execute_operation = new execute_operation_t; 121 _execute_param = new execute_param_t(_param->_size_general_data, 122 _param->_timing); 119 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 120 if (usage_is_set(_usage,USE_SYSTEMC)) 121 { 122 _execute_operation_in = new execute_operation_t; 123 _execute_operation_out = new execute_operation_t; 124 _execute_param = new execute_param_t(_param->_size_general_data, 125 _param->_timing); 123 126 124 127 _execute_register = new execute_register_t *** [_param->_nb_context]; … … 134 137 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 135 138 { 136 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,137 j,_param->_size_front_end_id,138 k,_param->_size_ooo_engine_id);139 // uint32_t num_thread = get_num_thread(i,_param->_size_context_id, 140 // j,_param->_size_front_end_id, 141 // k,_param->_size_ooo_engine_id); 139 142 140 143 _execute_register [i][j][k] = new execute_register_t; … … 144 147 145 148 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++) 146 if ((_param->_get_custom_information( num_thread))._get_valid_group(x) == true)149 if ((_param->_get_custom_information())._get_valid_group(x) == true) 147 150 { 148 uint32_t nb_reg = (_param->_get_custom_information( num_thread))._get_nb_register(x);151 uint32_t nb_reg = (_param->_get_custom_information())._get_nb_register(x); 149 152 _execute_register[i][j][k]->implement_group(x,nb_reg); 150 153 151 154 for (uint32_t y=0; y<nb_reg; y++) 152 _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information( num_thread))._get_access_mode(x,y));155 _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information())._get_access_mode(x,y)); 153 156 } 154 157 } … … 211 214 if (_param->_timing[TYPE_TEST ][OPERATION_TEST_L_SFNE ]._latence > 0) 212 215 _function_execute[TYPE_TEST ][OPERATION_TEST_L_SFNE ] = &(operation_l_sfne ); 213 // if (_param->_timing[TYPE_MUL _DIV][OPERATION_MUL_DIV_L_MUL]._latence > 0)214 // _function_execute[TYPE_MUL _DIV][OPERATION_MUL_DIV_L_MUL] = &(operation_l_mul );215 // if (_param->_timing[TYPE_MUL _DIV][OPERATION_MUL_DIV_L_MULU]._latence > 0)216 // _function_execute[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_MULU] = &(operation_l_mulu );217 // if (_param->_timing[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_DIV]._latence > 0)218 // _function_execute[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_DIV] = &(operation_l_div );219 // if (_param->_timing[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_DIVU]._latence > 0)220 // _function_execute[TYPE_ MUL_DIV][OPERATION_MUL_DIV_L_DIVU] = &(operation_l_divu );216 // if (_param->_timing[TYPE_MUL ][OPERATION_MUL_L_MUL ]._latence > 0) 217 // _function_execute[TYPE_MUL ][OPERATION_MUL_L_MUL ] = &(operation_l_mul ); 218 // if (_param->_timing[TYPE_MUL ][OPERATION_MUL_L_MULU ]._latence > 0) 219 // _function_execute[TYPE_DIV ][OPERATION_MUL_L_MULU ] = &(operation_l_mulu ); 220 // if (_param->_timing[TYPE_DIV ][OPERATION_DIV_L_DIV ]._latence > 0) 221 // _function_execute[TYPE_DIV ][OPERATION_DIV_L_DIV ] = &(operation_l_div ); 222 // if (_param->_timing[TYPE_DIV ][OPERATION_DIV_L_DIVU ]._latence > 0) 223 // _function_execute[TYPE_DIV ][OPERATION_DIV_L_DIVU ] = &(operation_l_divu ); 221 224 if (_param->_timing[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ]._latence > 0) 222 225 _function_execute[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ] = &(operation_l_extend_s); … … 243 246 if (_param->_timing[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR ]._latence > 0) 244 247 _function_execute[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR ] = &(operation_l_jalr ); 245 246 247 248 #ifdef POSITION 249 _component->generate_file();248 } 249 250 #ifdef POSITION 251 if (usage_is_set(_usage,USE_POSITION)) 252 _component->generate_file(); 250 253 #endif 251 254 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp
r81 r88 24 24 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 25 25 26 if ( _usage & USE_SYSTEMC)26 if (usage_is_set(_usage,USE_SYSTEMC)) 27 27 { 28 28 delete in_CLOCK ; … … 37 37 if (_param->_have_port_ooo_engine_id) 38 38 delete in_EXECUTE_IN_OOO_ENGINE_ID ; 39 if (_param->_have_port_ packet_id)39 if (_param->_have_port_rob_ptr) 40 40 delete in_EXECUTE_IN_PACKET_ID ; 41 41 delete in_EXECUTE_IN_OPERATION ; … … 62 62 if (_param->_have_port_ooo_engine_id) 63 63 delete out_EXECUTE_OUT_OOO_ENGINE_ID ; 64 if (_param->_have_port_ packet_id)64 if (_param->_have_port_rob_ptr) 65 65 delete out_EXECUTE_OUT_PACKET_ID ; 66 66 //delete out_EXECUTE_OUT_OPERATION ; … … 75 75 delete out_EXECUTE_OUT_NO_SEQUENCE ; 76 76 delete out_EXECUTE_OUT_ADDRESS ; 77 78 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 79 80 delete [] _execute_register; 81 delete _execute_param; 82 delete _execute_operation_in; 83 delete _execute_operation_out; 84 delete [] _function_execute; 77 85 } 78 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~79 80 delete [] _execute_register;81 delete _execute_param;82 delete _execute_operation;83 delete [] _function_execute;84 86 85 87 delete _component; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_end_cycle.cpp
r81 r88 26 26 27 27 #ifdef STATISTICS 28 _stat->end_cycle(); 28 if (usage_is_set(_usage,USE_STATISTICS)) 29 _stat->end_cycle(); 29 30 #endif 30 31 … … 32 33 // Evaluation before read the ouput signal 33 34 // sc_start(0); 34 _interfaces->testbench(); 35 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 36 _interfaces->testbench(); 35 37 #endif 36 38 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMoore.cpp
r81 r88 23 23 void Functionnal_unit::genMoore (void) 24 24 { 25 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 25 log_begin(Functionnal_unit,FUNCTION); 26 log_function(Functionnal_unit,FUNCTION,_name.c_str()); 26 27 27 internal_EXECUTE_OUT_VAL = reg_BUSY and (_execute_operation->_timing._latence == 0); 28 { 29 internal_EXECUTE_IN_ACK = not reg_BUSY_IN; 30 31 PORT_WRITE(out_EXECUTE_IN_ACK , internal_EXECUTE_IN_ACK); 32 } 28 33 29 PORT_WRITE(out_EXECUTE_OUT_VAL , internal_EXECUTE_OUT_VAL); 30 if (_param->_have_port_context_id) 31 PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID ,_execute_operation->_context_id ); 32 if (_param->_have_port_front_end_id) 33 PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation->_front_end_id ); 34 if (_param->_have_port_ooo_engine_id) 35 PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation->_ooo_engine_id); 36 if (_param->_have_port_packet_id) 37 PORT_WRITE(out_EXECUTE_OUT_PACKET_ID ,_execute_operation->_packet_id ); 38 //PORT_WRITE(out_EXECUTE_OUT_OPERATION ,_execute_operation->_operation ); 39 PORT_WRITE(out_EXECUTE_OUT_TYPE ,_execute_operation->_type ); 40 PORT_WRITE(out_EXECUTE_OUT_WRITE_RD ,_execute_operation->_write_rd ); 41 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD ,_execute_operation->_num_reg_rd ); 42 PORT_WRITE(out_EXECUTE_OUT_DATA_RD ,_execute_operation->_data_rd ); 43 PORT_WRITE(out_EXECUTE_OUT_WRITE_RE ,_execute_operation->_write_re ); 44 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE ,_execute_operation->_num_reg_re ); 45 PORT_WRITE(out_EXECUTE_OUT_DATA_RE ,_execute_operation->_data_re ); 46 PORT_WRITE(out_EXECUTE_OUT_EXCEPTION ,_execute_operation->_exception ); 47 PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE ,_execute_operation->_no_sequence ); 48 PORT_WRITE(out_EXECUTE_OUT_ADDRESS ,_execute_operation->_address ); 34 { 35 internal_EXECUTE_OUT_VAL = reg_BUSY_OUT and (_execute_operation_out->_timing._latence == 0); 36 37 PORT_WRITE(out_EXECUTE_OUT_VAL , internal_EXECUTE_OUT_VAL); 38 if (_param->_have_port_context_id) 39 PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID ,_execute_operation_out->_context_id ); 40 if (_param->_have_port_front_end_id) 41 PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation_out->_front_end_id ); 42 if (_param->_have_port_ooo_engine_id) 43 PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation_out->_ooo_engine_id); 44 if (_param->_have_port_rob_ptr) 45 PORT_WRITE(out_EXECUTE_OUT_PACKET_ID ,_execute_operation_out->_packet_id ); 46 // PORT_WRITE(out_EXECUTE_OUT_OPERATION ,_execute_operation_out->_operation ); 47 PORT_WRITE(out_EXECUTE_OUT_TYPE ,_execute_operation_out->_type ); 48 PORT_WRITE(out_EXECUTE_OUT_WRITE_RD ,_execute_operation_out->_write_rd ); 49 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD ,_execute_operation_out->_num_reg_rd ); 50 PORT_WRITE(out_EXECUTE_OUT_DATA_RD ,_execute_operation_out->_data_rd ); 51 PORT_WRITE(out_EXECUTE_OUT_WRITE_RE ,_execute_operation_out->_write_re ); 52 PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE ,_execute_operation_out->_num_reg_re ); 53 PORT_WRITE(out_EXECUTE_OUT_DATA_RE ,_execute_operation_out->_data_re ); 54 PORT_WRITE(out_EXECUTE_OUT_EXCEPTION ,_execute_operation_out->_exception ); 55 PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE ,_execute_operation_out->_no_sequence ); 56 PORT_WRITE(out_EXECUTE_OUT_ADDRESS ,_execute_operation_out->_address ); 57 } 49 58 50 log_ printf(FUNC,Functionnal_unit,FUNCTION,"End");59 log_end(Functionnal_unit,FUNCTION); 51 60 }; 52 61 … … 57 66 }; // end namespace multi_execute_loop 58 67 }; // end namespace core 59 60 68 }; // end namespace behavioural 61 69 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp
r81 r88 23 23 void Functionnal_unit::transition (void) 24 24 { 25 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 25 log_begin(Functionnal_unit,FUNCTION); 26 log_function(Functionnal_unit,FUNCTION,_name.c_str()); 26 27 27 28 if (PORT_READ(in_NRESET) == 0) 28 29 { 29 reg_BUSY = false; 30 reg_BUSY_IN = false; 31 reg_BUSY_OUT = false; 30 32 31 33 for (uint32_t i=0; i<_param->_nb_context; i++) … … 33 35 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 34 36 { 35 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,36 j,_param->_size_front_end_id,37 k,_param->_size_ooo_engine_id);37 // uint32_t num_thread = get_num_thread(i,_param->_size_context_id, 38 // j,_param->_size_front_end_id, 39 // k,_param->_size_ooo_engine_id); 38 40 39 41 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++) 40 42 { 41 function_execute_end_cycle_t * fct = (_param->_get_custom_information( num_thread)._get_custom_execute_reset(x));43 function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_reset(x)); 42 44 43 45 if (fct != NULL) … … 51 53 if (internal_EXECUTE_OUT_VAL and PORT_READ(in_EXECUTE_OUT_ACK)) 52 54 { 55 log_printf(TRACE,Functionnal_unit,FUNCTION," * EXECUTE_OUT : Transaction Accepted"); 53 56 // transaction 54 reg_BUSY = false;57 reg_BUSY_OUT = false; 55 58 } 56 59 … … 60 63 if (PORT_READ(in_EXECUTE_IN_VAL) and internal_EXECUTE_IN_ACK) 61 64 { 62 reg_BUSY = true; 65 log_printf(TRACE,Functionnal_unit,FUNCTION," * EXECUTE_IN : Transaction Accepted"); 66 67 reg_BUSY_IN = true; 63 68 64 69 Tcontext_t context_id = (_param->_have_port_context_id )?PORT_READ(in_EXECUTE_IN_CONTEXT_ID ):0; 65 70 Tcontext_t front_end_id = (_param->_have_port_front_end_id )?PORT_READ(in_EXECUTE_IN_FRONT_END_ID ):0; 66 71 Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_EXECUTE_IN_OOO_ENGINE_ID):0; 67 Tcontext_t packet_id = (_param->_have_port_ packet_id)?PORT_READ(in_EXECUTE_IN_PACKET_ID ):0;72 Tcontext_t packet_id = (_param->_have_port_rob_ptr )?PORT_READ(in_EXECUTE_IN_PACKET_ID ):0; 68 73 Toperation_t operation = PORT_READ(in_EXECUTE_IN_OPERATION); 69 74 Ttype_t type = PORT_READ(in_EXECUTE_IN_TYPE); 70 75 71 _execute_operation->_context_id = context_id ; 72 _execute_operation->_front_end_id = front_end_id ; 73 _execute_operation->_ooo_engine_id = ooo_engine_id; 74 _execute_operation->_packet_id = packet_id ; 75 _execute_operation->_operation = operation ; 76 _execute_operation->_type = type ; 77 _execute_operation->_has_immediat = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT); 78 _execute_operation->_immediat = PORT_READ(in_EXECUTE_IN_IMMEDIAT ); 79 _execute_operation->_data_ra = PORT_READ(in_EXECUTE_IN_DATA_RA ); 80 _execute_operation->_data_rb = PORT_READ(in_EXECUTE_IN_DATA_RB ); 81 _execute_operation->_data_rc = PORT_READ(in_EXECUTE_IN_DATA_RC ); 82 _execute_operation->_write_rd = PORT_READ(in_EXECUTE_IN_WRITE_RD ); 83 _execute_operation->_num_reg_rd = PORT_READ(in_EXECUTE_IN_NUM_REG_RD ); 84 _execute_operation->_write_re = PORT_READ(in_EXECUTE_IN_WRITE_RE ); 85 _execute_operation->_num_reg_re = PORT_READ(in_EXECUTE_IN_NUM_REG_RE ); 86 76 _execute_operation_in->_context_id = context_id ; 77 _execute_operation_in->_front_end_id = front_end_id ; 78 _execute_operation_in->_ooo_engine_id = ooo_engine_id; 79 _execute_operation_in->_packet_id = packet_id ; 80 _execute_operation_in->_operation = operation ; 81 _execute_operation_in->_type = type ; 82 _execute_operation_in->_has_immediat = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT); 83 _execute_operation_in->_immediat = PORT_READ(in_EXECUTE_IN_IMMEDIAT ); 84 _execute_operation_in->_data_ra = PORT_READ(in_EXECUTE_IN_DATA_RA ); 85 _execute_operation_in->_data_rb = PORT_READ(in_EXECUTE_IN_DATA_RB ); 86 _execute_operation_in->_data_rc = PORT_READ(in_EXECUTE_IN_DATA_RC ); 87 _execute_operation_in->_write_rd = PORT_READ(in_EXECUTE_IN_WRITE_RD ); 88 _execute_operation_in->_num_reg_rd = PORT_READ(in_EXECUTE_IN_NUM_REG_RD ); 89 _execute_operation_in->_write_re = PORT_READ(in_EXECUTE_IN_WRITE_RE ); 90 _execute_operation_in->_num_reg_re = PORT_READ(in_EXECUTE_IN_NUM_REG_RE ); 91 92 log_printf(TRACE,Functionnal_unit,FUNCTION," * context_id : %d",_execute_operation_in->_context_id ); 93 log_printf(TRACE,Functionnal_unit,FUNCTION," * front_end_id : %d",_execute_operation_in->_front_end_id ); 94 log_printf(TRACE,Functionnal_unit,FUNCTION," * ooo_engine_id : %d",_execute_operation_in->_ooo_engine_id); 95 log_printf(TRACE,Functionnal_unit,FUNCTION," * packet_id : %d",_execute_operation_in->_packet_id ); 96 log_printf(TRACE,Functionnal_unit,FUNCTION," * operation : %d",_execute_operation_in->_operation ); 97 log_printf(TRACE,Functionnal_unit,FUNCTION," * type : %s",toString_type(_execute_operation_in->_type).c_str()); 98 log_printf(TRACE,Functionnal_unit,FUNCTION," * has_immediat : %d",_execute_operation_in->_has_immediat ); 99 log_printf(TRACE,Functionnal_unit,FUNCTION," * immediat : %.8x",_execute_operation_in->_immediat ); 100 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra : %.8x",_execute_operation_in->_data_ra ); 101 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb : %.8x",_execute_operation_in->_data_rb ); 102 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rc : %.8x",_execute_operation_in->_data_rc ); 103 log_printf(TRACE,Functionnal_unit,FUNCTION," * write_rd : %d" ,_execute_operation_in->_write_rd ); 104 log_printf(TRACE,Functionnal_unit,FUNCTION," * num_reg_rd : %d" ,_execute_operation_in->_num_reg_rd ); 105 log_printf(TRACE,Functionnal_unit,FUNCTION," * write_re : %d" ,_execute_operation_in->_write_re ); 106 log_printf(TRACE,Functionnal_unit,FUNCTION," * num_reg_re : %d" ,_execute_operation_in->_num_reg_re ); 107 87 108 #ifdef DEBUG_TEST 88 109 if (type >= _param->_nb_type) … … 98 119 if (type == TYPE_CUSTOM) 99 120 { 100 uint32_t num_thread = get_num_thread(context_id ,_param->_size_context_id,101 front_end_id ,_param->_size_front_end_id,102 ooo_engine_id,_param->_size_ooo_engine_id);103 104 (*(_param->_get_custom_information( num_thread)._get_custom_execute_genMoore(operation))) (_execute_operation, execute_register, _execute_param);121 // uint32_t num_thread = get_num_thread(context_id ,_param->_size_context_id, 122 // front_end_id ,_param->_size_front_end_id, 123 // ooo_engine_id,_param->_size_ooo_engine_id); 124 125 (*(_param->_get_custom_information()._get_custom_execute_genMoore(operation))) (_execute_operation_in, execute_register, _execute_param); 105 126 } 106 127 else 107 (*(_function_execute[type][operation])) (_execute_operation, execute_register, _execute_param); 108 128 (*(_function_execute[type][operation])) (_execute_operation_in, execute_register, _execute_param); 129 130 131 log_printf(TRACE,Functionnal_unit,FUNCTION," -----------------"); 132 log_printf(TRACE,Functionnal_unit,FUNCTION," * latence : %.8x",_execute_operation_in->_timing._latence); 133 log_printf(TRACE,Functionnal_unit,FUNCTION," * delay : %.8x",_execute_operation_in->_timing._delay); 134 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rd : %.8x",_execute_operation_in->_data_rd ); 135 log_printf(TRACE,Functionnal_unit,FUNCTION," * data_re : %.8x",_execute_operation_in->_data_re ); 136 log_printf(TRACE,Functionnal_unit,FUNCTION," * exception : %d" ,_execute_operation_in->_exception ); 137 log_printf(TRACE,Functionnal_unit,FUNCTION," * no_sequence : %d" ,_execute_operation_in->_no_sequence); 138 log_printf(TRACE,Functionnal_unit,FUNCTION," * address : %.8x",_execute_operation_in->_address ); 109 139 110 140 #ifdef STATISTICS 111 (*_stat_use_functionnal_unit) ++; 112 (*_stat_sum_delay) += _execute_operation->_timing._delay; 113 (*_stat_sum_latence) += _execute_operation->_timing._latence; 141 if (usage_is_set(_usage,USE_STATISTICS)) 142 { 143 (*_stat_use_functionnal_unit) ++; 144 (*_stat_sum_delay) += _execute_operation_in->_timing._delay; 145 (*_stat_sum_latence) += _execute_operation_in->_timing._latence; 146 } 114 147 #endif 115 148 } … … 121 154 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 122 155 { 123 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,124 j,_param->_size_front_end_id,125 k,_param->_size_ooo_engine_id);156 // uint32_t num_thread = get_num_thread(i,_param->_size_context_id, 157 // j,_param->_size_front_end_id, 158 // k,_param->_size_ooo_engine_id); 126 159 127 160 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++) 128 161 { 129 function_execute_end_cycle_t * fct = (_param->_get_custom_information( num_thread)._get_custom_execute_transition(x));162 function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_transition(x)); 130 163 131 164 if (fct != NULL) … … 142 175 } 143 176 } 177 178 if (reg_BUSY_IN and not reg_BUSY_OUT) 179 { 180 reg_BUSY_OUT = reg_BUSY_IN; 181 reg_BUSY_IN = false; 182 183 _execute_operation_out->_timing = _execute_operation_in->_timing ; 184 _execute_operation_out->_context_id = _execute_operation_in->_context_id ; 185 _execute_operation_out->_front_end_id = _execute_operation_in->_front_end_id ; 186 _execute_operation_out->_ooo_engine_id = _execute_operation_in->_ooo_engine_id; 187 _execute_operation_out->_packet_id = _execute_operation_in->_packet_id ; 188 _execute_operation_out->_operation = _execute_operation_in->_operation ; 189 _execute_operation_out->_type = _execute_operation_in->_type ; 190 _execute_operation_out->_has_immediat = _execute_operation_in->_has_immediat ; 191 _execute_operation_out->_immediat = _execute_operation_in->_immediat ; 192 _execute_operation_out->_data_ra = _execute_operation_in->_data_ra ; 193 _execute_operation_out->_data_rb = _execute_operation_in->_data_rb ; 194 _execute_operation_out->_data_rc = _execute_operation_in->_data_rc ; 195 _execute_operation_out->_data_rd = _execute_operation_in->_data_rd ; 196 _execute_operation_out->_data_re = _execute_operation_in->_data_re ; 197 _execute_operation_out->_write_rd = _execute_operation_in->_write_rd ; 198 _execute_operation_out->_num_reg_rd = _execute_operation_in->_num_reg_rd ; 199 _execute_operation_out->_write_re = _execute_operation_in->_write_re ; 200 _execute_operation_out->_num_reg_re = _execute_operation_in->_num_reg_re ; 201 _execute_operation_out->_exception = _execute_operation_in->_exception ; 202 _execute_operation_out->_no_sequence = _execute_operation_in->_no_sequence ; 203 _execute_operation_out->_address = _execute_operation_in->_address ; 204 } 205 206 // each cycle : decrease the latence 207 if (reg_BUSY_OUT and (_execute_operation_out->_timing._latence > 0)) 208 _execute_operation_out->_timing._latence --; 144 209 } 145 146 // each cycle : decrease the latence147 if (reg_BUSY and (_execute_operation->_timing._latence > 0))148 _execute_operation->_timing._latence --;149 210 150 211 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) … … 152 213 #endif 153 214 154 log_ printf(FUNC,Functionnal_unit,FUNCTION,"End");215 log_end(Functionnal_unit,FUNCTION); 155 216 }; 156 217 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp
r81 r88 31 31 uint32_t size_load_queue , 32 32 execute_timing_t** timing , 33 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t)) : 34 _nb_context (nb_context ), 35 _nb_front_end (nb_front_end ), 36 _nb_ooo_engine (nb_ooo_engine ), 37 _nb_packet (nb_packet ), 38 _size_general_data (size_general_data ), 39 _nb_general_register (nb_general_register ), 40 _size_special_data (size_special_data ), 41 _nb_special_register (nb_special_register ), 42 _size_store_queue (size_store_queue ), 43 _size_load_queue (size_load_queue ), 44 45 _size_context_id (log2(nb_context )), 46 _size_front_end_id (log2(nb_front_end )), 47 _size_ooo_engine_id (log2(nb_ooo_engine )), 48 _size_packet_id (log2(nb_packet )), 49 _size_general_register (log2(nb_general_register)), 50 _size_special_register (log2(nb_special_register)), 51 52 _have_port_context_id (_size_context_id > 0), 53 _have_port_front_end_id (_size_front_end_id > 0), 54 _have_port_ooo_engine_id (_size_ooo_engine_id > 0), 55 _have_port_packet_id (_size_packet_id > 0), 56 _have_port_load_queue_ptr(_size_load_queue > 1), 57 58 _have_groupe_MAC ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC ]._latence > 0) or 59 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or 60 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB ]._latence > 0)) 33 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void), 34 bool is_toplevel) 61 35 { 62 36 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 63 37 64 _timing = timing; 38 _nb_context = nb_context ; 39 _nb_front_end = nb_front_end ; 40 _nb_ooo_engine = nb_ooo_engine ; 41 _nb_packet = nb_packet ; 42 // _size_general_data = size_general_data ; 43 // _size_special_data = size_special_data ; 44 // _nb_general_register = nb_general_register ; 45 // _nb_special_register = nb_special_register ; 46 // _size_store_queue = size_store_queue ; 47 // _size_load_queue = size_load_queue ; 48 49 // _size_context_id = log2(nb_context ); 50 // _size_front_end_id = log2(nb_front_end ); 51 // _size_ooo_engine_id = log2(nb_ooo_engine ); 52 // _size_packet_id = log2(nb_packet ); 53 // _size_general_register = log2(nb_general_register); 54 // _size_special_register = log2(nb_special_register); 55 56 // _have_port_context_id = _size_context_id > 0; 57 // _have_port_front_end_id = _size_front_end_id > 0; 58 // _have_port_ooo_engine_id = _size_ooo_engine_id > 0; 59 // _have_port_packet_id = _size_packet_id > 0; 60 // _have_port_load_queue_ptr= _size_load_queue > 1; 61 62 _have_groupe_MAC = ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC ]._latence > 0) or 63 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or 64 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB ]._latence > 0)); 65 66 _timing = timing; 65 67 66 68 if (get_custom_information == NULL) … … 71 73 test(); 72 74 75 if (is_toplevel) 76 { 77 _size_context_id = log2(nb_context ); 78 _size_front_end_id = log2(nb_front_end ); 79 _size_ooo_engine_id = log2(nb_ooo_engine ); 80 _size_rob_ptr = log2(nb_packet ); 81 _size_general_register = log2(nb_general_register); 82 _size_special_register = log2(nb_special_register); 83 84 _size_general_data = size_general_data ; 85 _size_special_data = size_special_data ; 86 _size_general_register = log2(nb_general_register); 87 _size_special_register = log2(nb_special_register); 88 89 _size_load_queue_ptr = log2(size_load_queue ); 90 _size_store_queue_ptr = log2(size_store_queue); 91 92 _have_port_context_id = _size_context_id > 0; 93 _have_port_front_end_id = _size_front_end_id > 0; 94 _have_port_ooo_engine_id = _size_ooo_engine_id > 0; 95 _have_port_rob_ptr = _size_rob_ptr > 0; 96 _have_port_load_queue_ptr= _size_load_queue_ptr> 0; 97 98 copy(); 99 } 100 73 101 log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); 74 102 }; 75 103 104 // #undef FUNCTION 105 // #define FUNCTION "Functionnal_unit::Parameters (copy)" 106 // Parameters::Parameters (Parameters & param): 107 // _nb_context (param._nb_context ), 108 // _nb_front_end (param._nb_front_end ), 109 // _nb_ooo_engine (param._nb_ooo_engine ), 110 // _nb_packet (param._nb_packet ), 111 // _size_general_data (param._size_general_data ), 112 // _nb_general_register (param._nb_general_register ), 113 // _size_special_data (param._size_special_data ), 114 // _nb_special_register (param._nb_special_register ), 115 // _size_store_queue (param._size_store_queue ), 116 // _size_load_queue (param._size_load_queue ), 117 118 // _size_context_id (param._size_context_id ), 119 // _size_front_end_id (param._size_front_end_id ), 120 // _size_ooo_engine_id (param._size_ooo_engine_id ), 121 // _size_packet_id (param._size_packet_id ), 122 // _size_general_register (param._size_general_register ), 123 // _size_special_register (param._size_special_register ), 124 125 // _have_port_context_id (param._have_port_context_id ), 126 // _have_port_front_end_id (param._have_port_front_end_id ), 127 // _have_port_ooo_engine_id (param._have_port_ooo_engine_id), 128 // _have_port_packet_id (param._have_port_packet_id ), 129 // _have_port_load_queue_ptr(param._have_port_load_queue_ptr), 130 131 // _have_groupe_MAC (param._have_groupe_MAC ) 132 // { 133 // log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 134 135 // _timing = param._timing; 136 // _get_custom_information = param._get_custom_information; 137 138 // test(); 139 // log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); 140 // }; 141 76 142 #undef FUNCTION 77 #define FUNCTION "Functionnal_unit::Parameters (copy)" 78 Parameters::Parameters (Parameters & param): 79 _nb_context (param._nb_context ), 80 _nb_front_end (param._nb_front_end ), 81 _nb_ooo_engine (param._nb_ooo_engine ), 82 _nb_packet (param._nb_packet ), 83 _size_general_data (param._size_general_data ), 84 _nb_general_register (param._nb_general_register ), 85 _size_special_data (param._size_special_data ), 86 _nb_special_register (param._nb_special_register ), 87 _size_store_queue (param._size_store_queue ), 88 _size_load_queue (param._size_load_queue ), 89 90 _size_context_id (param._size_context_id ), 91 _size_front_end_id (param._size_front_end_id ), 92 _size_ooo_engine_id (param._size_ooo_engine_id ), 93 _size_packet_id (param._size_packet_id ), 94 _size_general_register (param._size_general_register ), 95 _size_special_register (param._size_special_register ), 96 97 _have_port_context_id (param._have_port_context_id ), 98 _have_port_front_end_id (param._have_port_front_end_id ), 99 _have_port_ooo_engine_id (param._have_port_ooo_engine_id), 100 _have_port_packet_id (param._have_port_packet_id ), 101 _have_port_load_queue_ptr(param._have_port_load_queue_ptr), 102 103 _have_groupe_MAC (param._have_groupe_MAC ) 143 #define FUNCTION "Functionnal_unit::~Parameters" 144 Parameters::~Parameters (void) 104 145 { 105 146 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); 106 107 _timing = param._timing;108 _get_custom_information = param._get_custom_information;109 110 test();111 147 log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); 112 148 }; 113 149 114 150 #undef FUNCTION 115 #define FUNCTION "Functionnal_unit:: ~Parameters"116 Parameters::~Parameters ()151 #define FUNCTION "Functionnal_unit::copy" 152 void Parameters::copy (void) 117 153 { 118 154 log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_msg_error.cpp
r81 r88 31 31 for (uint32_t j=0; j<_nb_operation; j++) 32 32 if (_timing[i][j]._delay != _timing[i][j]._latence) 33 test.error( "For the type '"+toString(i)+"', and the operation '"+toString(j)+"', the delay and the latence must be equal.");33 test.error(toString(_("For the type '%d', and the operation '%d', the delay and the latence must be equal.\n"),i,j)); 34 34 35 35 if (_have_groupe_MAC and ((_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC ]._latence == 0) or 36 36 (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence == 0) or 37 37 (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB ]._latence == 0))) 38 test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0. ");38 test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.\n"); 39 39 40 40 log_printf(FUNC,Functionnal_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_print.cpp
r81 r88 32 32 xml.singleton_begin("nb_packet "); xml.attribut("value",toString(_nb_packet )); xml.singleton_end(); 33 33 xml.singleton_begin("size_general_data "); xml.attribut("value",toString(_size_general_data )); xml.singleton_end(); 34 34 // xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end(); 35 35 xml.singleton_begin("size_special_data "); xml.attribut("value",toString(_size_special_data )); xml.singleton_end(); 36 36 // xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end(); 37 37 xml.balise_close(); 38 38
Note: See TracChangeset
for help on using the changeset viewer.