- Timestamp:
- Jun 8, 2009, 10:43:30 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end
- Files:
-
- 1 added
- 78 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h
r120 r123 143 143 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144 144 public : SC_OUT(Tcontrol_t ) ** out_CONTEXT_DECOD_ENABLE ;//[nb_context] 145 public : SC_OUT(Tcontrol_t ) ** out_CONTEXT_EVENT ;//[nb_context] 145 146 146 147 // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 211 212 public : void genMoore (void); 212 213 public : void genMealy_decod_event (void); 214 public : void genMealy_context_event (void); 213 215 #endif 214 216 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State.cpp
r101 r123 39 39 usage_environment(_usage); 40 40 41 #if DEBUG_Context_State == true42 log_printf(INFO,Context_State,FUNCTION,_("<%s> Parameters"),_name.c_str());41 // #if DEBUG_Context_State == true 42 // log_printf(INFO,Context_State,FUNCTION,_("<%s> Parameters"),_name.c_str()); 43 43 44 std::cout << *param << std::endl;45 #endif44 // std::cout << *param << std::endl; 45 // #endif 46 46 47 47 log_printf(INFO,Context_State,FUNCTION,_("Allocation")); … … 139 139 // List dependency information 140 140 # endif 141 142 log_printf(INFO,Context_State,FUNCTION,_("Method - genMealy_context_event")); 143 144 SC_METHOD (genMealy_context_event); 145 dont_initialize (); 146 // sensitive << (*(in_CLOCK)).neg(); // use internal register 147 sensitive << (*(in_COMMIT_EVENT_VAL )); 148 if (_param->_have_port_context_id) 149 sensitive << (*(in_COMMIT_EVENT_CONTEXT_ID )); 150 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) 151 { 152 sensitive << (*(in_BRANCH_COMPLETE_VAL [i])) 153 << (*(in_BRANCH_COMPLETE_MISS_PREDICTION [i])); 154 if (_param->_have_port_context_id) 155 sensitive << (*(in_BRANCH_COMPLETE_CONTEXT_ID [i])); 156 } 157 158 # ifdef SYSTEMCASS_SPECIFIC 159 // List dependency information 160 # endif 141 161 142 162 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp
r119 r123 172 172 173 173 ALLOC1_SIGNAL_OUT(out_CONTEXT_DECOD_ENABLE ,"decod_enable",Tcontrol_t,1); 174 ALLOC1_SIGNAL_OUT(out_CONTEXT_EVENT ,"event" ,Tcontrol_t,1); 174 175 175 176 ALLOC1_INTERFACE_END(_param->_nb_context); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp
r119 r123 91 91 92 92 DELETE1_SIGNAL(out_CONTEXT_DECOD_ENABLE ,_param->_nb_context,1); 93 DELETE1_SIGNAL(out_CONTEXT_EVENT ,_param->_nb_context,1); 93 94 94 95 DELETE1_SIGNAL( in_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMealy_decod_event.cpp
r102 r123 24 24 log_function(Context_State,FUNCTION,_name.c_str()); 25 25 26 if (PORT_READ(in_NRESET)) 27 { 26 28 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 27 29 { … … 49 51 50 52 internal_DECOD_EVENT_ACK [i] = ack; 51 PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]);52 53 } 54 } 55 else 56 { 57 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 58 internal_DECOD_EVENT_ACK [i] = 0; 59 } 60 61 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 62 PORT_WRITE(out_DECOD_EVENT_ACK [i], internal_DECOD_EVENT_ACK [i]); 53 63 54 64 log_end(Context_State,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp
r119 r123 24 24 log_function(Context_State,FUNCTION,_name.c_str()); 25 25 26 if (PORT_READ(in_NRESET)) 27 { 26 28 // ------------------------------------------------------------------- 27 29 // -----[ EVENT ]----------------------------------------------------- … … 67 69 68 70 internal_EVENT_VAL [i] = val; 69 PORT_WRITE(out_EVENT_VAL [i], val);70 71 PORT_WRITE(out_EVENT_ADDRESS [i], address); 71 72 PORT_WRITE(out_EVENT_ADDRESS_NEXT [i], address_next); … … 97 98 internal_SPR_EVENT_VAL [i] = (state == CONTEXT_STATE_KO_EXCEP_SPR ); 98 99 99 PORT_WRITE(out_SPR_EVENT_VAL [i], internal_SPR_EVENT_VAL [i]);100 100 PORT_WRITE(out_SPR_EVENT_EPCR [i], reg_EVENT_ADDRESS_EPCR [i]); 101 101 PORT_WRITE(out_SPR_EVENT_EEAR [i], reg_EVENT_ADDRESS_EEAR [i]); … … 117 117 PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], (state==CONTEXT_STATE_OK)); 118 118 } 119 } 120 else 121 { 122 for (uint32_t i=0; i<_param->_nb_context; i++) 123 { 124 internal_EVENT_VAL [i] = 0; 125 internal_SPR_EVENT_VAL [i] = 0; 126 127 PORT_WRITE(out_CONTEXT_DECOD_ENABLE [i], 0); 128 } 129 } 130 131 // Write output 132 for (uint32_t i=0; i<_param->_nb_context; i++) 133 { 134 PORT_WRITE(out_EVENT_VAL [i], internal_EVENT_VAL [i]); 135 PORT_WRITE(out_SPR_EVENT_VAL [i], internal_SPR_EVENT_VAL [i]); 136 } 119 137 120 138 log_end(Context_State,FUNCTION); -
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 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp
r101 r123 38 38 log_printf(FUNC,Decod,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Decod == true41 log_printf(INFO,Decod,FUNCTION,_("<%s> Parameters"),_name.c_str());42 43 std::cout << *param << std::endl;44 #endif40 // #if DEBUG_Decod == true 41 // log_printf(INFO,Decod,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Decod,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp
r120 r123 25 25 log_function(Decod,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 //----------------------------------- 28 30 // Initialization … … 280 282 #endif 281 283 } 284 } 285 else 286 { 287 for (uint32_t i=0; i<_param->_nb_context; i++) 288 { 289 internal_CONTEXT_HAVE_TRANSACTION [i] = false; 290 // internal_CONTEXT_ADDRESS_PREVIOUS [i] = reg_CONTEXT_ADDRESS_PREVIOUS [i]; 291 // internal_CONTEXT_IS_DELAY_SLOT [i] = reg_CONTEXT_IS_DELAY_SLOT [i]; 292 for (uint32_t j=0; j<_param->_nb_inst_fetch[i]; j++) 293 PORT_WRITE(out_IFETCH_ACK [i][j], 0); 294 } 295 296 PORT_WRITE(out_CONTEXT_EVENT_VAL, 0); 297 298 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 299 { 300 PORT_WRITE(out_PREDICT_VAL [i], 0); 301 PORT_WRITE(out_DECOD_VAL [i], 0); 302 303 #ifdef STATISTICS 304 internal_DECOD_VAL [i] = 0; 305 #endif 306 } 307 } 282 308 283 309 log_end(Decod,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h
r111 r123 106 106 public : SC_OUT(Toperation_t ) ** out_DECOD_OUT_OPERATION ;//[nb_inst_decod] 107 107 public : SC_OUT(Tcontrol_t ) ** out_DECOD_OUT_NO_EXECUTE ;//[nb_inst_decod] 108 //public : SC_OUT(Tcontrol_t ) ** out_DECOD_OUT_HAVE_EVENT ;//[nb_inst_decod] 109 public : SC_OUT(Tcontrol_t ) ** out_DECOD_OUT_LAST_EVENT ;//[nb_inst_decod] 108 110 public : SC_OUT(Tcontrol_t ) ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod] 109 111 #ifdef DEBUG … … 134 136 public : SC_OUT(Tcounter_t ) ** out_NB_INST_ALL ;//[nb_context] 135 137 138 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 139 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_EVENT ;//[nb_context] 140 136 141 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 137 142 … … 141 146 private : std::list<decod_queue_entry_t*> * reg_QUEUE ; 142 147 private : uint32_t * reg_NB_INST ;//[nb_context] 148 private : uint32_t * reg_NB_INST_EVENT ;//[nb_context] 149 143 150 // implementation : one_fifo only 144 151 private : uint32_t reg_LAST_SLOT ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp
r111 r123 40 40 usage_environment(_usage); 41 41 42 #if DEBUG_Decod_queue == true43 log_printf(INFO,Decod_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());42 // #if DEBUG_Decod_queue == true 43 // log_printf(INFO,Decod_queue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 44 45 std::cout << *param << std::endl;46 #endif45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 log_printf(INFO,Decod_queue,FUNCTION,_("Allocation")); … … 129 129 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 130 130 sensitive << (*(in_DECOD_OUT_ACK [i])); 131 132 133 134 135 sensitive << (*(in_DEPTH_MIN [i]));136 sensitive << (*(in_DEPTH_MAX [i]));137 138 139 131 // for (uint32_t i=0; i<_param->_nb_context; i++) 132 // { 133 // if (_param->_have_port_depth) 134 // { 135 // sensitive << (*(in_DEPTH_MIN [i])); 136 // sensitive << (*(in_DEPTH_MAX [i])); 137 // } 138 // sensitive << (*(in_DEPTH_FULL[i])); 139 // } 140 140 141 141 # ifdef SYSTEMCASS_SPECIFIC 142 // List dependency information143 for (uint32_t i=0; i<_param->_nb_inst_decod; i++)144 {145 (*(out_DECOD_OUT_VAL [i])) (*(in_DECOD_OUT_ACK [i]));146 for (uint32_t j=0; j<_param->_nb_context; j++)147 {148 if (_param->_have_port_depth)149 {150 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j]));151 (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j]));152 }153 }154 }142 // // List dependency information 143 // for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 144 // { 145 // (*(out_DECOD_OUT_VAL [i])) (*(in_DECOD_OUT_ACK [i])); 146 // for (uint32_t j=0; j<_param->_nb_context; j++) 147 // { 148 // if (_param->_have_port_depth) 149 // { 150 // (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j])); 151 // (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j])); 152 // } 153 // } 154 // } 155 155 # endif 156 156 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp
r118 r123 100 100 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); 101 101 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 102 // ALLOC1_SIGNAL_OUT(out_DECOD_OUT_HAVE_EVENT ,"have_event" ,Tcontrol_t ,1 ); 103 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_LAST_EVENT ,"last_event" ,Tcontrol_t ,1 ); 102 104 ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 ); 103 105 #ifdef DEBUG … … 143 145 } 144 146 147 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 148 { 149 ALLOC1_INTERFACE_BEGIN("context",IN ,NORTH,_("Context"), _param->_nb_context); 150 151 ALLOC1_SIGNAL_IN ( in_CONTEXT_EVENT ,"event" ,Tcontrol_t ,1); 152 153 ALLOC1_INTERFACE_END(_param->_nb_context); 154 } 155 145 156 if (usage_is_set(_usage,USE_SYSTEMC)) 146 157 { … … 152 163 } 153 164 154 ALLOC1(reg_NB_INST,uint32_t,_param->_nb_context); 165 ALLOC1(reg_NB_INST ,uint32_t,_param->_nb_context); 166 ALLOC1(reg_NB_INST_EVENT ,uint32_t,_param->_nb_context); 155 167 156 168 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp
r115 r123 62 62 DELETE1_SIGNAL(out_DECOD_OUT_TYPE ,_param->_nb_inst_decod,_param->_size_type ); 63 63 DELETE1_SIGNAL(out_DECOD_OUT_OPERATION ,_param->_nb_inst_decod,_param->_size_operation ); 64 DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 64 DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 65 // DELETE1_SIGNAL(out_DECOD_OUT_HAVE_EVENT ,_param->_nb_inst_decod,1 ); 66 DELETE1_SIGNAL(out_DECOD_OUT_LAST_EVENT ,_param->_nb_inst_decod,1 ); 65 67 DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1 ); 66 68 #ifdef DEBUG … … 88 90 89 91 DELETE1_SIGNAL(out_NB_INST_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); 92 93 DELETE1_SIGNAL( in_CONTEXT_EVENT ,_param->_nb_context,1); 90 94 91 95 // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 117 121 } 118 122 119 DELETE1(reg_NB_INST ,_param->_nb_context); 123 DELETE1(reg_NB_INST ,_param->_nb_context); 124 DELETE1(reg_NB_INST_EVENT ,_param->_nb_context); 120 125 121 126 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMealy_decod_out.cpp
r115 r123 24 24 log_begin(Decod_queue,FUNCTION); 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 27 Tcontrol_t val [_param->_nb_inst_decod]; 26 27 if (PORT_READ(in_NRESET)) 28 { 29 bool context_val [_param->_nb_context]; 30 uint32_t nb_inst_event [_param->_nb_context]; 31 for (uint32_t i=0; i<_param->_nb_context; i++) 32 { 33 context_val [i] = true; 34 nb_inst_event [i] = reg_NB_INST_EVENT [i]; 35 } 36 37 Tcontrol_t val [_param->_nb_inst_decod]; 28 38 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 29 39 { … … 44 54 45 55 Tcontext_t context = reg_QUEUE[num_bank].front()->_context_id [0]; 46 Tdepth_t depth = reg_QUEUE[num_bank].front()->_depth [0];47 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;48 Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;49 Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]);50 56 51 // is a valid instruction ? 52 // If DEPTH_CURRENT : 53 // equal at DEPTH_MIN -> not speculative 54 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 55 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 56 57 // All case 58 // ....... min ...X... max ....... OK 59 // ....... min ....... max ...X... KO 60 // ...X... min ....... max ....... KO 61 // ....... max ....... min ...X... OK 62 // ...X... max ....... min ....... OK 63 // ....... max ...X... min ....... KO 64 65 Tcontrol_t is_valid = true; 57 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 66 58 67 // Tcontrol_t is_valid = ((depth == depth_min) or 68 // depth_full or 69 // ((depth_min <= depth_max)? 70 // ((depth >= depth_min) and (depth <=depth_max)): 71 // ((depth >= depth_min) or (depth <=depth_max)))); 72 //Tcontrol_t is_valid = ((depth == depth_min) or 73 // ((depth_min < depth_max)? 74 // (depth<=depth_max): 75 // ((depth > depth_min) or (depth <= depth_max)))); 76 //Tcontrol_t is_valid = depth <= depth_max; 77 78 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 79 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 80 log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 81 log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 82 log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 83 log_printf(TRACE,Decod_queue,FUNCTION," * depth_full : %d",depth_full); 84 #ifdef DEBUG 85 log_printf(TRACE,Decod_queue,FUNCTION," * address : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address [0],reg_QUEUE[num_bank].front()->_address [0]<<2); 86 #endif 87 log_printf(TRACE,Decod_queue,FUNCTION," * address_next : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address_next[0],reg_QUEUE[num_bank].front()->_address_next[0]<<2); 59 if (context_val [context]) 60 { 88 61 89 internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 90 if (is_valid) 91 { 92 val [i] = 1; 93 internal_DECOD_OUT_ACK [i] = PORT_READ(in_DECOD_OUT_ACK [i]); 94 } 95 else 96 { 97 // Consume the instruction (to erase) 98 internal_DECOD_OUT_ACK [i] = 1; 62 // Tdepth_t depth = reg_QUEUE[num_bank].front()->_depth [0]; 63 // Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 64 // Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0; 65 // Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]); 66 67 // is a valid instruction ? 68 // If DEPTH_CURRENT : 69 // equal at DEPTH_MIN -> not speculative 70 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 71 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 72 73 // All case 74 // ....... min ...X... max ....... OK 75 // ....... min ....... max ...X... KO 76 // ...X... min ....... max ....... KO 77 // ....... max ....... min ...X... OK 78 // ...X... max ....... min ....... OK 79 // ....... max ...X... min ....... KO 80 81 Tcontrol_t is_valid = (nb_inst_event [context] == 0); 82 83 // Tcontrol_t is_valid = ((depth == depth_min) or 84 // depth_full or 85 // ((depth_min <= depth_max)? 86 // ((depth >= depth_min) and (depth <=depth_max)): 87 // ((depth >= depth_min) or (depth <=depth_max)))); 88 89 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 90 log_printf(TRACE,Decod_queue,FUNCTION," * context_val : %d",context_val [context]); 91 log_printf(TRACE,Decod_queue,FUNCTION," * nb_inst_event: %d",nb_inst_event [context]); 92 // log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 93 // log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 94 // log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 95 // log_printf(TRACE,Decod_queue,FUNCTION," * depth_full : %d",depth_full); 96 #ifdef DEBUG 97 log_printf(TRACE,Decod_queue,FUNCTION," * address : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address [0],reg_QUEUE[num_bank].front()->_address [0]<<2); 98 #endif 99 log_printf(TRACE,Decod_queue,FUNCTION," * address_next : 0x%x (0x%x)",reg_QUEUE[num_bank].front()->_address_next[0],reg_QUEUE[num_bank].front()->_address_next[0]<<2); 100 101 internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 102 103 if (is_valid) 104 { 105 val [i] = 1; 106 internal_DECOD_OUT_ACK [i] = PORT_READ(in_DECOD_OUT_ACK [i]); 107 108 } 109 else 110 { 111 // Consume the instruction (to erase) 112 internal_DECOD_OUT_ACK [i] = 1; 113 114 // Have event ? 115 if (nb_inst_event [context] > 0) 116 { 117 nb_inst_event [context] --; 118 119 // Last event ? 120 if (nb_inst_event [context] == 0) 121 { 122 context_val [context] = false; 123 } 124 } 125 } 99 126 } 100 127 } … … 107 134 108 135 PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]); 136 } 137 } 138 else 139 { 140 // Reset 141 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 142 { 143 internal_DECOD_OUT_VAL [i] = 0; 144 internal_DECOD_OUT_ACK [i] = 0; 145 PORT_WRITE(out_DECOD_OUT_VAL [i],0); 146 } 109 147 } 110 148 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_genMoore.cpp
r111 r123 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 //-------------------------------------------------------------------- 28 30 //-----[ DECOD_IN ]--------------------------------------------------- … … 34 36 { 35 37 internal_DECOD_IN_ACK [i] = (reg_QUEUE[num_bank].size() < _param->_size_queue); 36 PORT_WRITE(out_DECOD_IN_ACK [i],internal_DECOD_IN_ACK [i]);37 38 38 39 num_bank = (num_bank+1)%_param->_nb_bank; … … 57 58 PORT_WRITE(out_DECOD_OUT_OPERATION [i],reg_QUEUE[num_bank].front()->_operation [0]); 58 59 PORT_WRITE(out_DECOD_OUT_NO_EXECUTE [i],reg_QUEUE[num_bank].front()->_no_execute [0]); 60 // PORT_WRITE(out_DECOD_OUT_HAVE_EVENT [i],0); 61 PORT_WRITE(out_DECOD_OUT_LAST_EVENT [i],0); 59 62 PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE[num_bank].front()->_is_delay_slot [0]); 60 63 #ifdef DEBUG … … 86 89 for (uint32_t i=0; i<_param->_nb_context; i++) 87 90 PORT_WRITE(out_NB_INST_ALL [i], reg_NB_INST [i]); 91 } 92 else 93 { 94 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 95 { 96 internal_DECOD_IN_ACK [i] = 0; 97 } 98 for (uint32_t i=0; i<_param->_nb_context; i++) 99 PORT_WRITE(out_NB_INST_ALL [i], 0); 100 } 101 102 103 // Write output 104 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 105 { 106 PORT_WRITE(out_DECOD_IN_ACK [i],internal_DECOD_IN_ACK [i]); 107 } 108 88 109 89 110 log_end(Decod_queue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp
r112 r123 35 35 36 36 for (uint32_t i=0; i<_param->_nb_context; i++) 37 reg_NB_INST [i]=0; 37 { 38 reg_NB_INST [i]=0; 39 reg_NB_INST_EVENT [i]=0; 40 } 38 41 39 42 reg_NUM_BANK_HEAD = 0; … … 131 134 // Update pointer 132 135 reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank; 133 reg_NB_INST [context] --; 136 137 reg_NB_INST [context] --; 138 if (reg_NB_INST_EVENT [context] > 0) 139 reg_NB_INST_EVENT [context] --; 134 140 } 135 141 } 136 142 137 143 //-------------------------------------------------------------------- 144 //-----[ CONTEXT_EVENT ]---------------------------------------------- 145 //-------------------------------------------------------------------- 146 for (uint32_t i=0; i<_param->_nb_context; i++) 147 if (PORT_READ(in_CONTEXT_EVENT [i])) 148 reg_NB_INST_EVENT [i] = reg_NB_INST [i]; 149 150 //-------------------------------------------------------------------- 138 151 //-----[ OTHERS ]----------------------------------------------------- 139 152 //-------------------------------------------------------------------- … … 141 154 #if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE) 142 155 log_printf(TRACE,Decod_queue,FUNCTION," * Dump decod_queue"); 143 log_printf(TRACE,Decod_queue,FUNCTION," * reg_NUM_BANK_HEAD : %d",reg_NUM_BANK_HEAD);144 log_printf(TRACE,Decod_queue,FUNCTION," * reg_NUM_BANK_TAIL : %d",reg_NUM_BANK_TAIL);156 log_printf(TRACE,Decod_queue,FUNCTION," * reg_NUM_BANK_HEAD : %d",reg_NUM_BANK_HEAD); 157 log_printf(TRACE,Decod_queue,FUNCTION," * reg_NUM_BANK_TAIL : %d",reg_NUM_BANK_TAIL); 145 158 for (uint32_t i=0; i<_param->_nb_context; i++) 146 log_printf(TRACE,Decod_queue,FUNCTION," * reg_NB_INST [%d] : %d",i,reg_NB_INST [i]); 147 159 { 160 log_printf(TRACE,Decod_queue,FUNCTION," * reg_NB_INST [%d] : %d",i,reg_NB_INST [i]); 161 log_printf(TRACE,Decod_queue,FUNCTION," * reg_NB_INST_EVENT [%d] : %d",i,reg_NB_INST_EVENT [i]); 162 } 148 163 for (uint32_t i=0; i<_param->_nb_bank; ++i) 149 164 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMealy_decod_out.cpp
r115 r123 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 29 bool context_val [_param->_nb_context]; 30 uint32_t nb_inst_event [_param->_nb_context]; 31 for (uint32_t i=0; i<_param->_nb_context; i++) 32 { 33 context_val [i] = true; 34 nb_inst_event [i] = reg_NB_INST_EVENT [i]; 35 } 36 27 37 Tcontrol_t val [_param->_nb_inst_decod]; 28 38 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) … … 47 57 48 58 Tcontext_t context = reg_QUEUE->front()->_context_id [index]; 49 Tdepth_t depth = reg_QUEUE->front()->_depth [index];50 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;51 Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0;52 Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]);53 59 54 // is a valid instruction ? 55 // If DEPTH_CURRENT : 56 // equal at DEPTH_MIN -> not speculative 57 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 58 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 59 60 // All case 61 // ....... min ...X... max ....... OK 62 // ....... min ....... max ...X... KO 63 // ...X... min ....... max ....... KO 64 // ....... max ....... min ...X... OK 65 // ...X... max ....... min ....... OK 66 // ....... max ...X... min ....... KO 67 68 Tcontrol_t is_valid = true; 69 // Tcontrol_t is_valid = ((depth == depth_min) or 70 // depth_full or 71 // ((depth_min <= depth_max)? 72 // ((depth >= depth_min) and (depth <=depth_max)): 73 // ((depth >= depth_min) or (depth <=depth_max)))); 74 //Tcontrol_t is_valid = ((depth == depth_min) or 75 // ((depth_min < depth_max)? 76 // (depth<=depth_max): 77 // ((depth > depth_min) or (depth <= depth_max)))); 78 //Tcontrol_t is_valid = depth <= depth_max; 60 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 79 61 80 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 81 log_printf(TRACE,Decod_queue,FUNCTION," * context : %d",context); 82 log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 83 log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 84 log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 85 log_printf(TRACE,Decod_queue,FUNCTION," * depth_full : %d",depth_full); 86 #ifdef DEBUG 87 log_printf(TRACE,Decod_queue,FUNCTION," * address : 0x%x (0x%x)",reg_QUEUE->front()->_address [index],reg_QUEUE->front()->_address [index]<<2); 88 #endif 89 log_printf(TRACE,Decod_queue,FUNCTION," * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[index],reg_QUEUE->front()->_address_next[index]<<2); 90 internal_DECOD_OUT_VAL [index] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 91 if (is_valid) 62 if (context_val [context]) 92 63 { 93 val [i] = 1; 94 internal_DECOD_OUT_ACK [index] = PORT_READ(in_DECOD_OUT_ACK [i]); 95 } 96 else 97 { 98 // Consume the instruction (to erase) 99 internal_DECOD_OUT_ACK [index] = 1; 64 65 // Tdepth_t depth = reg_QUEUE->front()->_depth [index]; 66 // Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 67 // Tdepth_t depth_max = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX [context]):0; 68 // Tcontrol_t depth_full = PORT_READ(in_DEPTH_FULL[context]); 69 70 // is a valid instruction ? 71 // If DEPTH_CURRENT : 72 // equal at DEPTH_MIN -> not speculative 73 // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss 74 // include ]DEPTH_MIN:DEPTH_MAX] -> speculative 75 76 // All case 77 // ....... min ...X... max ....... OK 78 // ....... min ....... max ...X... KO 79 // ...X... min ....... max ....... KO 80 // ....... max ....... min ...X... OK 81 // ...X... max ....... min ....... OK 82 // ....... max ...X... min ....... KO 83 84 Tcontrol_t is_valid = (nb_inst_event [context] == 0); 85 86 // Tcontrol_t is_valid = ((depth == depth_min) or 87 // depth_full or 88 // ((depth_min <= depth_max)? 89 // ((depth >= depth_min) and (depth <=depth_max)): 90 // ((depth >= depth_min) or (depth <=depth_max)))); 91 92 log_printf(TRACE,Decod_queue,FUNCTION," * is_valid : %d",is_valid); 93 log_printf(TRACE,Decod_queue,FUNCTION," * context_val : %d",context_val [context]); 94 log_printf(TRACE,Decod_queue,FUNCTION," * nb_inst_event: %d",nb_inst_event [context]); 95 // log_printf(TRACE,Decod_queue,FUNCTION," * depth : %d",depth); 96 // log_printf(TRACE,Decod_queue,FUNCTION," * depth_min : %d",depth_min); 97 // log_printf(TRACE,Decod_queue,FUNCTION," * depth_max : %d",depth_max); 98 // log_printf(TRACE,Decod_queue,FUNCTION," * depth_full : %d",depth_full); 99 #ifdef DEBUG 100 log_printf(TRACE,Decod_queue,FUNCTION," * address : 0x%x (0x%x)",reg_QUEUE->front()->_address [index],reg_QUEUE->front()->_address [index]<<2); 101 #endif 102 log_printf(TRACE,Decod_queue,FUNCTION," * address_next : 0x%x (0x%x)",reg_QUEUE->front()->_address_next[index],reg_QUEUE->front()->_address_next[index]<<2); 103 internal_DECOD_OUT_VAL [index] = 1; // in all case, val is set (entry is not empty, and instruction is valid) 104 105 if (is_valid) 106 { 107 val [i] = 1; 108 internal_DECOD_OUT_ACK [index] = PORT_READ(in_DECOD_OUT_ACK [i]); 109 } 110 else 111 { 112 // Consume the instruction (to erase) 113 internal_DECOD_OUT_ACK [index] = 1; 114 115 // Have event ? 116 if (nb_inst_event [context] > 0) 117 { 118 nb_inst_event [context] --; 119 120 // Last event ? 121 if (nb_inst_event [context] == 0) 122 { 123 context_val [context] = false; 124 } 125 } 126 } 100 127 } 101 128 } … … 107 134 108 135 PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]); 136 } 137 } 138 else 139 { 140 // Reset 141 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 142 { 143 internal_DECOD_OUT_VAL [i] = 0; 144 internal_DECOD_OUT_ACK [i] = 0; 145 PORT_WRITE(out_DECOD_OUT_VAL [i],0); 146 } 109 147 } 110 148 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_genMoore.cpp
r111 r123 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 //-------------------------------------------------------------------- 28 30 //-----[ DECOD_IN ]--------------------------------------------------- … … 34 36 { 35 37 internal_DECOD_IN_ACK [i] = ack; 36 PORT_WRITE(out_DECOD_IN_ACK [i],ack);37 38 } 38 39 } … … 57 58 PORT_WRITE(out_DECOD_OUT_OPERATION [i],reg_QUEUE->front()->_operation [index]); 58 59 PORT_WRITE(out_DECOD_OUT_NO_EXECUTE [i],reg_QUEUE->front()->_no_execute [index]); 60 // PORT_WRITE(out_DECOD_OUT_HAVE_EVENT [i],0); 61 PORT_WRITE(out_DECOD_OUT_LAST_EVENT [i],0); 59 62 PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [index]); 60 63 #ifdef DEBUG … … 83 86 for (uint32_t i=0; i<_param->_nb_context; i++) 84 87 PORT_WRITE(out_NB_INST_ALL [i], reg_NB_INST [i]); 88 } 89 else 90 { 91 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 92 { 93 internal_DECOD_IN_ACK [i] = 0; 94 } 95 for (uint32_t i=0; i<_param->_nb_context; i++) 96 PORT_WRITE(out_NB_INST_ALL [i], 0); 97 } 98 99 // Write output 100 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 101 { 102 PORT_WRITE(out_DECOD_IN_ACK [i],internal_DECOD_IN_ACK [i]); 103 } 104 85 105 86 106 log_end(Decod_queue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_transition.cpp
r112 r123 34 34 35 35 for (uint32_t i=0; i<_param->_nb_context; i++) 36 reg_NB_INST [i]=0; 36 { 37 reg_NB_INST [i]=0; 38 reg_NB_INST_EVENT [i]=0; 39 } 37 40 38 41 reg_LAST_SLOT = 0; … … 130 133 log_printf(TRACE,Decod_queue,FUNCTION,_(" * context : %d"),context); 131 134 132 reg_NB_INST [context] --; 135 reg_NB_INST [context] --; 136 if (reg_NB_INST_EVENT [context] > 0) 137 reg_NB_INST_EVENT [context] --; 138 133 139 log_printf(TRACE,Decod_queue,FUNCTION,_(" * nb_inst : %d"),reg_NB_INST [context]); 134 140 } … … 149 155 } 150 156 } 157 158 //-------------------------------------------------------------------- 159 //-----[ CONTEXT_EVENT ]---------------------------------------------- 160 //-------------------------------------------------------------------- 161 for (uint32_t i=0; i<_param->_nb_context; i++) 162 if (PORT_READ(in_CONTEXT_EVENT [i])) 163 reg_NB_INST_EVENT [i] = reg_NB_INST [i]; 151 164 } 152 165 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
r111 r123 25 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 26 26 27 // if (PORT_READ(in_NRESET)) 27 28 (this->*function_genMealy_decod_out) (); 28 29 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h
r118 r123 86 86 public : SC_OUT(Toperation_t ) ** out_DECOD_OPERATION ;//[nb_inst_decod] 87 87 public : SC_OUT(Tcontrol_t ) ** out_DECOD_NO_EXECUTE ;//[nb_inst_decod] 88 //public : SC_OUT(Tcontrol_t ) ** out_DECOD_HAVE_EVENT ;//[nb_inst_decod] 89 public : SC_OUT(Tcontrol_t ) ** out_DECOD_LAST_EVENT ;//[nb_inst_decod] 88 90 public : SC_OUT(Tcontrol_t ) ** out_DECOD_IS_DELAY_SLOT ;//[nb_inst_decod] 89 91 #ifdef DEBUG … … 130 132 // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 131 133 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_DECOD_ENABLE ;//[nb_context] 134 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_EVENT ;//[nb_context] 132 135 public : SC_IN (Tcontrol_t ) ** in_CONTEXT_DEPTH_VAL ;//[nb_context] 133 136 public : SC_IN (Tdepth_t ) ** in_CONTEXT_DEPTH ;//[nb_context] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit.cpp
r88 r123 39 39 usage_environment(_usage); 40 40 41 #if DEBUG_Decod_unit == true42 log_printf(INFO,Decod_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());41 // #if DEBUG_Decod_unit == true 42 // log_printf(INFO,Decod_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); 43 43 44 std::cout << *param << std::endl;45 #endif44 // std::cout << *param << std::endl; 45 // #endif 46 46 47 47 log_printf(INFO,Decod_unit,FUNCTION,_("Allocation")); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp
r118 r123 91 91 ALLOC1_SIGNAL_OUT(out_DECOD_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); 92 92 ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); 93 // ALLOC1_SIGNAL_OUT(out_DECOD_HAVE_EVENT ,"have_event" ,Tcontrol_t ,1 ); 94 ALLOC1_SIGNAL_OUT(out_DECOD_LAST_EVENT ,"last_event" ,Tcontrol_t ,1 ); 93 95 ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t ,1 ); 94 96 #ifdef DEBUG … … 159 161 160 162 ALLOC1_SIGNAL_IN (in_CONTEXT_DECOD_ENABLE,"decod_enable",Tcontrol_t,1); 163 ALLOC1_SIGNAL_IN (in_CONTEXT_EVENT ,"event" ,Tcontrol_t,1); 161 164 ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH_VAL ,"depth_val" ,Tcontrol_t,1); 162 165 ALLOC1_SIGNAL_IN (in_CONTEXT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth); … … 499 502 PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_NO_EXECUTE" , 500 503 dest,"out_DECOD_" +toString(i)+"_NO_EXECUTE" ); 504 // PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_HAVE_EVENT" , 505 // dest,"out_DECOD_" +toString(i)+"_HAVE_EVENT" ); 506 PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_LAST_EVENT" , 507 dest,"out_DECOD_" +toString(i)+"_LAST_EVENT" ); 501 508 PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_IS_DELAY_SLOT", 502 509 dest,"out_DECOD_" +toString(i)+"_IS_DELAY_SLOT"); … … 569 576 dest,"out_NB_INST_"+toString(i)+"_DECOD_ALL"); 570 577 } 578 579 580 581 for (uint32_t i=0; i<_param->_nb_context; i++) 582 { 583 dest = _name; 584 585 #ifdef POSITION 586 _component->interface_map (src ,"context_"+toString(i), 587 dest,"context_"+toString(i)); 588 #endif 589 590 PORT_MAP(_component,src , "in_CONTEXT_"+toString(i)+"_EVENT" , 591 dest, "in_CONTEXT_"+toString(i)+"_EVENT" ); 592 593 } 571 594 } 572 595 // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp
r112 r123 47 47 DELETE1_SIGNAL(out_DECOD_OPERATION ,_param->_nb_inst_decod,_param->_size_operation ); 48 48 DELETE1_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_nb_inst_decod,1 ); 49 // DELETE1_SIGNAL(out_DECOD_HAVE_EVENT ,_param->_nb_inst_decod,1 ); 50 DELETE1_SIGNAL(out_DECOD_LAST_EVENT ,_param->_nb_inst_decod,1 ); 49 51 DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT ,_param->_nb_inst_decod,1 ); 50 52 #ifdef DEBUG … … 87 89 88 90 DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE ,_param->_nb_context,1); 91 DELETE1_SIGNAL(in_CONTEXT_EVENT ,_param->_nb_context,1); 89 92 DELETE1_SIGNAL(in_CONTEXT_DEPTH ,_param->_nb_context,_param->_size_depth); 90 93 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue.cpp
r119 r123 39 39 usage_environment(_usage); 40 40 41 #if DEBUG_Front_end_Glue == true42 log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());43 44 std::cout << *param << std::endl;45 #endif41 // #if DEBUG_Front_end_Glue == true 42 // log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 43 44 // std::cout << *param << std::endl; 45 // #endif 46 46 47 47 log_printf(INFO,Front_end_Glue,FUNCTION,_("<%s> : Allocation"),_name.c_str()); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_branch_complete.cpp
r88 r123 22 22 log_begin(Front_end_Glue,FUNCTION); 23 23 24 if (PORT_READ(in_NRESET)) 25 { 24 26 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) 25 27 { … … 36 38 PORT_WRITE(out_BRANCH_COMPLETE_ACK [i],ack); 37 39 } 40 } 41 else 42 { 43 // RESET 44 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) 45 { 46 PORT_WRITE(out_BRANCH_COMPLETE_PREDICTION_UNIT_VAL [i],0); 47 PORT_WRITE(out_BRANCH_COMPLETE_CONTEXT_STATE_VAL [i],0); 48 PORT_WRITE(out_BRANCH_COMPLETE_ACK [i],0); 49 } 50 } 38 51 39 52 log_end(Front_end_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_decod.cpp
r88 r123 24 24 // Warning : this function is an sc_method if _have_port_context_id 25 25 26 if (PORT_READ(in_NRESET)) 27 { 26 28 for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) 27 29 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j) 28 30 PORT_WRITE(out_DECOD_CONTEXT_ID [i][j],_param->_translate_context_id_from_decod_unit[i][PORT_READ(in_DECOD_DECOD_UNIT_CONTEXT_ID [i][j])]); 31 } 29 32 30 33 log_end(Front_end_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_depth.cpp
r101 r123 22 22 log_begin(Front_end_Glue,FUNCTION); 23 23 24 if (PORT_READ(in_NRESET)) 25 { 24 26 for (uint32_t i=0; i<_param->_nb_context; ++i) 25 27 { … … 48 50 PORT_WRITE(out_DEPTH_DECOD_UNIT_FULL [i][j], PORT_READ(in_DEPTH_PREDICTION_UNIT_FULL [num_context])); 49 51 } 52 } 50 53 51 54 log_end(Front_end_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_event.cpp
r119 r123 23 23 log_function(Front_end_Glue,FUNCTION,_name.c_str()); 24 24 25 if (PORT_READ(in_NRESET)) 26 { 25 27 for (uint32_t i=0; i<_param->_nb_context; ++i) 26 28 { … … 124 126 #endif 125 127 } 128 } 129 else 130 { 131 // Reset 132 for (uint32_t i=0; i<_param->_nb_context; ++i) 133 { 134 PORT_WRITE(out_EVENT_VAL [i], 0); 135 PORT_WRITE(out_EVENT_IFETCH_UNIT_VAL [i], 0); 136 PORT_WRITE(out_EVENT_PREDICTION_UNIT_VAL [i], 0); 137 PORT_WRITE(out_EVENT_CONTEXT_STATE_ACK [i], 0); 138 } 139 } 126 140 127 141 log_end(Front_end_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/src/Front_end_Glue_genMealy_nb_inst.cpp
r108 r123 22 22 log_begin(Front_end_Glue,FUNCTION); 23 23 24 if (PORT_READ(in_NRESET)) 25 { 24 26 for (uint32_t i=0; i<_param->_nb_context; ++i) 25 27 { … … 28 30 PORT_WRITE(out_NB_INST_DECOD_ALL [i], nb_inst); 29 31 PORT_WRITE(out_NB_INST_CONTEXT_STATE_DECOD_ALL [i], nb_inst); 32 } 30 33 } 31 34 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management.cpp
r88 r123 38 38 log_printf(FUNC,Address_management,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Address_management == true41 log_printf(INFO,Address_management,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Address_management == true 41 // log_printf(INFO,Address_management,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Address_management,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_genMoore.cpp
r107 r123 24 24 log_printf(FUNC,Address_management,FUNCTION,"Begin"); 25 25 26 if (PORT_READ(in_NRESET)) 27 { 26 28 // ========================================= 27 29 // ===== ADDRESS =========================== … … 30 32 internal_ADDRESS_VAL = reg_PC_ACCESS_VAL; 31 33 32 PORT_WRITE(out_ADDRESS_VAL ,internal_ADDRESS_VAL );33 34 // Align pc on instruction packet address. 34 35 PORT_WRITE(out_ADDRESS_INSTRUCTION_ADDRESS ,reg_PC_ACCESS - (reg_PC_ACCESS%_param->_nb_instruction)); … … 48 49 internal_PREDICT_VAL = not reg_PC_NEXT_NEXT_VAL; 49 50 50 PORT_WRITE(out_PREDICT_VAL ,internal_PREDICT_VAL);51 51 PORT_WRITE(out_PREDICT_PC_PREVIOUS ,reg_PC_CURRENT ); 52 52 PORT_WRITE(out_PREDICT_PC_CURRENT ,reg_PC_NEXT ); 53 53 PORT_WRITE(out_PREDICT_PC_CURRENT_IS_DS_TAKE,reg_PC_NEXT_IS_DS_TAKE); 54 54 } 55 else 56 { 57 internal_ADDRESS_VAL = 0; 58 internal_PREDICT_VAL = 0; 59 } 60 61 PORT_WRITE(out_ADDRESS_VAL,internal_ADDRESS_VAL); 62 PORT_WRITE(out_PREDICT_VAL,internal_PREDICT_VAL); 63 55 64 log_printf(FUNC,Address_management,FUNCTION,"End"); 56 65 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp
r119 r123 222 222 std::string instruction_enable; 223 223 for (uint32_t i=0; i<_param->_nb_instruction; ++i) 224 instruction_enable += toString(reg_PC_ACCESS_INSTRUCTION_ENABLE [i])+ " ";224 instruction_enable += ((reg_PC_ACCESS_VAL)?(toString(reg_PC_ACCESS_INSTRUCTION_ENABLE [i])):"X") + " "; 225 225 226 226 log_printf(TRACE,Address_management,FUNCTION," * Access : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s", … … 238 238 std::string instruction_enable; 239 239 for (uint32_t i=0; i<_param->_nb_instruction; ++i) 240 instruction_enable += toString(reg_PC_CURRENT_INSTRUCTION_ENABLE [i])+ " ";240 instruction_enable += ((reg_PC_CURRENT_VAL)?(toString(reg_PC_CURRENT_INSTRUCTION_ENABLE [i])):"X") + " "; 241 241 242 242 log_printf(TRACE,Address_management,FUNCTION," * Current : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s", … … 254 254 std::string instruction_enable; 255 255 for (uint32_t i=0; i<_param->_nb_instruction; ++i) 256 instruction_enable += toString(reg_PC_NEXT_INSTRUCTION_ENABLE [i])+ " ";256 instruction_enable += ((reg_PC_NEXT_VAL)?(toString(reg_PC_NEXT_INSTRUCTION_ENABLE [i])):"X") + " "; 257 257 258 258 log_printf(TRACE,Address_management,FUNCTION," * Next : %d %d 0x%.8x (%.8x) - %.2d %.2d %.2d - %s", -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue.cpp
r88 r123 38 38 log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Ifetch_queue == true41 log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Ifetch_queue == true 41 // log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Allocation"),_name.c_str()); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_deallocation.cpp
r112 r123 36 36 DELETE0_SIGNAL( in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth ); 37 37 DELETE0_SIGNAL(out_ADDRESS_IFETCH_QUEUE_ID ,_param->_size_ifetch_queue_ptr); 38 DELETE1_SIGNAL( in_ADDRESS_INSTRUCTION_ENABLE , 1,_param->_nb_instruction);38 DELETE1_SIGNAL( in_ADDRESS_INSTRUCTION_ENABLE ,_param->_nb_instruction,1); 39 39 40 DELETE1_SIGNAL(out_DECOD_VAL , 1,_param->_nb_instruction);41 DELETE1_SIGNAL( in_DECOD_ACK , 1,_param->_nb_instruction);42 DELETE1_SIGNAL(out_DECOD_INSTRUCTION ,_param->_ size_instruction,_param->_nb_instruction);40 DELETE1_SIGNAL(out_DECOD_VAL ,_param->_nb_instruction,1); 41 DELETE1_SIGNAL( in_DECOD_ACK ,_param->_nb_instruction,1); 42 DELETE1_SIGNAL(out_DECOD_INSTRUCTION ,_param->_nb_instruction,_param->_size_instruction); 43 43 DELETE0_SIGNAL(out_DECOD_ADDRESS ,_param->_size_instruction_address); 44 44 DELETE0_SIGNAL(out_DECOD_INST_IFETCH_PTR ,_param->_size_inst_ifetch_ptr ); … … 51 51 DELETE0_SIGNAL( in_ICACHE_RSP_PACKET_ID ,_param->_size_ifetch_queue_ptr); 52 52 DELETE0_SIGNAL( in_ICACHE_RSP_ERROR ,_param->_size_icache_error); 53 DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_ size_instruction,_param->_nb_instruction);53 DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_nb_instruction,_param->_size_instruction); 54 54 55 55 DELETE0_SIGNAL( in_EVENT_RESET_VAL,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_genMoore.cpp
r119 r123 23 23 log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin"); 24 24 25 if (PORT_READ(in_NRESET)) 26 { 25 27 // ========================================================== 26 28 // =====[ ADDRESS ]========================================== … … 29 31 internal_ADDRESS_ACK = (_queue[reg_PTR_WRITE]->_state == IFETCH_QUEUE_STATE_EMPTY); 30 32 31 PORT_WRITE(out_ADDRESS_ACK , internal_ADDRESS_ACK);32 33 if (_param->_have_port_ifetch_queue_ptr) 33 34 PORT_WRITE(out_ADDRESS_IFETCH_QUEUE_ID, reg_PTR_WRITE); … … 43 44 { 44 45 internal_DECOD_VAL [i] = ack and _queue[reg_PTR_READ]->_instruction_enable [i]; 45 PORT_WRITE(out_DECOD_VAL [i], internal_DECOD_VAL [i]);46 46 PORT_WRITE(out_DECOD_INSTRUCTION [i], _queue[reg_PTR_READ]->_instruction [i]); 47 47 } … … 55 55 PORT_WRITE(out_DECOD_EXCEPTION , _queue[reg_PTR_READ]->_exception ); 56 56 } 57 } 58 else 59 { 60 // Reset 61 internal_ADDRESS_ACK = 0; 62 for (uint32_t i=0; i<_param->_nb_instruction; i++) 63 internal_DECOD_VAL [i] = 0; 64 65 } 66 67 // Write Output 68 PORT_WRITE(out_ADDRESS_ACK , internal_ADDRESS_ACK); 69 for (uint32_t i=0; i<_param->_nb_instruction; i++) 70 PORT_WRITE(out_DECOD_VAL [i], internal_DECOD_VAL [i]); 57 71 58 72 log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue.cpp
r88 r123 38 38 log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Ifetch_unit_Glue == true41 log_printf(INFO,Ifetch_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Ifetch_unit_Glue == true 41 // log_printf(INFO,Ifetch_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Ifetch_unit_Glue,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_event.cpp
r81 r123 24 24 log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin"); 25 25 26 if (PORT_READ(in_NRESET)) 27 { 26 28 Tcontrol_t address_ack = PORT_READ(in_EVENT_ADDRESS_ACK); 27 29 Tcontrol_t queue_ack = PORT_READ(in_EVENT_QUEUE_ACK ); … … 31 33 PORT_WRITE(out_EVENT_ADDRESS_VAL, val and queue_ack); 32 34 PORT_WRITE(out_EVENT_QUEUE_VAL , address_ack and val); 33 35 } 36 else 37 { 38 PORT_WRITE(out_EVENT_ACK , 0); 39 PORT_WRITE(out_EVENT_ADDRESS_VAL, 0); 40 PORT_WRITE(out_EVENT_QUEUE_VAL , 0); 41 } 42 34 43 log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End"); 35 44 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_genMealy_icache_req.cpp
r85 r123 24 24 log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin"); 25 25 26 if (PORT_READ(in_NRESET)) 27 { 26 28 Tcontrol_t address_val = PORT_READ(in_ICACHE_REQ_ADDRESS_VAL); 27 29 Tcontrol_t queue_ack = PORT_READ(in_ICACHE_REQ_QUEUE_ACK ); … … 35 37 PORT_WRITE(out_ICACHE_REQ_ADDRESS ,address); 36 38 PORT_WRITE(out_ICACHE_REQ_QUEUE_ADDRESS,address); 39 } 40 else 41 { 42 // RESET 43 PORT_WRITE(out_ICACHE_REQ_VAL , 0); 44 PORT_WRITE(out_ICACHE_REQ_ADDRESS_ACK, 0); 45 PORT_WRITE(out_ICACHE_REQ_QUEUE_VAL , 0); 46 } 37 47 38 48 log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit.cpp
r88 r123 37 37 log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin"); 38 38 39 #if DEBUG_Ifetch_unit == true40 log_printf(INFO,Ifetch_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());39 // #if DEBUG_Ifetch_unit == true 40 // log_printf(INFO,Ifetch_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); 41 41 42 std::cout << *param << std::endl;43 #endif42 // std::cout << *param << std::endl; 43 // #endif 44 44 45 45 log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp
r112 r123 40 40 DELETE0_SIGNAL( in_ICACHE_RSP_PACKET_ID ,_param->_size_ifetch_queue_ptr ); 41 41 DELETE0_SIGNAL( in_ICACHE_RSP_ERROR ,_param->_size_icache_error); 42 DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_ size_instruction,_param->_nb_instruction);42 DELETE1_SIGNAL( in_ICACHE_RSP_INSTRUCTION,_param->_nb_instruction, _param->_size_instruction); 43 43 44 44 DELETE0_SIGNAL(out_PREDICT_VAL ,1); … … 52 52 DELETE0_SIGNAL( in_PREDICT_BRANCH_STATE ,_param->_size_branch_state); 53 53 DELETE0_SIGNAL( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth); 54 DELETE1_SIGNAL( in_PREDICT_INSTRUCTION_ENABLE , 1,_param->_nb_instruction);54 DELETE1_SIGNAL( in_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_instruction,1); 55 55 56 56 // DELETE0_SIGNAL(out_DECOD_CONTEXT_ID ,_param->_size_context_id); … … 62 62 DELETE1_SIGNAL(out_DECOD_VAL ,1,_param->_nb_instruction); 63 63 DELETE1_SIGNAL( in_DECOD_ACK ,1,_param->_nb_instruction); 64 DELETE1_SIGNAL(out_DECOD_INSTRUCTION ,_param->_ size_instruction,_param->_nb_instruction);64 DELETE1_SIGNAL(out_DECOD_INSTRUCTION ,_param->_nb_instruction,_param->_size_instruction); 65 65 66 66 DELETE0_SIGNAL( in_EVENT_VAL ,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue.cpp
r88 r123 39 39 log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin"); 40 40 41 #if DEBUG_Branch_Target_Buffer_Glue == true42 log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());43 44 std::cout << *param << std::endl;45 #endif41 // #if DEBUG_Branch_Target_Buffer_Glue == true 42 // log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 43 44 // std::cout << *param << std::endl; 45 // #endif 46 46 47 47 log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp
r98 r123 25 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 28 30 { … … 62 64 } 63 65 } 66 } 67 else 68 { 69 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 70 { 71 PORT_WRITE(out_DECOD_ACK [i], 0); 72 PORT_WRITE(out_DECOD_REGISTER_VAL [i], 0); 73 if (_param->_have_port_victim) 74 PORT_WRITE(out_DECOD_VICTIM_VAL [i], 0); 75 } 76 } 64 77 65 78 log_end(Branch_Target_Buffer_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp
r108 r123 25 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 28 30 { … … 83 85 } 84 86 } 87 } 88 else 89 { 90 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 91 { 92 PORT_WRITE(out_PREDICT_ACK [i], 0); 93 PORT_WRITE(out_PREDICT_REGISTER_VAL [i], 0); 94 if (_param->_have_port_victim) 95 PORT_WRITE(out_PREDICT_VICTIM_VAL [i], 0); 96 } 97 } 85 98 86 99 log_end(Branch_Target_Buffer_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp
r98 r123 25 25 log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 28 30 { … … 52 54 } 53 55 } 56 } 57 else 58 { 59 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 60 { 61 PORT_WRITE(out_UPDATE_ACK [i], 0); 62 PORT_WRITE(out_UPDATE_REGISTER_VAL [i], 0); 63 if (_param->_have_port_victim) 64 PORT_WRITE(out_UPDATE_VICTIM_VAL [i], 0); 65 } 66 } 54 67 55 68 log_end(Branch_Target_Buffer_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp
r113 r123 38 38 log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Branch_Target_Buffer_Register == true41 log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,_("<%s> Parameters"),_name.c_str());42 43 std::cout << *param << std::endl;44 #endif40 // #if DEBUG_Branch_Target_Buffer_Register == true 41 // log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp
r88 r123 25 25 log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 28 30 { … … 55 57 } 56 58 } 57 59 } 60 else 61 { 62 // internal_DECOD_HIT [i] = hit ; 63 // internal_DECOD_NUM_BANK [i] = num_bank ; 64 // internal_DECOD_NUM_ENTRY [i] = num_entry; 65 } 66 58 67 log_end(Branch_Target_Buffer_Register,FUNCTION); 59 68 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_predict.cpp
r108 r123 25 25 log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 28 30 { … … 64 66 } 65 67 } 68 } 69 // else 70 // { 71 // } 66 72 67 73 log_end(Branch_Target_Buffer_Register,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp
r88 r123 25 25 log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 28 30 { … … 55 57 } 56 58 } 59 } 60 // else 61 // { 62 // internal_UPDATE_HIT [i] = hit ; 63 // internal_UPDATE_NUM_BANK [i] = num_bank ; 64 // internal_UPDATE_NUM_ENTRY [i] = num_entry; 65 // } 57 66 58 67 log_end(Branch_Target_Buffer_Register,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer.cpp
r88 r123 40 40 log_printf(INFO,Branch_Target_Buffer,FUNCTION,"Allocation"); 41 41 42 #if DEBUG_Branch_Target_Buffer == true43 log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("<%s> Parameters"),_name.c_str());42 // #if DEBUG_Branch_Target_Buffer == true 43 // log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 44 45 std::cout << *param << std::endl;46 #endif45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 allocation ( -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp
r112 r123 40 40 41 41 42 #if DEBUG_Direction_Glue == true43 log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());44 45 std::cout << *param << std::endl;46 #endif42 // #if DEBUG_Direction_Glue == true 43 // log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 log_printf(INFO,Direction_Glue,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_predict.cpp
r107 r123 26 26 log_function(Direction_Glue,FUNCTION,_name.c_str()); 27 27 28 if (PORT_READ(in_NRESET)) 29 { 30 // std::cout << "Kane (before) " << std::endl; 31 // std::cout << _param << std::endl; 32 // std::cout << _param->_nb_inst_update << std::endl; 33 // std::cout << _param->_nb_inst_predict<< std::endl; 34 // std::cout << "Kane (end) " << std::endl; 35 36 28 37 // constant direction : never / always 29 38 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) … … 31 40 log_printf(TRACE,Direction_Glue,FUNCTION," * PREDICT [%d]",i); 32 41 33 Tcontrol_t direction ;42 Tcontrol_t direction = false; 34 43 35 44 switch (_param->_predictor_scheme) … … 86 95 PORT_WRITE(out_PREDICT_DIRECTION [i], direction); 87 96 } 97 } 98 else 99 { 100 //RESET 101 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 102 { 103 if (_param->_have_component_meta_predictor) 104 { 105 PORT_WRITE(out_PREDICT_PREDICTOR_VAL [i], 0); 106 PORT_WRITE(out_PREDICT_ACK [i], 0); 107 } 108 } 109 } 88 110 89 111 log_end(Direction_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_genMealy_update.cpp
r112 r123 26 26 log_function(Direction_Glue,FUNCTION,_name.c_str()); 27 27 28 if (PORT_READ(in_NRESET)) 29 { 28 30 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 29 31 { … … 35 37 PORT_WRITE(out_UPDATE_PREDICTOR_PREDICTION_IFETCH [i], PORT_READ(in_UPDATE_PREDICTION_IFETCH [i])); 36 38 } 37 39 } 40 else 41 { 42 // RESET 43 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 44 { 45 PORT_WRITE(out_UPDATE_PREDICTOR_VAL [i], 0); 46 PORT_WRITE(out_UPDATE_ACK [i], 0); 47 } 48 } 49 38 50 log_end(Direction_Glue,FUNCTION); 39 51 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict.cpp
r111 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 30 32 { … … 89 91 PORT_WRITE(out_PREDICT_DIRECTION [i],direction); 90 92 } 93 } 94 // else 95 // { 96 // } 91 97 92 98 log_end(Meta_Predictor_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_predict_valack.cpp
r111 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 30 32 { … … 40 42 41 43 PORT_WRITE(out_PREDICT_ACK [i],ack); 44 } 45 } 46 else 47 { 48 // Reset 49 for (uint32_t i=0; i<_param->_nb_inst_predict; ++i) 50 { 51 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 52 PORT_WRITE(out_PREDICT_PREDICTOR_VAL [j][i],0); 53 PORT_WRITE(out_PREDICT_ACK [i],0); 54 } 42 55 } 43 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update.cpp
r112 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 30 32 { … … 112 114 } 113 115 } 116 } 117 // else 118 // { 119 // // RESET 120 // } 114 121 115 122 log_end(Meta_Predictor_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Meta_Predictor_Glue_genMealy_update_valack.cpp
r111 r123 27 27 log_function(Meta_Predictor_Glue,FUNCTION,_name.c_str()); 28 28 29 if (PORT_READ(in_NRESET)) 30 { 29 31 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 30 32 { … … 40 42 41 43 PORT_WRITE(out_UPDATE_ACK [i],ack); 44 } 45 } 46 else 47 { 48 // RESET 49 for (uint32_t i=0; i<_param->_nb_inst_update; ++i) 50 { 51 for (uint32_t j=0; j<_param->_nb_predictor; ++j) 52 PORT_WRITE(out_UPDATE_PREDICTOR_VAL [j][i],0); 53 PORT_WRITE(out_UPDATE_ACK [i],0); 54 } 42 55 } 43 56 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp
r119 r123 29 29 log_function(Two_Level_Branch_Predictor,FUNCTION,_name.c_str()); 30 30 31 if (PORT_READ(in_NRESET)) 32 { 31 33 // =================================================================== 32 34 // =====[ PREDICT ]=================================================== … … 95 97 PORT_WRITE(out_PREDICT_HISTORY [i],history ); 96 98 } 99 } 97 100 98 101 log_end(Two_Level_Branch_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp
r88 r123 38 38 log_printf(FUNC,Direction,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Direction == true41 log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Direction == true 41 // log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Direction,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp
r110 r123 40 40 usage_environment(_usage); 41 41 42 #if DEBUG_Prediction_unit_Glue == true43 log_printf(INFO,Prediction_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());44 45 std::cout << *param << std::endl;46 #endif42 // #if DEBUG_Prediction_unit_Glue == true 43 // log_printf(INFO,Prediction_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp
r110 r123 290 290 PORT_WRITE(out_DECOD_ACK [i][j], ack[j]); 291 291 } 292 else 293 { 294 // Reset 295 for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++) 296 { 297 PORT_WRITE(out_DECOD_BTB_VAL [i], 0); 298 PORT_WRITE(out_DECOD_RAS_VAL [i], 0); 299 PORT_WRITE(out_DECOD_UPT_VAL [i], 0); 300 } 301 302 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 303 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) 304 PORT_WRITE(out_DECOD_ACK [i][j], 0); 305 } 292 306 log_end(Prediction_unit_Glue,FUNCTION); 293 307 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
r111 r123 420 420 PORT_WRITE(out_PREDICT_ACK[i],ack[i]); 421 421 } 422 else 423 { 424 // RESET 425 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++) 426 { 427 PORT_WRITE(out_PREDICT_BTB_VAL [i], 0); 428 PORT_WRITE(out_PREDICT_DIR_VAL [i], 0); 429 PORT_WRITE(out_PREDICT_RAS_VAL [i], 0); 430 PORT_WRITE(out_PREDICT_UPT_VAL [i], 0); 431 } 432 for (uint32_t i=0; i<_param->_nb_context; i++) 433 PORT_WRITE(out_PREDICT_ACK[i],0); 434 } 422 435 423 436 log_end(Prediction_unit_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp
r98 r123 25 25 log_function(Prediction_unit_Glue,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 28 30 { … … 88 90 PORT_WRITE(out_UPDATE_UPT_ACK [i], upt_ack); 89 91 } 92 } 93 else 94 { 95 // RESET 96 for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++) 97 { 98 PORT_WRITE(out_UPDATE_BTB_VAL [i], 0); 99 PORT_WRITE(out_UPDATE_DIR_VAL [i], 0); 100 PORT_WRITE(out_UPDATE_RAS_VAL [i], 0); 101 PORT_WRITE(out_UPDATE_UPT_ACK [i], 0); 102 } 103 } 90 104 91 105 log_end(Prediction_unit_Glue,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp
r88 r123 38 38 log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); 39 39 40 #if DEBUG_Return_Address_Stac == true41 log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Return_Address_Stac == true 41 // log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Return_Address_Stack,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_decod.cpp
r118 r123 66 66 } 67 67 } 68 else 69 { 70 // internal_DECOD_HIT [i] = (push or (reg_NB_ELT[context]>0)); 71 } 72 68 73 log_end(Return_Address_Stack,FUNCTION); 69 74 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_genMealy_predict.cpp
r118 r123 25 25 log_function(Return_Address_Stack,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET) == 1)27 if (PORT_READ(in_NRESET)) 28 28 { 29 29 #ifdef DEBUG_TEST … … 69 69 } 70 70 } 71 else 72 { 73 // for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 74 // internal_PREDICT_HIT [i] = (push or (reg_PREDICT_NB_ELT[context]>0)); 75 76 } 71 77 72 78 log_end(Return_Address_Stack,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
r122 r123 54 54 UPT_EVENT_STATE_KO_DECODE_WAIT_END_EVENT , // prediction unit is ok, wait the end of event (send by Context State) 55 55 UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT , // prediction unit is update, send signal to context manager 56 UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT // prediction unit is ok, wait the end of event (send by Context State) 56 UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT , // prediction unit is ok, wait the end of event (send by Context State) 57 UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE // prediction unit is ok, wait the end of event (send by Context State) 57 58 } upt_event_state_t; 58 59 … … 226 227 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT : return "UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT" ; break; 227 228 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT : return "UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT" ; break; 229 case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE : return "UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE" ; break; 228 230 default : return ""; break; 229 231 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
r111 r123 40 40 usage_environment(_usage); 41 41 42 #if DEBUG_Update_Prediction_Table == true43 log_printf(INFO,Update_Prediction_Table,FUNCTION,_("<%s> Parameters"),_name.c_str());44 45 std::cout << *param << std::endl;46 #endif42 // #if DEBUG_Update_Prediction_Table == true 43 // log_printf(INFO,Update_Prediction_Table,FUNCTION,_("<%s> Parameters"),_name.c_str()); 44 45 // std::cout << *param << std::endl; 46 // #endif 47 47 48 48 log_printf(INFO,Update_Prediction_Table,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
r122 r123 24 24 log_begin(Update_Prediction_Table,FUNCTION); 25 25 log_function(Update_Prediction_Table,FUNCTION,_name.c_str()); 26 26 27 if (PORT_READ(in_NRESET)) 28 { 27 29 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 28 30 #ifdef DEBUG_TEST … … 129 131 // PORT_WRITE(out_BRANCH_COMPLETE_ADDRESS_DEST [i], internal_BRANCH_COMPLETE_ADDRESS_DEST [i]); 130 132 } 131 133 } 132 134 log_end(Update_Prediction_Table,FUNCTION); 133 135 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp
r122 r123 68 68 } 69 69 } 70 else 71 { 72 // RESET 73 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 74 PORT_WRITE(out_DECOD_ACK [i], 0); 75 } 76 70 77 log_end(Update_Prediction_Table,FUNCTION); 71 78 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_predict.cpp
r122 r123 57 57 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * ACK : %d",internal_PREDICT_ACK [i]); 58 58 59 PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]);60 59 if (_param->_have_port_depth) 61 60 PORT_WRITE(out_PREDICT_UPDATE_PREDICTION_ID [i], internal_PREDICT_UPDATE_PREDICTION_ID [i]); … … 63 62 64 63 }//don't reset 64 else 65 { 66 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 67 { 68 internal_PREDICT_ACK [i] = 0; 69 // internal_PREDICT_UPDATE_PREDICTION_ID [i] = top; 70 } 71 } 72 73 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 74 PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]); 65 75 66 76 log_end(Update_Prediction_Table,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
r122 r123 248 248 internal_UPDATE_CONTEXT_ID [i] = context; 249 249 250 PORT_WRITE(out_UPDATE_VAL [i],internal_UPDATE_VAL [i]);251 250 if (val) 252 251 { … … 282 281 Tcontrol_t val = ((reg_UPT_EVENT_STATE [i] == UPT_EVENT_STATE_KO_DECODE_UPDATE_CONTEXT) or 283 282 (reg_UPT_EVENT_STATE [i] == UPT_EVENT_STATE_KO_COMMIT_UPDATE_CONTEXT)); 284 PORT_WRITE(out_BRANCH_EVENT_VAL [i],val);285 283 if (_param->_have_port_depth) 286 284 PORT_WRITE(out_BRANCH_EVENT_DEPTH [i],reg_EVENT_DEPTH [i]); … … 301 299 internal_UPDATE_VAL [i] = 0; 302 300 internal_UPDATE_VAL_WITHOUT_ACK [i] = 0; 301 internal_UPDATE_CONTEXT_ID [i] = 0; 302 303 303 } 304 304 for (uint32_t i=0; i<_param->_nb_context; i++) … … 308 308 } 309 309 310 // Write output 311 for (uint32_t i=0; i<_param->_nb_inst_update; i++) 312 PORT_WRITE(out_UPDATE_VAL [i],internal_UPDATE_VAL [i]); 313 for (uint32_t i=0; i<_param->_nb_context; i++) 314 PORT_WRITE(out_BRANCH_EVENT_VAL [i],internal_BRANCH_EVENT_VAL [i]); 310 315 311 316 log_end(Update_Prediction_Table,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r122 r123 545 545 } 546 546 547 // Test if freeing the branch with no accurate ? 548 if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko) 549 reg_IS_ACCURATE [context] = true; 550 547 551 // Update pointer 548 552 // * if update RAS : update pointer is decreaste until it equal at top pointer … … 577 581 } 578 582 579 reg_UPT_EVENT_STATE [context] = upt_event_state;580 583 } 581 584 else … … 593 596 } 594 597 595 // Test if freeing the branch with no accurate ? 596 if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false) and not ko) 597 reg_IS_ACCURATE [context] = true; 598 // special case : 599 if ((upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) and 600 (reg_UPT_UPDATE [context] == reg_EVENT_UPT_PTR [context])) 601 { 602 reg_UPT_TOP [context] = reg_UPT_TOP_EVENT [context]; 603 reg_UPT_UPDATE [context] = reg_UPT_TOP_EVENT [context]; 604 reg_IS_ACCURATE [context] = true; 605 606 upt_event_state = UPT_EVENT_STATE_OK; 607 } 608 609 reg_UPT_EVENT_STATE [context] = upt_event_state; 598 610 599 611 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * reg_UPT_UPDATE (after ) : %d",reg_UPT_UPDATE[context]); … … 654 666 655 667 Taddress_t address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src; 656 upt_state_t event_top= reg_UPDATE_PREDICTION_TABLE [context][top]._state;668 upt_state_t top_state = reg_UPDATE_PREDICTION_TABLE [context][top]._state; 657 669 658 670 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * upt_event_state : %s",toString(upt_event_state).c_str()); 659 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * event_top : %s",toString(event_top).c_str());671 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top_state : %s",toString(top_state).c_str()); 660 672 661 673 bool previous_ufpt_event = (reg_UFPT_EVENT_STATE [i] == UFPT_EVENT_STATE_KO_FLUSH); … … 667 679 or (upt_event_state == UPT_EVENT_STATE_KO_EVENT_WAIT_UFPT) 668 680 or (upt_event_state == UPT_EVENT_STATE_KO_EVENT_FLUSH_UPT) 669 or (event_top == UPDATE_PREDICTION_STATE_END_KO ) 670 or (event_top == UPDATE_PREDICTION_STATE_KO ) 681 or (upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) 682 or (top_state == UPDATE_PREDICTION_STATE_END_KO ) 683 or (top_state == UPDATE_PREDICTION_STATE_KO ) 671 684 ); 672 685 … … 706 719 reg_UPDATE_PREDICTION_TABLE [context][top]._retire_ok = false; 707 720 708 switch ( event_top)721 switch (top_state) 709 722 { 710 723 case UPDATE_PREDICTION_STATE_END_KO : 724 case UPDATE_PREDICTION_STATE_END : 711 725 { 712 726 // Have already update predictor … … 867 881 case UPT_EVENT_STATE_KO_COMMIT_WAIT_END_EVENT : 868 882 { 869 Tdepth_t depth = reg_EVENT_UPT_PTR [i]; 883 Tdepth_t depth = reg_EVENT_UPT_PTR [i]; 884 Tdepth_t update = reg_UPT_UPDATE [i]; 870 885 871 886 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth : %d",depth); … … 878 893 } 879 894 880 reg_UPT_TOP [i] = reg_UPT_TOP_EVENT [i]; 881 reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i]; 882 883 // break; continue 895 // Special case : branch_complete a speculative branch and the context_state signal the end of this event before the complete of previous branch 896 if (depth != update) 897 { 898 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * EVENT [%d] <- EVENT_STATE_COMMIT_WAIT_END_UPDATE (event)",i); 899 upt_event_state = UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE; 900 901 break; // stop here 902 } 903 904 reg_UPT_TOP [i] = reg_UPT_TOP_EVENT [i]; 905 reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i]; 906 907 // break; continue 884 908 } 885 909 case UPT_EVENT_STATE_KO_DECODE_WAIT_END_EVENT : … … 906 930 // Flush UPFT 907 931 flush_UFPT [i] = true; 932 933 if (upt_event_state == UPT_EVENT_STATE_KO_COMMIT_WAIT_END_UPDATE) 934 { 935 reg_UPT_TOP [i] = reg_UPT_TOP_EVENT [i]; 936 reg_UPT_UPDATE [i] = reg_UPT_TOP_EVENT [i]; 937 reg_IS_ACCURATE [i] = true; 938 939 upt_event_state = UPT_EVENT_STATE_OK; 940 } 908 941 909 942 // Flush UPT … … 978 1011 reg_EVENT_UPT_PTR [i] = top; 979 1012 reg_EVENT_UPT_FULL [i] = (not empty and (bottom == reg_UPT_TOP [i])); 1013 // reg_EVENT_DEPTH [i] = PORT_READ(in_EVENT_DEPTH [i]);//(top+1)%_param->_size_upt_queue[i]; 980 1014 reg_EVENT_DEPTH [i] = top; 1015 981 1016 // reg_EVENT_ADDRESS_SRC [i] = address_src; // delay_slot is compute in I_State 982 1017 // reg_EVENT_ADDRESS_DEST_VAL[i] = good_take; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp
r88 r123 37 37 log_printf(FUNC,Prediction_unit,FUNCTION,"Begin"); 38 38 39 #if DEBUG_Prediction_unit == true40 log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());39 // #if DEBUG_Prediction_unit == true 40 // log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str()); 41 41 42 std::cout << *param << std::endl;43 #endif42 // std::cout << *param << std::endl; 43 // #endif 44 44 45 45 log_printf(INFO,Prediction_unit,FUNCTION,"Allocation"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h
r108 r123 93 93 public : SC_OUT(Toperation_t ) ** out_DECOD_OPERATION ;//[sum_inst_decod] 94 94 public : SC_OUT(Tcontrol_t ) ** out_DECOD_NO_EXECUTE ;//[sum_inst_decod] 95 //public : SC_OUT(Tcontrol_t ) ** out_DECOD_HAVE_EVENT ;//[sum_inst_decod] 96 public : SC_OUT(Tcontrol_t ) ** out_DECOD_LAST_EVENT ;//[sum_inst_decod] 95 97 public : SC_OUT(Tcontrol_t ) ** out_DECOD_IS_DELAY_SLOT ;//[sum_inst_decod] 96 98 #ifdef DEBUG -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end.cpp
r88 r123 38 38 usage_environment(_usage); 39 39 40 #if DEBUG_Core == true41 log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());40 // #if DEBUG_Core == true 41 // log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str()); 42 42 43 std::cout << *param << std::endl;44 #endif43 // std::cout << *param << std::endl; 44 // #endif 45 45 46 46 log_printf(INFO,Front_end,FUNCTION,_("<%s> : Allocation"),_name.c_str()); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_allocation.cpp
r119 r123 101 101 ALLOC1_SIGNAL_OUT (out_DECOD_OPERATION ,"OPERATION" ,Toperation_t ,_param->_size_operation ); 102 102 ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE ,"NO_EXECUTE" ,Tcontrol_t ,1 ); 103 // ALLOC1_SIGNAL_OUT (out_DECOD_HAVE_EVENT ,"HAVE_EVENT" ,Tcontrol_t ,1 ); 104 ALLOC1_SIGNAL_OUT (out_DECOD_LAST_EVENT ,"LAST_EVENT" ,Tcontrol_t ,1 ); 103 105 ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT ,"IS_DELAY_SLOT" ,Tcontrol_t ,1 ); 104 106 #ifdef DEBUG … … 726 728 PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NO_EXECUTE" , 727 729 dest,"out_DECOD_"+toString(x)+"_NO_EXECUTE" ); 730 // PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAVE_EVENT" , 731 // dest,"out_DECOD_"+toString(x)+"_HAVE_EVENT" ); 732 PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_LAST_EVENT" , 733 dest,"out_DECOD_"+toString(x)+"_LAST_EVENT" ); 728 734 PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT", 729 735 dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT"); … … 865 871 COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_DECOD_ENABLE", 866 872 dest,"out_CONTEXT_"+toString(y)+"_DECOD_ENABLE"); 873 COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_EVENT", 874 dest,"out_CONTEXT_"+toString(y)+"_EVENT"); 867 875 868 876 dest = _name+"_glue"; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp
r122 r123 47 47 DELETE1_SIGNAL(out_DECOD_TYPE ,_param->_sum_inst_decod,_param->_size_type ); 48 48 DELETE1_SIGNAL(out_DECOD_OPERATION ,_param->_sum_inst_decod,_param->_size_operation ); 49 DELETE1_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_sum_inst_decod,1 ); 49 DELETE1_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_sum_inst_decod,1 ); 50 // DELETE1_SIGNAL(out_DECOD_HAVE_EVENT ,_param->_sum_inst_decod,1 ); 51 DELETE1_SIGNAL(out_DECOD_LAST_EVENT ,_param->_sum_inst_decod,1 ); 50 52 DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT ,_param->_sum_inst_decod,1 ); 51 53 #ifdef DEBUG
Note: See TracChangeset
for help on using the changeset viewer.