Changeset 62 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src
- Timestamp:
- Dec 4, 2007, 2:31:54 PM (17 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp
r59 r62 67 67 in_MEMORY_IN_PACKET_ID = interface->set_signal_in <Tpacket_t > ("packet_id" ,_param->_size_packet_id ); 68 68 in_MEMORY_IN_OPERATION = interface->set_signal_in <Toperation_t > ("operation" ,_param->_size_operation ); 69 #ifdef HAVE_MEMORY_OUT_TYPE70 in_MEMORY_IN_TYPE = interface->set_signal_in <Ttype_t > ("type" ,_param->_size_type );71 #endif72 69 in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t > ("store_queue_ptr_write" ,_param->_size_address_store_queue); 73 70 in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t > ("load_queue_ptr_write" ,_param->_size_address_load_queue ); … … 97 94 out_MEMORY_OUT_CONTEXT_ID = interface->set_signal_out <Tcontext_t > ("context_id" ,_param->_size_context_id ); 98 95 out_MEMORY_OUT_PACKET_ID = interface->set_signal_out <Tpacket_t > ("packet_id" ,_param->_size_packet_id ); 99 #ifdef HAVE_MEMORY_OUT_OPERATION100 out_MEMORY_OUT_OPERATION = interface->set_signal_out <Toperation_t > ("operation" ,_param->_size_operation );101 #endif102 #ifdef HAVE_MEMORY_OUT_TYPE103 out_MEMORY_OUT_TYPE = interface->set_signal_out <Ttype_t > ("type" ,_param->_size_type );104 #endif105 96 out_MEMORY_OUT_WRITE_RD = interface->set_signal_out <Tcontrol_t > ("write_rd" ,1 ); 106 97 out_MEMORY_OUT_NUM_REG_RD = interface->set_signal_out <Tgeneral_address_t> ("num_reg_rd" ,_param->_size_general_register ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp
r59 r62 38 38 delete in_MEMORY_IN_PACKET_ID ; 39 39 delete in_MEMORY_IN_OPERATION ; 40 #ifdef HAVE_MEMORY_OUT_TYPE41 delete in_MEMORY_IN_TYPE ;42 #endif43 40 delete in_MEMORY_IN_STORE_QUEUE_PTR_WRITE; 44 41 delete in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ; … … 57 54 delete out_MEMORY_OUT_CONTEXT_ID; 58 55 delete out_MEMORY_OUT_PACKET_ID ; 59 #ifdef HAVE_MEMORY_OUT_OPERATION60 delete out_MEMORY_OUT_OPERATION ;61 #endif62 #ifdef HAVE_MEMORY_OUT_TYPE63 delete out_MEMORY_OUT_TYPE ;64 #endif65 56 delete out_MEMORY_OUT_WRITE_RD ; 66 57 delete out_MEMORY_OUT_NUM_REG_RD; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMoore.cpp
r59 r62 28 28 // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 29 30 // Test store and load queue31 30 Tcontext_t memory_out_context_id = 0; 32 31 Tpacket_t memory_out_packet_id = 0; 33 #ifdef HAVE_MEMORY_OUT_OPERATION34 Toperation_t memory_out_operation = 0;35 #endif36 #ifdef HAVE_MEMORY_OUT_TYPE37 Ttype_t memory_out_type = 0;38 #endif39 32 Tcontrol_t memory_out_write_rd = 0; 40 33 Tgeneral_address_t memory_out_num_reg_rd = 0; … … 47 40 internal_MEMORY_OUT_VAL = 0; 48 41 49 // TODO : now only store queue 42 // Test store and load queue 43 // TODO : il faut d'abord tester si un elment de l'access queue n'est pas commitable !!!!!!! 50 44 51 45 // Test an store must be commited. 52 53 54 46 if (_store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._state == STORE_QUEUE_COMMIT) 55 47 { … … 59 51 memory_out_context_id= _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._context_id; 60 52 memory_out_packet_id = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._packet_id ; 61 #ifdef HAVE_MEMORY_OUT_OPERATION62 memory_out_operation = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._operation;63 #endif64 #ifdef HAVE_MEMORY_OUT_TYPE65 memory_out_type = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._type;66 #endif67 53 // memory_out_write_rd 68 54 // memory_out_num_reg_rd … … 71 57 } 72 58 59 // write output 73 60 PORT_WRITE(out_MEMORY_OUT_VAL , internal_MEMORY_OUT_VAL); 74 61 75 62 PORT_WRITE(out_MEMORY_OUT_CONTEXT_ID, memory_out_context_id); 76 63 PORT_WRITE(out_MEMORY_OUT_PACKET_ID , memory_out_packet_id ); 77 #ifdef HAVE_MEMORY_OUT_OPERATION78 PORT_WRITE(out_MEMORY_OUT_OPERATION , memory_out_operation );79 #endif80 #ifdef HAVE_MEMORY_OUT_TYPE81 PORT_WRITE(out_MEMORY_OUT_TYPE , memory_out_type );82 #endif83 64 PORT_WRITE(out_MEMORY_OUT_WRITE_RD , memory_out_write_rd ); 84 65 PORT_WRITE(out_MEMORY_OUT_NUM_REG_RD, memory_out_num_reg_rd); … … 89 70 PORT_WRITE(out_MEMORY_OUT_EXCEPTION , memory_out_exception ); 90 71 72 // ~~~~~[ Interface "dache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 91 73 74 Tcontext_t dcache_req_context_id; 75 Tpacket_t dcache_req_packet_id ; 76 Tdcache_address_t dcache_req_address ; 77 Tdcache_type_t dcache_req_type ; 78 Tcontrol_t dcache_req_uncached ; 79 Tdcache_data_t dcache_req_wdata ; 80 81 internal_DCACHE_REQ_VAL = 0; 82 83 // Test store and load queue 84 85 // TODO : il faut d'abord tester si un elment de l'access queue n'est pas commitable !!!!!!! 86 87 // Test an store must be commited. 88 if (_store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._state == STORE_QUEUE_VALID_NO_SPECULATIVE) 89 { 90 internal_DCACHE_REQ_VAL = 1; 91 internal_DCACHE_REQ_SELECT_QUEUE = SELECT_STORE_QUEUE; 92 93 dcache_req_context_id = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._context_id; 94 dcache_req_packet_id = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._packet_id ; 95 dcache_req_address = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._address ; 96 dcache_req_type = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._dcache_type; 97 dcache_req_uncached = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._uncached ; 98 dcache_req_wdata = _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._wdata ; 99 } 100 101 PORT_WRITE(out_DCACHE_REQ_VAL , internal_DCACHE_REQ_VAL); 102 PORT_WRITE(out_DCACHE_REQ_CONTEXT_ID, dcache_req_context_id); 103 PORT_WRITE(out_DCACHE_REQ_PACKET_ID , dcache_req_packet_id ); 104 PORT_WRITE(out_DCACHE_REQ_ADDRESS , dcache_req_address ); 105 PORT_WRITE(out_DCACHE_REQ_TYPE , dcache_req_type ); 106 PORT_WRITE(out_DCACHE_REQ_UNCACHED , dcache_req_uncached ); 107 PORT_WRITE(out_DCACHE_REQ_WDATA , dcache_req_wdata ); 108 92 109 log_printf(FUNC,Load_store_unit,FUNCTION,"End"); 93 110 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp
r59 r62 57 57 // others in speculation_access_queue 58 58 59 Toperation_t operation = PORT_READ(in_MEMORY_IN_OPERATION); 60 Tgeneral_data_t address = (PORT_READ(in_MEMORY_IN_IMMEDIAT) + 61 PORT_READ(in_MEMORY_IN_DATA_RA )); 62 63 bool exception_alignement= (mask_memory_access(operation) & address) != 0; 59 Toperation_t operation = PORT_READ(in_MEMORY_IN_OPERATION); 60 Tgeneral_data_t address = (PORT_READ(in_MEMORY_IN_IMMEDIAT) + 61 PORT_READ(in_MEMORY_IN_DATA_RA )); 62 bool exception_alignement = (mask_memory_access(operation) & address) != 0; 64 63 65 64 if (is_operation_memory_store(operation) == true) … … 159 158 _store_queue [index]._context_id = PORT_READ(in_MEMORY_IN_CONTEXT_ID ); 160 159 _store_queue [index]._packet_id = PORT_READ(in_MEMORY_IN_PACKET_ID ); 161 #ifdef HAVE_MEMORY_OUT_OPERATION 162 _store_queue [index]._operation = operation; 163 #endif 164 #ifdef HAVE_MEMORY_OUT_TYPE 165 _store_queue [index]._type = PORT_READ(in_MEMORY_IN_TYPE ); 166 #endif 160 _store_queue [index]._dcache_type = operation_to_dcache_type(operation); 161 _store_queue [index]._uncached = 0; // is the MMU that have this info 167 162 _store_queue [index]._load_queue_ptr_write = PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE); 168 163 _store_queue [index]._address = address; … … 217 212 } 218 213 } 214 215 //================================================================ 216 // Interface "DCACHE_REQ" 217 //================================================================ 218 if (( internal_DCACHE_REQ_VAL == 1) and 219 (PORT_READ(in_DCACHE_REQ_ACK) == 1)) 220 { 221 switch (internal_DCACHE_REQ_SELECT_QUEUE) 222 { 223 case SELECT_STORE_QUEUE : 224 { 225 // ======================= 226 // ===== STORE_QUEUE ===== 227 // ======================= 228 229 // Entry flush and increase the read pointer 230 231 _store_queue [internal_MEMORY_STORE_QUEUE_PTR_READ]._state = STORE_QUEUE_COMMIT; 232 233 break; 234 } 235 case SELECT_LOAD_QUEUE : 236 case SELECT_LOAD_QUEUE_SPECULATIVE : 237 break; 238 } 239 } 240 241 #if DEBUG>=DEBUG_TRACE 242 // ***** dump store queue 243 cout << "Dump store queue" << endl 244 << "ptr_read : " << toString(static_cast<uint32_t>(internal_MEMORY_STORE_QUEUE_PTR_READ)) << endl; 245 246 for (uint32_t i=0; i<_param->_size_store_queue; i++) 247 { 248 uint32_t j = (internal_MEMORY_STORE_QUEUE_PTR_READ+i)%_param->_size_store_queue; 249 cout << "{" << j << "}" << endl 250 << _store_queue[j] << endl; 251 } 252 #endif 219 253 } 220 254
Note: See TracChangeset
for help on using the changeset viewer.