Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Parameters.cpp
r81 r88 22 22 Parameters::Parameters (uint32_t nb_front_end , 23 23 uint32_t * nb_context , 24 // uint32_t size_front_end_id , 25 // uint32_t size_context_id , 24 26 uint32_t max_branch_speculated, 25 27 uint32_t size_general_data , … … 28 30 uint32_t nb_front_end_select , 29 31 Tpriority_t priority , 30 Tload_balancing_t load_balancing ) 32 Tload_balancing_t load_balancing , 33 bool is_toplevel) 31 34 { 32 35 log_printf(FUNC,Rename_select,FUNCTION,"Begin"); … … 35 38 _nb_context = nb_context ; 36 39 _max_branch_speculated = max_branch_speculated; 37 _size_general_data = size_general_data ;38 40 _nb_inst_rename = nb_inst_rename ; 39 41 _nb_inst_decod = nb_inst_decod ; … … 44 46 _max_nb_inst_decod = max<uint32_t>(nb_inst_decod,nb_front_end); 45 47 46 _size_front_end_id = log2(nb_front_end); 47 _size_context_id = log2(max<uint32_t>(nb_context,nb_front_end)); 48 _size_depth = log2(max_branch_speculated); 48 test(); 49 49 50 _have_port_front_end_id= _size_front_end_id > 0; 51 _have_port_context_id = _size_context_id > 0; 52 _have_port_depth = _size_depth > 0; 50 if (is_toplevel) 51 { 52 _size_general_data = size_general_data ; 53 _size_depth = log2(max_branch_speculated); 54 _size_front_end_id = log2(_nb_front_end); 55 _size_context_id = log2(max<uint32_t>(_nb_context,_nb_front_end)); 53 56 54 test(); 57 _have_port_front_end_id= _size_front_end_id > 0; 58 _have_port_context_id = _size_context_id > 0; 59 _have_port_depth = _size_depth > 0; 60 61 copy(); 62 } 63 55 64 log_printf(FUNC,Rename_select,FUNCTION,"End"); 56 65 }; … … 73 82 }; 74 83 84 #undef FUNCTION 85 #define FUNCTION "Rename_select::copy" 86 void Parameters::copy (void) 87 { 88 log_printf(FUNC,Rename_select,FUNCTION,"Begin"); 89 log_printf(FUNC,Rename_select,FUNCTION,"End"); 90 }; 91 75 92 }; // end namespace rename_select 76 93 }; // end namespace rename_unit -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp
r81 r88 38 38 log_printf(FUNC,Rename_select,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Core == true 41 log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 43 std::cout << *param << std::endl; 44 #endif 45 40 46 log_printf(INFO,Rename_select,FUNCTION,"Allocation"); 41 47 … … 47 53 48 54 #ifdef STATISTICS 49 if ( _usage & USE_STATISTICS)55 if (usage_is_set(_usage,USE_STATISTICS)) 50 56 { 51 57 log_printf(INFO,Rename_select,FUNCTION,"Allocation of statistics"); … … 56 62 57 63 #ifdef VHDL 58 if ( _usage & USE_VHDL)64 if (usage_is_set(_usage,USE_VHDL)) 59 65 { 60 66 // generate the vhdl … … 66 72 67 73 #ifdef SYSTEMC 68 if ( _usage & USE_SYSTEMC)74 if (usage_is_set(_usage,USE_SYSTEMC)) 69 75 { 70 76 log_printf(INFO,Rename_select,FUNCTION,"Method - transition"); … … 89 95 << (*(in_RENAME_IN_TYPE [i][j])) 90 96 << (*(in_RENAME_IN_OPERATION [i][j])) 97 << (*(in_RENAME_IN_NO_EXECUTE [i][j])) 98 << (*(in_RENAME_IN_IS_DELAY_SLOT [i][j])) 91 99 << (*(in_RENAME_IN_ADDRESS [i][j])) 92 100 << (*(in_RENAME_IN_HAS_IMMEDIAT [i][j])) … … 102 110 << (*(in_RENAME_IN_WRITE_RE [i][j])) 103 111 << (*(in_RENAME_IN_NUM_REG_RE [i][j])) 104 << (*(in_RENAME_IN_EXCEPTION_USE [i][j])); 112 << (*(in_RENAME_IN_EXCEPTION_USE [i][j])) 113 << (*(in_RENAME_IN_EXCEPTION [i][j])); 105 114 if (_param->_have_port_front_end_id) 106 115 sensitive << (*(in_RENAME_IN_FRONT_END_ID [i][j])); … … 150 159 (*(out_RENAME_OUT_OPERATION [x])) (*(in_RENAME_IN_VAL [i][j])); 151 160 (*(out_RENAME_OUT_OPERATION [x])) (*(in_RENAME_IN_OPERATION [i][j])); 161 (*(out_RENAME_OUT_NO_EXECUTE [x])) (*(in_RENAME_IN_VAL [i][j])); 162 (*(out_RENAME_OUT_NO_EXECUTE [x])) (*(in_RENAME_IN_NO_EXECUTE [i][j])); 163 (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_VAL [i][j])); 164 (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_IS_DELAY_SLOT [i][j])); 152 165 (*(out_RENAME_OUT_ADDRESS [x])) (*(in_RENAME_IN_VAL [i][j])); 153 166 (*(out_RENAME_OUT_ADDRESS [x])) (*(in_RENAME_IN_ADDRESS [i][j])); … … 178 191 (*(out_RENAME_OUT_EXCEPTION_USE [x])) (*(in_RENAME_IN_VAL [i][j])); 179 192 (*(out_RENAME_OUT_EXCEPTION_USE [x])) (*(in_RENAME_IN_EXCEPTION_USE [i][j])); 193 (*(out_RENAME_OUT_EXCEPTION [x])) (*(in_RENAME_IN_VAL [i][j])); 194 (*(out_RENAME_OUT_EXCEPTION [x])) (*(in_RENAME_IN_EXCEPTION [i][j])); 180 195 } 181 196 } … … 194 209 195 210 #ifdef STATISTICS 196 if ( _usage & USE_STATISTICS)211 if (usage_is_set(_usage,USE_STATISTICS)) 197 212 { 198 213 log_printf(INFO,Rename_select,FUNCTION,"Generate Statistics file"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp
r81 r88 58 58 // ~~~~~[ Interface : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 59 59 { 60 ALLOC2_INTERFACE("rename_in", IN, EAST, "output of decod's stage", _param->_nb_front_end, _param->_nb_inst_decod[ alloc_interface_it1]);60 ALLOC2_INTERFACE("rename_in", IN, EAST, "output of decod's stage", _param->_nb_front_end, _param->_nb_inst_decod[it1]); 61 61 62 _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 63 _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 64 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 65 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 66 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 67 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 68 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 69 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_general_data , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 70 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 71 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 72 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA ,"read_ra" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 73 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA ,"num_reg_ra" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 74 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB ,"read_rb" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 75 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB ,"num_reg_rb" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 76 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC ,"read_rc" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 77 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC ,"num_reg_rc" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 78 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 79 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 80 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 81 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 82 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]); 62 _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[it1]); 63 _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[it1]); 64 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 65 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 66 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 67 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 68 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 69 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 70 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 71 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_general_data , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 72 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 73 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 74 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA ,"read_ra" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 75 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA ,"num_reg_ra" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); 76 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB ,"read_rb" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 77 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB ,"num_reg_rb" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); 78 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC ,"read_rc" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 79 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC ,"num_reg_rc" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); 80 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 81 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); 82 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 83 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); 84 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 85 _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception , _param->_nb_front_end, _param->_nb_inst_decod[it1]); 83 86 } 84 87 … … 94 97 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_TYPE ,"type" ,Ttype_t ,_param->_size_type ); 95 98 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); 99 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 100 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 ); 96 101 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_general_data ); 97 102 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); … … 108 113 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register_logic); 109 114 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception ); 115 ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception ); 110 116 } 111 117 112 113 118 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119 _priority = new generic::priority::Priority (_name+"_priority" , 120 _param->_priority , 121 _param->_load_balancing, 122 _param->_nb_front_end , 123 _param->_nb_inst_decod , 124 _param->_nb_front_end_select); 114 125 115 126 #ifdef POSITION 116 _component->generate_file(); 127 if (usage_is_set(_usage,USE_POSITION)) 128 _component->generate_file(); 117 129 #endif 118 130 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp
r81 r88 23 23 log_printf(FUNC,Rename_select,FUNCTION,"Begin"); 24 24 25 if ( _usage & USE_SYSTEMC)25 if (usage_is_set(_usage,USE_SYSTEMC)) 26 26 { 27 27 delete in_CLOCK ; … … 38 38 delete [] in_RENAME_IN_TYPE ; 39 39 delete [] in_RENAME_IN_OPERATION ; 40 delete [] in_RENAME_IN_NO_EXECUTE ; 41 delete [] in_RENAME_IN_IS_DELAY_SLOT ; 40 42 delete [] in_RENAME_IN_ADDRESS ; 41 43 delete [] in_RENAME_IN_HAS_IMMEDIAT ; … … 52 54 delete [] in_RENAME_IN_NUM_REG_RE ; 53 55 delete [] in_RENAME_IN_EXCEPTION_USE ; 56 delete [] in_RENAME_IN_EXCEPTION ; 54 57 55 58 delete [] out_RENAME_OUT_VAL ; … … 79 82 } 80 83 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 81 84 delete _priority; 82 85 delete _component; 83 86 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_end_cycle.cpp
r81 r88 25 25 26 26 #ifdef STATISTICS 27 _stat->end_cycle(); 27 if (usage_is_set(_usage,USE_STATISTICS)) 28 _stat->end_cycle(); 28 29 #endif 29 30 … … 31 32 // Evaluation before read the ouput signal 32 33 // sc_start(0); 33 _interfaces->testbench(); 34 if (usage_is_set(_usage,USE_VHDL_TESTBENCH)) 35 _interfaces->testbench(); 34 36 #endif 35 37 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp
r81 r88 22 22 void Rename_select::genMealy (void) 23 23 { 24 log_printf(FUNC,Rename_select,FUNCTION,"Begin"); 24 log_begin(Rename_select,FUNCTION); 25 log_function(Rename_select,FUNCTION,_name.c_str()); 25 26 26 Tcontrol_t ack [_param->_nb_front_end][_param->_max_nb_inst_decod]; 27 Tcontrol_t val [_param->_nb_inst_rename]; 28 Tcontrol_t ack [_param->_nb_front_end][_param->_max_nb_inst_decod]; 29 Tcontrol_t previous_transaction [_param->_nb_front_end]; 30 31 for (uint32_t i=0; i<_param->_nb_inst_rename; ++i) 32 val [i] = false; 27 33 for (uint32_t i=0; i<_param->_nb_front_end; i++) 28 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 29 ack [i][j] = false; 30 31 std::list<select_t>::iterator it=select.begin(); 34 { 35 previous_transaction [i] = true; 36 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 37 ack [i][j] = false; 38 } 39 40 std::list<generic::priority::select_t> * select = _priority->select(); 41 std::list<generic::priority::select_t>::iterator it=select->begin(); 32 42 33 43 for (uint32_t i=0; i<_param->_nb_inst_rename; i++) 34 44 { 35 Tcontrol_t val = false;45 log_printf(TRACE,Rename_select,FUNCTION," * inst_rename [%d]",i); 36 46 37 while ((it != select.end()) and (val == false)) 47 // Scan all instruction until find 48 while ((it != select->end()) and (val [i] == false)) 38 49 { 39 Tcontext_t x = it-> _front_end;40 uint32_t y = it-> _inst_decod;50 Tcontext_t x = it->grp; 51 uint32_t y = it->elt; 41 52 42 // Test if this instruction is valid 43 if (PORT_READ(in_RENAME_IN_VAL[x][y]) == 1) 53 log_printf(TRACE,Rename_select,FUNCTION," * front_end[%d].inst_decod[%d]",x,y); 54 log_printf(TRACE,Rename_select,FUNCTION," * rename_in_val : %d",PORT_READ(in_RENAME_IN_VAL[x][y])); 55 log_printf(TRACE,Rename_select,FUNCTION," * previous_transaction : %d",previous_transaction[x]); 56 57 // Test if this instruction is valid and if all previous instruction of this front end is an valid transaction 58 if (previous_transaction [x] and 59 PORT_READ(in_RENAME_IN_VAL[x][y])) 44 60 { 45 61 // Find !!! 46 val 62 val [i] = true; 47 63 ack [x][y] = PORT_READ(in_RENAME_OUT_ACK [i]); 64 65 log_printf(TRACE,Rename_select,FUNCTION," * rename_out_ack : %d",PORT_READ(in_RENAME_OUT_ACK[i])); 48 66 49 67 if (_param->_have_port_front_end_id) … … 55 73 PORT_WRITE(out_RENAME_OUT_TYPE [i],PORT_READ(in_RENAME_IN_TYPE [x][y])); 56 74 PORT_WRITE(out_RENAME_OUT_OPERATION [i],PORT_READ(in_RENAME_IN_OPERATION [x][y])); 75 PORT_WRITE(out_RENAME_OUT_NO_EXECUTE [i],PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y])); 76 PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y])); 57 77 PORT_WRITE(out_RENAME_OUT_ADDRESS [i],PORT_READ(in_RENAME_IN_ADDRESS [x][y])); 58 78 PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT [x][y])); … … 69 89 PORT_WRITE(out_RENAME_OUT_NUM_REG_RE [i],PORT_READ(in_RENAME_IN_NUM_REG_RE [x][y])); 70 90 PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y])); 91 PORT_WRITE(out_RENAME_OUT_EXCEPTION [i],PORT_READ(in_RENAME_IN_EXCEPTION [x][y])); 71 92 } 93 94 // ack = 1 if previous_transaction == true and rename_in_val == true and rename_out == true 95 previous_transaction [x] = ack [x][y]; 72 96 73 97 it ++; 74 98 } 75 99 76 PORT_WRITE(out_RENAME_OUT_VAL [i], val);77 100 } 101 102 for (uint32_t i=0; i<_param->_nb_inst_rename; ++i) 103 PORT_WRITE(out_RENAME_OUT_VAL [i], val [i]); 78 104 79 105 for (uint32_t i=0; i<_param->_nb_front_end; i++) … … 81 107 PORT_WRITE(out_RENAME_IN_ACK [i][j], ack [i][j]); 82 108 83 log_ printf(FUNC,Rename_select,FUNCTION,"End");109 log_end(Rename_select,FUNCTION); 84 110 }; 85 111 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_transition.cpp
r81 r88 26 26 if (PORT_READ(in_NRESET) == 0) 27 27 { 28 select.clear(); 29 reg_FRONT_END_PRIORITY = 0; 28 _priority->reset(); 30 29 } 31 30 else 32 31 { 33 switch (_param->_priority) 34 { 35 case PRIORITY_STATIC : 36 { 37 reg_FRONT_END_PRIORITY = (reg_FRONT_END_PRIORITY+_param->_nb_front_end_select)%_param->_nb_front_end; 38 break; 39 } 40 case PRIORITY_ROUND_ROBIN : 41 { 42 reg_FRONT_END_PRIORITY = (reg_FRONT_END_PRIORITY+1)%_param->_nb_front_end; 43 break; 44 } 45 default: 46 { 47 break; 48 } 49 } 50 51 // flush list 52 select.clear(); 53 54 // Compute next scan order !!! 55 switch (_param->_load_balancing) 56 { 57 case LOAD_BALANCING_BALANCE : 58 { 59 for (uint32_t j=0; j<_param->_max_nb_inst_decod; j++) 60 for (uint32_t i=0; i<_param->_nb_front_end_select; i++) 61 { 62 uint32_t x=(reg_FRONT_END_PRIORITY+i)%_param->_nb_front_end; 63 64 // Test valid inst_decod 65 if (j < _param->_nb_inst_decod[x]) 66 select.push_back(select_t(x,j)); 67 } 68 69 break; 70 } 71 case LOAD_BALANCING_MAXIMUM_FOR_PRIORITY : 72 { 73 74 for (uint32_t i=0; i<_param->_nb_front_end_select; i++) 75 { 76 uint32_t x=(reg_FRONT_END_PRIORITY+i)%_param->_nb_front_end; 77 78 for (uint32_t j=0; j<_param->_nb_inst_decod[x]; j++) 79 select.push_back(select_t(x,j)); 80 } 81 82 break; 83 } 84 default : 85 { 86 break; 87 } 88 } 32 _priority->transition(); 89 33 90 34 // #if (DEBUG >= DEBUG_TRACE)
Note: See TracChangeset
for help on using the changeset viewer.