Changeset 72 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h
- Timestamp:
- Jan 29, 2008, 1:34:47 PM (16 years ago)
- File:
-
- 1 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/SelfTest/include/Memory.h
r71 r72 79 79 morpheo::behavioural::Tdcache_data_t rdata; 80 80 81 if (type == DCACHE_ LOAD)81 if (type == DCACHE_TYPE_LOAD) 82 82 rdata = read (context, address, type); 83 83 else 84 if ((type == DCACHE_ STORE_8 ) or85 (type == DCACHE_ STORE_16) or86 (type == DCACHE_ STORE_32) or87 (type == DCACHE_ STORE_64) )84 if ((type == DCACHE_TYPE_STORE_8 ) or 85 (type == DCACHE_TYPE_STORE_16) or 86 (type == DCACHE_TYPE_STORE_32) or 87 (type == DCACHE_TYPE_STORE_64) ) 88 88 rdata = write (context, address, type, data); 89 89 else … … 186 186 // 3 24 187 187 188 uint32_t memory_size = ((type==DCACHE_ STORE_16)?MEMORY_SIZE_16:189 ((type==DCACHE_ STORE_32)?MEMORY_SIZE_32:190 ((type==DCACHE_ STORE_64 )?MEMORY_SIZE_64:MEMORY_SIZE_8)));188 uint32_t memory_size = ((type==DCACHE_TYPE_STORE_16)?MEMORY_SIZE_16: 189 ((type==DCACHE_TYPE_STORE_32)?MEMORY_SIZE_32: 190 ((type==DCACHE_TYPE_STORE_64 )?MEMORY_SIZE_64:MEMORY_SIZE_8))); 191 191 192 192 uint32_t index_min = LSB<<3; // *8 … … 265 265 switch(i->_type) 266 266 { 267 case DCACHE_ LOAD : std::cout << "DCACHE_LOAD "; break;268 case DCACHE_ LOCK : std::cout << "DCACHE_LOCK "; break;269 case DCACHE_ INVALIDATE : std::cout << "DCACHE_INVALIDATE "; break;270 case DCACHE_ PREFETCH : std::cout << "DCACHE_PREFETCH "; break;271 case DCACHE_ FLUSH : std::cout << "DCACHE_FLUSH "; break;272 case DCACHE_ SYNCHRONIZATION : std::cout << "DCACHE_SYNCHRONIZATION"; break;273 case DCACHE_ STORE_8 : std::cout << "DCACHE_STORE_8 "; break;274 case DCACHE_ STORE_16 : std::cout << "DCACHE_STORE_16 "; break;275 case DCACHE_ STORE_32 : std::cout << "DCACHE_STORE_32 "; break;276 case DCACHE_ STORE_64 : std::cout << "DCACHE_STORE_64 "; break;267 case DCACHE_TYPE_LOAD : std::cout << "DCACHE_TYPE_LOAD "; break; 268 case DCACHE_TYPE_LOCK : std::cout << "DCACHE_TYPE_LOCK "; break; 269 case DCACHE_TYPE_INVALIDATE : std::cout << "DCACHE_TYPE_INVALIDATE "; break; 270 case DCACHE_TYPE_PREFETCH : std::cout << "DCACHE_TYPE_PREFETCH "; break; 271 case DCACHE_TYPE_FLUSH : std::cout << "DCACHE_TYPE_FLUSH "; break; 272 case DCACHE_TYPE_SYNCHRONIZATION : std::cout << "DCACHE_TYPE_SYNCHRONIZATION"; break; 273 case DCACHE_TYPE_STORE_8 : std::cout << "DCACHE_TYPE_STORE_8 "; break; 274 case DCACHE_TYPE_STORE_16 : std::cout << "DCACHE_TYPE_STORE_16 "; break; 275 case DCACHE_TYPE_STORE_32 : std::cout << "DCACHE_TYPE_STORE_32 "; break; 276 case DCACHE_TYPE_STORE_64 : std::cout << "DCACHE_TYPE_STORE_64 "; break; 277 277 } 278 278 std::cout << " - " … … 294 294 Memory_t * memory = new Memory_t (_nb_context, _nb_word, _size_word); 295 295 296 memory -> access (2, 0x10, DCACHE_ STORE_32, 0xdeadbeef);297 memory -> access (2, 0x14, DCACHE_ STORE_16, 0xdada5678);298 memory -> access (2, 0x16, DCACHE_ STORE_16, 0xbead1234);299 memory -> access (2, 0x18, DCACHE_ STORE_8 , 0x45675681);300 memory -> access (2, 0x19, DCACHE_ STORE_8 , 0x1f311219);301 memory -> access (2, 0x1a, DCACHE_ STORE_8 , 0x2e075607);302 memory -> access (2, 0x1b, DCACHE_ STORE_8 , 0x19811221);303 304 TEST(morpheo::behavioural::Tdcache_data_t, memory -> access (2, 0x10, DCACHE_ LOAD, 0), 0xdeadbeef);305 TEST(morpheo::behavioural::Tdcache_data_t, memory -> access (2, 0x14, DCACHE_ LOAD, 0), 0x12345678);306 TEST(morpheo::behavioural::Tdcache_data_t, memory -> access (2, 0x18, DCACHE_ LOAD, 0), 0x21071981);296 memory -> access (2, 0x10, DCACHE_TYPE_STORE_32, 0xdeadbeef); 297 memory -> access (2, 0x14, DCACHE_TYPE_STORE_16, 0xdada5678); 298 memory -> access (2, 0x16, DCACHE_TYPE_STORE_16, 0xbead1234); 299 memory -> access (2, 0x18, DCACHE_TYPE_STORE_8 , 0x45675681); 300 memory -> access (2, 0x19, DCACHE_TYPE_STORE_8 , 0x1f311219); 301 memory -> access (2, 0x1a, DCACHE_TYPE_STORE_8 , 0x2e075607); 302 memory -> access (2, 0x1b, DCACHE_TYPE_STORE_8 , 0x19811221); 303 304 TEST(morpheo::behavioural::Tdcache_data_t, memory -> access (2, 0x10, DCACHE_TYPE_LOAD, 0), 0xdeadbeef); 305 TEST(morpheo::behavioural::Tdcache_data_t, memory -> access (2, 0x14, DCACHE_TYPE_LOAD, 0), 0x12345678); 306 TEST(morpheo::behavioural::Tdcache_data_t, memory -> access (2, 0x18, DCACHE_TYPE_LOAD, 0), 0x21071981); 307 307 308 308 TEST(morpheo::behavioural::Tdcache_data_t, memory -> read_lsq (2, 0x10, OPERATION_MEMORY_LOAD_8_Z ), 0x000000ef);
Note: See TracChangeset
for help on using the changeset viewer.