Changeset 123 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
- Timestamp:
- Jun 8, 2009, 10:43:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r122 r123 16 16 namespace context_state { 17 17 18 #define MISS_FAST 18 // #define MANAGE_EVENT MANAGE_EVENT_WAIT_ALL 19 // #define MANAGE_EVENT MANAGE_EVENT_WAIT_DECODE 20 #define MANAGE_EVENT MANAGE_EVENT_NO_WAIT 19 21 20 22 #define get_priority(x) \ 21 23 (((state == CONTEXT_STATE_KO_MISS_LOAD_ADDR ) or \ 24 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or \ 22 25 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR ) or \ 23 (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND ) or \24 26 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND ) or \ 25 27 (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE))?3: \ … … 43 45 reg_STATE [i] = CONTEXT_STATE_OK; 44 46 reg_INTERRUPT_ENABLE [i] = 0; 47 reg_EVENT_DEPTH [i] = 0; // unacessary 45 48 } 46 49 } … … 59 62 Tcounter_t inst_all = inst_commit_all + inst_decod_all; 60 63 // Tcounter_t inst_mem = inst_commit_mem + inst_decod_all; 64 bool condition = ( (MANAGE_EVENT == MANAGE_EVENT_WAIT_ALL )?(inst_all == 0): 65 ((MANAGE_EVENT == MANAGE_EVENT_WAIT_DECODE)?(inst_decod_all == 0): 66 true)); 61 67 62 68 context_state_t state = reg_STATE [i]; … … 89 95 case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND : 90 96 { 91 // Wait end of all instruction 92 // if (inst_all == 0) 93 if ( 94 #ifdef MISS_FAST 95 inst_decod_all == 96 #else 97 inst_all == 98 #endif 99 0) 100 97 if (condition) 101 98 // state = CONTEXT_STATE_OK; 102 99 state = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; … … 106 103 { 107 104 // Wait end of all instruction 108 // if (inst_all == 0) 109 if ( 110 #ifdef MISS_FAST 111 inst_decod_all == 112 #else 113 inst_all == 114 #endif 115 0) 105 if (condition) 116 106 state = CONTEXT_STATE_KO_MISS_LOAD_ADDR; 117 107 … … 146 136 { 147 137 // Wait end of all instruction 148 // if (inst_all == 0) 149 if ( 150 #ifdef MISS_FAST 151 inst_decod_all == 152 #else 153 inst_all == 154 #endif 155 0) 138 if (condition) 156 139 // state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod) 157 140 state = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR; … … 333 316 #endif 334 317 318 log_printf(TRACE,Context_State,FUNCTION," * state : %s",toString(state).c_str()); 335 319 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth ); 336 320 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur ); … … 648 632 } 649 633 } 634 635 depth = (depth+1)%_param->_nb_inst_branch_speculated[context]; 636 650 637 break; 651 638 }
Note: See TracChangeset
for help on using the changeset viewer.