Changeset 108 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp
- Timestamp:
- Feb 12, 2009, 12:55:06 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_transition.cpp
r105 r108 31 31 for (uint32_t i=0; i<_param->_nb_context; i++) 32 32 reg_NB_INST [i]=0; 33 34 reg_LAST_SLOT = 0; 33 35 } 34 36 else … … 62 64 entry->_no_execute [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE [i]); 63 65 entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]); 66 #ifdef DEBUG 67 entry->_address [i] = PORT_READ(in_DECOD_IN_ADDRESS [i]); 68 #endif 64 69 entry->_address_next [i] = PORT_READ(in_DECOD_IN_ADDRESS_NEXT [i]); 65 70 entry->_has_immediat [i] = PORT_READ(in_DECOD_IN_HAS_IMMEDIAT [i]); … … 90 95 if (not reg_QUEUE->empty()) 91 96 { 92 bool find = false;97 bool find = false; 93 98 94 99 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 95 100 { 96 101 // Test transaction : if ok then invalid slot 102 // In order by rename logic 97 103 if (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i]) 98 104 { 99 105 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_OUT [%d]"),i); 100 106 107 #ifdef DEBUG_TEST 108 if (reg_LAST_SLOT != i) 109 throw ERRORMORPHEO(FUNCTION,toString(_("reg_LAST_SLOT (%d) is different at decod_out port (%d)."),reg_LAST_SLOT,i)); 110 #endif 111 reg_LAST_SLOT ++; 112 101 113 reg_QUEUE->front()->_val [i] = 0; 102 114 … … 108 120 } 109 121 // Test if slot is (again) valid, if yes, then have less one instruction in the entry 110 find |= reg_QUEUE->front()->_val [i];122 find |= reg_QUEUE->front()->_val [i]; 111 123 } 112 124 113 // test if can free the entry 114 125 // test if can free the entry : test if have consume all entry 126 if (not find) // no valid instruction in current slot 115 127 { 116 128 log_printf(TRACE,Decod_queue,FUNCTION,_(" * POP queue")); … … 119 131 delete reg_QUEUE->front(); 120 132 reg_QUEUE->pop_front(); 133 134 reg_LAST_SLOT = 0; 121 135 } 122 136 } … … 125 139 #if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE) 126 140 log_printf(TRACE,Decod_queue,FUNCTION," * Dump decod_queue"); 141 log_printf(TRACE,Decod_queue,FUNCTION," * reg_LAST_SLOT : %d",reg_LAST_SLOT); 127 142 uint32_t x=0; 128 143 for (std::list<decod_queue_entry_t*>::iterator it=reg_QUEUE->begin(); … … 144 159 ,(*it)->_no_execute [i] 145 160 ,(*it)->_is_delay_slot [i] 146 ,(*it)->_address _next[i]147 ,(*it)->_address _next[i]<<2161 ,(*it)->_address [i] 162 ,(*it)->_address [i]<<2 148 163 ,(*it)->_has_immediat [i] 149 164 ,(*it)->_immediat [i]
Note: See TracChangeset
for help on using the changeset viewer.