Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
- Timestamp:
- Dec 10, 2008, 7:31:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp
r82 r88 23 23 { 24 24 log_begin(Decod_queue,FUNCTION); 25 log_function(Decod_queue,FUNCTION,_name.c_str()); 25 26 26 27 Tcontrol_t val [_param->_nb_inst_decod]; … … 36 37 if (reg_QUEUE->front()->_val [i]) 37 38 { 38 log_printf(TRACE,Decod_queue,FUNCTION,_(" Queue is not empty, slot [%d] is valid."),i);39 log_printf(TRACE,Decod_queue,FUNCTION,_(" * Queue is not empty, slot [%d] is valid."),i); 39 40 40 41 Tcontext_t context = reg_QUEUE->front()->_context_id [i]; 41 42 Tdepth_t depth = reg_QUEUE->front()->_depth [i]; 42 Tdepth_t depth_base = (_param->_have_port_depth)?PORT_READ(in_DEPTH_TAIL [context]):0; 43 Tdepth_t depth_offset = (_param->_have_port_depth)?PORT_READ(in_DEPTH_NB_BRANCH [context]):0; 44 Tdepth_t depth_max = depth_base + depth_offset; 43 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0; 44 Tdepth_t depth_max = PORT_READ(in_DEPTH_MAX[context]); 45 45 46 46 // is a valid instruction ? 47 // * depth must be lower that depth max 48 Tcontrol_t is_valid = depth <= ((depth>depth_base)?(depth_max):(depth_max%_param->_nb_branch_speculated [context])); 47 // If DEPTH_CURRENT : 48 // equal at DEPTH_MIN -> not speculative 49 // not include ]DEPTH_MIN:DEPTH_MAX[ -> previous branch miss 50 // include ]DEPTH_MIN:DEPTH_MAX[ -> speculative 49 51 50 log_printf(TRACE,Decod_queue,FUNCTION,_(" * is_valid : %d"),is_valid); 52 // All case 53 // ....... min ...X... max ....... OK 54 // ....... min ....... max ...X... KO 55 // ...X... min ....... max ....... KO 56 // ....... max ....... min ...X... OK 57 // ...X... max ....... min ....... OK 58 // ....... max ...X... min ....... KO 59 60 Tcontrol_t is_valid = ((depth == depth_min) or 61 ((depth_min < depth_max)? 62 (depth<depth_max): 63 ((depth > depth_min) or (depth < depth_max)))); 64 // Tcontrol_t is_valid = depth <= depth_max; 65 66 log_printf(TRACE,Decod_queue,FUNCTION,_(" * is_valid : %d"),is_valid); 51 67 52 68 internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid) … … 65 81 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 66 82 { 83 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_OUT_VAL : %d"),val [i]); 84 67 85 PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]); 68 86 }
Note: See TracChangeset
for help on using the changeset viewer.