Ignore:
Timestamp:
Jan 29, 2008, 1:34:47 PM (16 years ago)
Author:
rosiere
Message:
  • SystemC de l'unite fonctionnelle.
  • gestion des groupes / instructions custom
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  
    7979    morpheo::behavioural::Tdcache_data_t rdata;
    8080
    81     if (type == DCACHE_LOAD)
     81    if (type == DCACHE_TYPE_LOAD)
    8282      rdata = read  (context, address, type);
    8383    else
    84       if ((type == DCACHE_STORE_8 ) or
    85           (type == DCACHE_STORE_16) or
    86           (type == DCACHE_STORE_32) or
    87           (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) )
    8888        rdata = write (context, address, type, data);
    8989      else
     
    186186    // 3   24
    187187
    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)));
    191191
    192192    uint32_t index_min = LSB<<3; // *8
     
    265265        switch(i->_type)
    266266          {
    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;
    277277          }
    278278        std::cout << " - "
     
    294294  Memory_t * memory = new Memory_t (_nb_context, _nb_word, _size_word);
    295295 
    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);
    307307
    308308  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.