Changeset 123 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src
- Timestamp:
- Jun 8, 2009, 10:43:30 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src
- Files:
-
- 10 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
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
Note: See TracChangeset
for help on using the changeset viewer.