Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_transition.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_transition.cpp
r87 r88 22 22 void Decod::transition (void) 23 23 { 24 log_ printf(FUNC,Decod,FUNCTION,"Begin");24 log_begin(Decod,FUNCTION); 25 25 26 26 if (PORT_READ(in_NRESET) == 0) 27 27 { 28 reg_CONTEXT_PRIORITY = 0;28 _priority->reset(); 29 29 30 30 for (uint32_t i=0; i<_param->_nb_context; i++) … … 36 36 else 37 37 { 38 switch (_param->_priority) 39 { 40 // case PRIORITY_STATIC : 41 // { 42 // reg_CONTEXT_PRIORITY = (reg_CONTEXT_PRIORITY+_param->_nb_context_select)%_param->_nb_context; 43 // break; 44 // } 45 case PRIORITY_ROUND_ROBIN : 46 { 47 reg_CONTEXT_PRIORITY = (reg_CONTEXT_PRIORITY+1 )%_param->_nb_context; 48 break; 49 } 50 default: 51 { 52 break; 53 } 54 } 55 56 // flush list 57 select.clear(); 58 59 // Compute next scan order !!! 60 switch (_param->_load_balancing) 61 { 62 // case LOAD_BALANCING_BALANCE : 63 // { 64 // for (uint32_t j=0; j<_param->_max_nb_inst_fetch; j++) 65 // for (uint32_t i=0; i<_param->_nb_context_select; i++) 66 // { 67 // uint32_t x=(reg_CONTEXT_PRIORITY+i)%_param->_nb_context; 68 69 // // Test valid inst_fetch 70 // if (j < _param->_nb_inst_fetch[x]) 71 // select.push_back(select_t(x,j)); 72 // } 73 74 // break; 75 // } 76 case LOAD_BALANCING_MAXIMUM_FOR_PRIORITY : 77 { 78 79 for (uint32_t i=0; i<_param->_nb_context_select; i++) 80 { 81 uint32_t x=(reg_CONTEXT_PRIORITY+i)%_param->_nb_context; 82 83 for (uint32_t j=0; j<_param->_nb_inst_fetch[x]; j++) 84 select.push_back(select_t(x,j)); 85 } 86 87 break; 88 } 89 default : 90 { 91 break; 92 } 93 } 38 _priority->transition(); 94 39 95 40 // Compute "next previous" address … … 97 42 if (internal_CONTEXT_HAVE_TRANSACTION[i]) 98 43 { 99 #ifdef STATISTICS100 (*_stat_sum_inst_decod) ++;101 #endif102 103 44 reg_CONTEXT_ADDRESS_PREVIOUS [i] = internal_CONTEXT_ADDRESS_PREVIOUS [i]; 104 45 reg_CONTEXT_IS_DELAY_SLOT [i] = internal_CONTEXT_IS_DELAY_SLOT [i]; … … 107 48 // for (uint32_t i=0; i<_param->_nb_context; i++) 108 49 // log_printf(TRACE,Decod,FUNCTION,"[%d] %.8x %d",i,reg_CONTEXT_ADDRESS_PREVIOUS [i], reg_CONTEXT_IS_DELAY_SLOT [i]); 50 51 #ifdef STATISTICS 52 if (usage_is_set(_usage,USE_STATISTICS)) 53 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 54 if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i])) 55 (*_stat_sum_inst_decod) ++; 56 #endif 109 57 } 110 58 … … 113 61 #endif 114 62 115 log_ printf(FUNC,Decod,FUNCTION,"End");63 log_end(Decod,FUNCTION); 116 64 }; 117 65
Note: See TracChangeset
for help on using the changeset viewer.