Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp
r87 r88 39 39 40 40 usage_environment(_usage); 41 42 #if DEBUG_Decod_queue == true 43 log_printf(INFO,Decod_queue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 std::cout << *param << std::endl; 46 #endif 41 47 42 48 log_printf(INFO,Decod_queue,FUNCTION,_("Allocation")); … … 98 104 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 99 105 sensitive << (*(in_DECOD_OUT_ACK [i])); 100 if (_param->_have_port_depth)101 106 for (uint32_t i=0; i<_param->_nb_context; i++) 102 sensitive << (*(in_DEPTH_TAIL [i])) 103 << (*(in_DEPTH_NB_BRANCH [i])); 107 { 108 if (_param->_have_port_depth) 109 sensitive << (*(in_DEPTH_MIN [i])); 110 sensitive << (*(in_DEPTH_MAX [i])); 111 } 104 112 105 113 # ifdef SYSTEMCASS_SPECIFIC … … 108 116 { 109 117 (*(out_DECOD_OUT_VAL [i])) (*(in_DECOD_OUT_ACK [i])); 110 if (_param->_have_port_depth)111 for (uint32_t j=0; j<_param->_nb_context; j++) 112 { 113 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_TAIL[j]));114 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_NB_BRANCH[j]));115 118 for (uint32_t j=0; j<_param->_nb_context; j++) 119 { 120 if (_param->_have_port_depth) 121 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j])); 122 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j])); 123 } 116 124 } 117 125 # endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp
r82 r88 65 65 ALLOC1_SIGNAL_IN ( in_DECOD_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type ); 66 66 ALLOC1_SIGNAL_IN ( in_DECOD_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); 67 ALLOC1_SIGNAL_IN ( in_DECOD_IN_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 67 68 ALLOC1_SIGNAL_IN ( in_DECOD_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 ); 68 69 ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_general_data ); … … 80 81 ALLOC1_SIGNAL_IN ( in_DECOD_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t ,_param->_size_special_register_logic); 81 82 ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception_use ); 83 ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception_decod ); 82 84 } 83 85 … … 92 94 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_TYPE ,"type" ,Ttype_t ,_param->_size_type ); 93 95 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); 96 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 94 97 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 ); 95 98 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS ,"address" ,Tgeneral_data_t ,_param->_size_general_data ); … … 107 110 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t ,_param->_size_special_register_logic); 108 111 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception_use ); 112 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception_decod ); 109 113 } 110 114 … … 113 117 ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context); 114 118 115 ALLOC1_SIGNAL_IN ( in_DEPTH_TAIL ,"tail" ,Tdepth_t ,_param->_size_depth ); 116 if (_param->_have_port_depth) 117 ALLOC1_SIGNAL_IN ( in_DEPTH_NB_BRANCH,"nb_branch",Tdepth_t ,_param->_size_depth+1); 119 ALLOC1_SIGNAL_IN ( in_DEPTH_MIN ,"min" ,Tdepth_t ,_param->_size_depth ); 120 ALLOC1_SIGNAL_IN ( in_DEPTH_MAX ,"max" ,Tdepth_t ,_param->_size_depth+1); 118 121 } 119 122 120 // ~~~~~[ Interface : " depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~123 // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 121 124 { 122 125 ALLOC1_INTERFACE("nb_inst",OUT,NORTH,"Instruction's number", _param->_nb_context); 123 126 124 ALLOC1_SIGNAL_OUT(out_NB_INST_ALL ,"all" ,Tcontext_t ,_param->_size_nb_inst +1);127 ALLOC1_SIGNAL_OUT(out_NB_INST_ALL ,"all" ,Tcontext_t ,_param->_size_nb_inst_decod); 125 128 } 126 129 130 if (usage_is_set(_usage,USE_SYSTEMC)) 131 { 127 132 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 128 133 reg_QUEUE = new std::list<decod_queue_entry_t*>; … … 133 138 internal_DECOD_OUT_VAL = new Tcontrol_t [_param->_nb_inst_decod]; 134 139 internal_DECOD_OUT_ACK = new Tcontrol_t [_param->_nb_inst_decod]; 140 } 135 141 136 142 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp
r82 r88 35 35 DELETE1_SIGNAL( in_DECOD_IN_TYPE ,_param->_nb_inst_decod,_param->_size_type ); 36 36 DELETE1_SIGNAL( in_DECOD_IN_OPERATION ,_param->_nb_inst_decod,_param->_size_operation ); 37 DELETE1_SIGNAL( in_DECOD_IN_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 37 38 DELETE1_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT ,_param->_nb_inst_decod,1 ); 38 39 DELETE1_SIGNAL( in_DECOD_IN_ADDRESS ,_param->_nb_inst_decod,_param->_size_general_data ); … … 50 51 DELETE1_SIGNAL( in_DECOD_IN_NUM_REG_RE ,_param->_nb_inst_decod,_param->_size_special_register_logic); 51 52 DELETE1_SIGNAL( in_DECOD_IN_EXCEPTION_USE ,_param->_nb_inst_decod,_param->_size_exception_use ); 53 DELETE1_SIGNAL( in_DECOD_IN_EXCEPTION ,_param->_nb_inst_decod,_param->_size_exception ); 52 54 53 55 DELETE1_SIGNAL(out_DECOD_OUT_VAL ,_param->_nb_inst_decod,1); … … 57 59 DELETE1_SIGNAL(out_DECOD_OUT_TYPE ,_param->_nb_inst_decod,_param->_size_type ); 58 60 DELETE1_SIGNAL(out_DECOD_OUT_OPERATION ,_param->_nb_inst_decod,_param->_size_operation ); 61 DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 59 62 DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1 ); 60 63 DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS ,_param->_nb_inst_decod,_param->_size_general_data ); … … 72 75 DELETE1_SIGNAL(out_DECOD_OUT_NUM_REG_RE ,_param->_nb_inst_decod,_param->_size_special_register_logic); 73 76 DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION_USE ,_param->_nb_inst_decod,_param->_size_exception_use ); 77 DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION ,_param->_nb_inst_decod,_param->_size_exception ); 74 78 75 DELETE1_SIGNAL( in_DEPTH_TAIL ,_param->_nb_context,_param->_size_depth ); 76 if (_param->_have_port_depth) 77 DELETE1_SIGNAL( in_DEPTH_NB_BRANCH,_param->_nb_context,_param->_size_depth+1); 79 DELETE1_SIGNAL( in_DEPTH_MIN ,_param->_nb_context,_param->_size_depth ); 80 DELETE1_SIGNAL( in_DEPTH_MAX ,_param->_nb_context,_param->_size_depth+1); 78 81 79 DELETE1_SIGNAL(out_NB_INST_ALL ,_param->_nb_context,_param->_size_nb_inst+1); 82 DELETE1_SIGNAL(out_NB_INST_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); 83 84 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85 delete reg_QUEUE; 86 delete [] reg_NB_INST; 87 88 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 89 delete [] internal_DECOD_IN_ACK ; 90 delete [] internal_DECOD_OUT_VAL; 91 delete [] internal_DECOD_OUT_ACK; 80 92 } 81 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~82 delete reg_QUEUE;83 delete [] reg_NB_INST;84 85 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~86 delete [] internal_DECOD_IN_ACK ;87 delete [] internal_DECOD_OUT_VAL;88 delete [] internal_DECOD_OUT_ACK;89 93 90 94 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
r82 r88 23 23 { 24 24 log_begin(Decod_queue,FUNCTION); 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 25 26 26 27 Tcontrol_t val [_param->_nb_inst_decod]; … … 36 37 if (reg_QUEUE->front()->_val [i]) 37 38 { 38 log_printf(TRACE,Decod_queue,FUNCTION,_(" Queue is not empty, slot [%d] is valid."),i);39 log_printf(TRACE,Decod_queue,FUNCTION,_(" * Queue is not empty, slot [%d] is valid."),i); 39 40 40 41 Tcontext_t context = reg_QUEUE->front()->_context_id [i]; 41 42 Tdepth_t depth = reg_QUEUE->front()->_depth [i]; 42 Tdepth_t depth_base = (_param->_have_port_depth)?PORT_READ(in_DEPTH_TAIL [context]):0; 43 Tdepth_t depth_offset = (_param->_have_port_depth)?PORT_READ(in_DEPTH_NB_BRANCH [context]):0; 44 Tdepth_t depth_max = depth_base + depth_offset; 43 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 44 Tdepth_t depth_max = PORT_READ(in_DEPTH_MAX[context]); 45 45 46 46 // is a valid instruction ? 47 // * depth must be lower that depth max 48 Tcontrol_t is_valid = depth <= ((depth>depth_base)?(depth_max):(depth_max%_param->_nb_branch_speculated [context])); 47 // If DEPTH_CURRENT : 48 // equal at DEPTH_MIN -> not speculative 49 // not include ]DEPTH_MIN:DEPTH_MAX[ -> previous branch miss 50 // include ]DEPTH_MIN:DEPTH_MAX[ -> speculative 49 51 50 log_printf(TRACE,Decod_queue,FUNCTION,_(" * is_valid : %d"),is_valid); 52 // All case 53 // ....... min ...X... max ....... OK 54 // ....... min ....... max ...X... KO 55 // ...X... min ....... max ....... KO 56 // ....... max ....... min ...X... OK 57 // ...X... max ....... min ....... OK 58 // ....... max ...X... min ....... KO 59 60 Tcontrol_t is_valid = ((depth == depth_min) or 61 ((depth_min < depth_max)? 62 (depth<depth_max): 63 ((depth > depth_min) or (depth < depth_max)))); 64 // Tcontrol_t is_valid = depth <= depth_max; 65 66 log_printf(TRACE,Decod_queue,FUNCTION,_(" * is_valid : %d"),is_valid); 51 67 52 68 internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid) … … 65 81 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 66 82 { 83 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_OUT_VAL : %d"),val [i]); 84 67 85 PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]); 68 86 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp
r82 r88 23 23 { 24 24 log_begin(Decod_queue,FUNCTION); 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 25 26 26 27 //-------------------------------------------------------------------- … … 49 50 PORT_WRITE(out_DECOD_OUT_TYPE [i],reg_QUEUE->front()->_type [i]); 50 51 PORT_WRITE(out_DECOD_OUT_OPERATION [i],reg_QUEUE->front()->_operation [i]); 52 PORT_WRITE(out_DECOD_OUT_NO_EXECUTE [i],reg_QUEUE->front()->_no_execute [i]); 51 53 PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]); 52 54 PORT_WRITE(out_DECOD_OUT_ADDRESS [i],reg_QUEUE->front()->_address [i]); … … 64 66 PORT_WRITE(out_DECOD_OUT_NUM_REG_RE [i],reg_QUEUE->front()->_num_reg_re [i]); 65 67 PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [i]); 68 PORT_WRITE(out_DECOD_OUT_EXCEPTION [i],reg_QUEUE->front()->_exception [i]); 66 69 } 67 70 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_statistics_allocation.cpp
r82 r88 29 29 param_statistics); 30 30 31 _stat_nb_inst = new counter_t * [_param->_nb_context]; 31 _stat_use_queue = _stat->create_variable ("use_queue"); 32 _stat_nb_inst = new counter_t * [_param->_nb_context]; 32 33 33 34 std::string expr_average_inst = ""; … … 35 36 for (uint32_t i=0; i<_param->_nb_context; i++) 36 37 { 37 38 39 _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instructionby cycle (context %d)"),i));40 _stat->create_expr_percent ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent instruction by cycle(context %d)"),i));41 42 43 38 _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i)); 39 40 _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction number in decod_queue by cycle (context %d)"),i)); 41 _stat->create_expr_percent ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent decod_queue's occupation (context %d)"),i)); 42 43 if (i == 0) 44 expr_average_inst = "nb_inst_"+toString(i); 44 45 else 45 46 expr_average_inst = "+ nb_inst_"+toString(i) + " " +expr_average_inst; 46 47 } 47 48 48 _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction by cycle (all context)")); 49 _stat->create_expr_percent ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent instruction by cycle (all context)")); 49 _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction number in decod_queue by cycle (all context)")); 50 _stat->create_expr_percent ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent decod_queue's occupation (all context)")); 51 52 _stat->create_expr_average_by_cycle("average_use_queue", "use_queue", "", _("Average slot decod_queue occupation by cycle.")); 53 _stat->create_expr_percent ("percent_use_queue", "average_use_queue", toString(_param->_size_queue), _("Percent slot decod_queue occupation.")); 50 54 51 55 log_end(Decod_queue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp
r87 r88 23 23 { 24 24 log_begin(Decod_queue,FUNCTION); 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 25 26 26 27 if (PORT_READ(in_NRESET) == 0) … … 35 36 //-------------------------------------------------------------------- 36 37 //-----[ DECOD_IN ]--------------------------------------------------- 37 //-------------------------------------------------------------------- 38 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 38 //-------------------------------------------------------------------- 39 decod_queue_entry_t * entry = NULL; 40 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 39 41 { 40 decod_queue_entry_t * entry = NULL;41 42 if (PORT_READ(in_DECOD_IN_VAL [i]) and internal_DECOD_IN_ACK[i]) 42 43 { 43 log_printf(TRACE,Decod_queue,FUNCTION,_(" DECOD_IN [%d]"),i);44 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_IN [%d]"),i); 44 45 45 46 if (entry == NULL) 46 entry = new decod_queue_entry_t (_param->_nb_inst_decod); 47 { 48 // Once creation and insert in queue 49 entry = new decod_queue_entry_t (_param->_nb_inst_decod); 50 reg_QUEUE->push_back(entry); 51 } 47 52 48 53 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_IN_CONTEXT_ID [i]):0; 49 54 50 log_printf(TRACE,Decod_queue,FUNCTION,_(" * context : %d"),context);55 log_printf(TRACE,Decod_queue,FUNCTION,_(" * context : %d"),context); 51 56 52 57 entry->_val [i] = 1; … … 55 60 entry->_type [i] = PORT_READ(in_DECOD_IN_TYPE [i]); 56 61 entry->_operation [i] = PORT_READ(in_DECOD_IN_OPERATION [i]); 62 entry->_no_execute [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE [i]); 57 63 entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]); 58 64 entry->_address [i] = PORT_READ(in_DECOD_IN_ADDRESS [i]); … … 70 76 entry->_num_reg_re [i] = PORT_READ(in_DECOD_IN_NUM_REG_RE [i]); 71 77 entry->_exception_use [i] = PORT_READ(in_DECOD_IN_EXCEPTION_USE [i]); 78 entry->_exception [i] = PORT_READ(in_DECOD_IN_EXCEPTION [i]); 72 79 73 80 reg_NB_INST [context] ++; 74 reg_QUEUE->push_back(entry);75 81 76 log_printf(TRACE,Decod_queue,FUNCTION,_(" * nb_inst : %d"),reg_NB_INST [context]);77 log_printf(TRACE,Decod_queue,FUNCTION,_(" * PUSH queue"));82 log_printf(TRACE,Decod_queue,FUNCTION,_(" * nb_inst : %d"),reg_NB_INST [context]); 83 log_printf(TRACE,Decod_queue,FUNCTION,_(" * PUSH queue")); 78 84 } 79 85 } … … 91 97 if (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i]) 92 98 { 93 log_printf(TRACE,Decod_queue,FUNCTION,_(" DECOD_OUT [%d]"),i);99 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_OUT [%d]"),i); 94 100 95 101 reg_QUEUE->front()->_val [i] = 0; 96 102 97 103 Tcontext_t context = reg_QUEUE->front()->_context_id [i]; 98 log_printf(TRACE,Decod_queue,FUNCTION,_(" * context : %d"),context);104 log_printf(TRACE,Decod_queue,FUNCTION,_(" * context : %d"),context); 99 105 100 106 reg_NB_INST [context] --; 101 log_printf(TRACE,Decod_queue,FUNCTION,_(" * nb_inst : %d"),reg_NB_INST [context]);107 log_printf(TRACE,Decod_queue,FUNCTION,_(" * nb_inst : %d"),reg_NB_INST [context]); 102 108 } 103 109 // Test if slot is (again) valid, if yes, then have less one instruction in the entry … … 108 114 if (not find) // no valid instruction in current slot 109 115 { 110 log_printf(TRACE,Decod_queue,FUNCTION,_(" * POP queue"));116 log_printf(TRACE,Decod_queue,FUNCTION,_(" * POP queue")); 111 117 112 118 // can pop the slot … … 117 123 } 118 124 119 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Decod_queue) 125 #if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE) 126 log_printf(TRACE,Decod_queue,FUNCTION," * Dump decod_queue"); 120 127 uint32_t x=0; 121 128 for (std::list<decod_queue_entry_t*>::iterator it=reg_QUEUE->begin(); … … 123 130 it++) 124 131 { 125 log_printf(TRACE,Decod_queue,FUNCTION," [%d] ",x);132 log_printf(TRACE,Decod_queue,FUNCTION," * [%d] ",x); 126 133 127 134 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 128 135 { 129 136 if ((*it)->_val [i]) 130 log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d, %d %d, %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d"137 log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d, %d %d, %d %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d %d" 131 138 ,i 132 139 ,(*it)->_val [i] … … 135 142 ,(*it)->_type [i] 136 143 ,(*it)->_operation [i] 144 ,(*it)->_no_execute [i] 137 145 ,(*it)->_is_delay_slot [i] 138 146 ,(*it)->_address [i] … … 150 158 ,(*it)->_num_reg_re [i] 151 159 ,(*it)->_exception_use [i] 160 ,(*it)->_exception [i] 152 161 ); 153 162 else 154 log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d"163 log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d" 155 164 ,i 156 165 ,(*it)->_val [i] … … 163 172 164 173 #ifdef STATISTICS 165 for (uint32_t i=0; i<_param->_nb_context; i++) 166 *(_stat_nb_inst [i]) += reg_NB_INST [i]; 174 if (usage_is_set(_usage,USE_STATISTICS)) 175 { 176 *(_stat_use_queue) += reg_QUEUE->size(); 177 for (uint32_t i=0; i<_param->_nb_context; i++) 178 *(_stat_nb_inst [i]) += reg_NB_INST [i]; 179 } 167 180 #endif 168 181 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Parameters.cpp
r82 r88 10 10 11 11 namespace morpheo { 12 namespace behavioural {12 namespace behavioural { 13 13 namespace core { 14 14 namespace multi_front_end { … … 24 24 uint32_t size_queue , 25 25 uint32_t size_general_data , 26 uint32_t * nb_branch_speculated) 26 uint32_t * nb_branch_speculated, 27 bool is_toplevel ) 27 28 { 28 29 log_begin(Decod_queue,FUNCTION); … … 31 32 _nb_inst_decod = nb_inst_decod ; 32 33 _size_queue = size_queue ; 33 34 // _size_general_data = size_general_data ; 34 35 _nb_branch_speculated = nb_branch_speculated; 35 36 … … 37 38 _size_bank = _size_queue / _nb_bank; 38 39 39 _size_context_id = log2(nb_context); 40 _size_depth = log2(max<uint32_t>(_nb_branch_speculated,_nb_context)); 41 _size_nb_inst = log2(_size_queue); 40 test(); 42 41 43 _have_port_context_id = (_size_context_id > 0); 44 _have_port_depth = (_size_depth > 0); 45 46 test(); 42 if (is_toplevel) 43 { 44 _size_context_id = log2(nb_context); 45 _size_nb_inst_decod = log2(_size_queue)+1; 46 _size_depth = log2(max<uint32_t>(_nb_branch_speculated,_nb_context)); 47 _size_general_data = size_general_data; 48 49 _have_port_context_id = _size_context_id > 0; 50 _have_port_depth = _size_depth > 0; 51 52 copy (); 53 } 54 47 55 log_end(Decod_queue,FUNCTION); 48 56 }; … … 62 70 { 63 71 log_begin(Decod_queue,FUNCTION); 72 73 log_end(Decod_queue,FUNCTION); 74 }; 75 76 #undef FUNCTION 77 #define FUNCTION "Decod_queue::copy" 78 void Parameters::copy (void) 79 { 80 log_begin(Decod_queue,FUNCTION); 81 64 82 log_end(Decod_queue,FUNCTION); 65 83 };
Note: See TracChangeset
for help on using the changeset viewer.