Changeset 88 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.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_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp
r81 r88 24 24 void Read_queue::transition (void) 25 25 { 26 log_printf(FUNC,Read_queue,FUNCTION,"Begin"); 26 log_begin(Read_queue,FUNCTION); 27 log_function(Read_queue,FUNCTION,_name.c_str()); 27 28 28 29 if (PORT_READ(in_NRESET) == 0) … … 33 34 // > 2) flush all slot in one cycle 34 35 35 while (_queue->empty() == false) 36 _queue->pop(); 36 _queue->clear(); 37 38 // Init, else error in registerfile 39 _queue_head->_ooo_engine_id = 0; 37 40 } 38 41 else … … 44 47 // cout << (*_queue_head) << endl; 45 48 46 log_printf(TRACE,Read_queue,FUNCTION," Read_queue size (begin) : %d",_queue->size());49 log_printf(TRACE,Read_queue,FUNCTION," * Read_queue size (begin) : %d",(int)_queue->size()); 47 50 // Write to read_queue 48 51 … … 51 54 bool need_new_head = false; 52 55 53 log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_IN : %d,%d",PORT_READ(in_READ_QUEUE_IN_VAL), not_full);56 log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_IN : %d,%d",PORT_READ(in_READ_QUEUE_IN_VAL), not_full); 54 57 if ((PORT_READ(in_READ_QUEUE_IN_VAL) == 1) and not_full) 55 58 { … … 62 65 if(_param->_have_port_ooo_engine_id) 63 66 entry->_ooo_engine_id= PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID); 64 if(_param->_have_port_rob_ id)67 if(_param->_have_port_rob_ptr ) 65 68 entry->_rob_id = PORT_READ(in_READ_QUEUE_IN_ROB_ID ); 66 69 entry->_operation = PORT_READ(in_READ_QUEUE_IN_OPERATION ); … … 82 85 entry->_num_reg_re = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE ); 83 86 84 log_printf(TRACE,Read_queue,FUNCTION," * push (id : %d-%d)",entry->_context_id, entry->_rob_id); 85 _queue->push(entry); 86 87 log_printf(TRACE,Read_queue,FUNCTION," * push (id : %d-%d)",entry->_context_id, entry->_rob_id); 88 _queue->push_back(entry); 87 89 88 90 // read next new head 89 91 if (empty) 90 92 { 91 log_printf(TRACE,Read_queue,FUNCTION," 93 log_printf(TRACE,Read_queue,FUNCTION," * queue was empty"); 92 94 need_new_head = true; 93 95 } … … 95 97 96 98 // Read from read_queue 97 log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_OUT : %d,%d",internal_READ_QUEUE_OUT_VAL, PORT_READ(in_READ_QUEUE_OUT_ACK));99 log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_OUT : %d,%d",internal_READ_QUEUE_OUT_VAL, PORT_READ(in_READ_QUEUE_OUT_ACK)); 98 100 if (( internal_READ_QUEUE_OUT_VAL == 1) and 99 101 (PORT_READ(in_READ_QUEUE_OUT_ACK) == 1)) 100 102 { 101 103 // Pop the entry 102 log_printf(TRACE,Read_queue,FUNCTION," * pop (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id);103 _queue->pop ();104 log_printf(TRACE,Read_queue,FUNCTION," * pop (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id); 105 _queue->pop_front(); 104 106 105 107 // read next new head 106 108 if (_queue->empty() == false) 107 109 { 108 log_printf(TRACE,Read_queue,FUNCTION," 110 log_printf(TRACE,Read_queue,FUNCTION," * queue was not empty"); 109 111 need_new_head = true; 110 112 } … … 128 130 if (need_new_head == true) 129 131 { 130 log_printf(TRACE,Read_queue,FUNCTION," * new head");132 log_printf(TRACE,Read_queue,FUNCTION," * new head"); 131 133 (*_queue_head) = (*_queue->front()); 132 134 } … … 138 140 // cout << (*_queue_head) << endl; 139 141 140 log_printf(TRACE,Read_queue,FUNCTION,"Read_queue size (end ) : %d",_queue->size()); 142 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Read_queue == true) 143 log_printf(TRACE,Read_queue,FUNCTION," * Dump Read_queue"); 144 log_printf(TRACE,Read_queue,FUNCTION," * size : %d",(int)_queue->size()); 145 146 if (_queue->size()>0) 147 { 148 // protected : Tread_queue_head_entry_t * _queue_head; 149 // protected : std::queue<Tread_queue_entry_t *> * _queue; 150 151 log_printf(TRACE,Read_queue,FUNCTION," * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", 152 0, 153 154 _queue_head->_context_id , 155 _queue_head->_front_end_id , 156 _queue_head->_ooo_engine_id , 157 _queue_head->_rob_id , 158 159 _queue_head->_type , 160 _queue_head->_operation , 161 162 _queue_head->_store_queue_ptr_write, 163 _queue_head->_load_queue_ptr_write , 164 165 _queue_head->_has_immediat , 166 _queue_head->_immediat , 167 168 _queue_head->_read_ra , 169 _queue_head->_read_ra_val , 170 _queue_head->_num_reg_ra , 171 _queue_head->_data_ra_val , 172 _queue_head->_data_ra , 173 174 _queue_head->_read_rb , 175 _queue_head->_read_rb_val , 176 _queue_head->_num_reg_rb , 177 _queue_head->_data_rb_val , 178 _queue_head->_data_rb , 179 180 _queue_head->_read_rc , 181 _queue_head->_read_rc_val , 182 _queue_head->_num_reg_rc , 183 _queue_head->_data_rc_val , 184 _queue_head->_data_rc , 185 186 _queue_head->_write_rd , 187 _queue_head->_num_reg_rd , 188 189 _queue_head->_write_re , 190 _queue_head->_num_reg_re , 191 192 toString_type(_queue_head->_type).c_str()); 193 194 195 std::list<Tread_queue_entry_t *>::iterator it=_queue->begin(); 196 ++it; // first is already printed 197 uint32_t i=1; 198 199 for (;it!=_queue->end(); ++it) 200 { 201 log_printf(TRACE,Read_queue,FUNCTION," * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.4d , %.1d %.4d , %.1d %.4d , %.1d %.4d, %.1d %.4d (%s)", 202 i, 203 204 (*it)->_context_id , 205 (*it)->_front_end_id , 206 (*it)->_ooo_engine_id , 207 (*it)->_rob_id , 208 209 (*it)->_type , 210 (*it)->_operation , 211 212 (*it)->_store_queue_ptr_write, 213 (*it)->_load_queue_ptr_write , 214 215 (*it)->_has_immediat , 216 (*it)->_immediat , 217 218 (*it)->_read_ra , 219 // (*it)->_read_ra_val , 220 (*it)->_num_reg_ra , 221 // (*it)->_data_ra_val , 222 // (*it)->_data_ra , 223 224 (*it)->_read_rb , 225 // (*it)->_read_rb_val , 226 (*it)->_num_reg_rb , 227 // (*it)->_data_rb_val , 228 // (*it)->_data_rb , 229 230 (*it)->_read_rc , 231 // (*it)->_read_rc_val , 232 (*it)->_num_reg_rc , 233 // (*it)->_data_rc_val , 234 // (*it)->_data_rc , 235 236 (*it)->_write_rd , 237 (*it)->_num_reg_rd , 238 239 (*it)->_write_re , 240 (*it)->_num_reg_re , 241 242 toString_type((*it)->_type).c_str()); 243 244 ++i; 245 } 246 } 247 #endif 248 249 141 250 } 142 251 143 252 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 144 end_cycle ();253 end_cycle (); 145 254 #endif 146 255 147 log_ printf(FUNC,Read_queue,FUNCTION,"End");256 log_end(Read_queue,FUNCTION); 148 257 }; 149 258
Note: See TracChangeset
for help on using the changeset viewer.