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
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit
Files:
51 added
5 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);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp

    r71 r72  
    629629                  LABEL("   * rdata : " + toString(rdata));
    630630
    631                   if ((out_DCACHE_REQ_TYPE->read() == DCACHE_SYNCHRONIZATION) or
    632                       (out_DCACHE_REQ_TYPE->read() == DCACHE_LOAD))
     631                  if ((out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_SYNCHRONIZATION) or
     632                      (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_LOAD))
    633633                    {
    634634                      LABEL("     * have_dcache_rsp");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp

    r71 r72  
    657657                    {
    658658                      // Bus error
    659                       error = 1;
     659                      error = DCACHE_ERROR_BUS_ERROR;
    660660                      rdata = address; // convention : cache return the address fautive !
    661661                    }
     
    667667
    668668                  // test type : send or not a respons !
    669                   if ((out_DCACHE_REQ_TYPE->read() == DCACHE_SYNCHRONIZATION) or
    670                       (out_DCACHE_REQ_TYPE->read() == DCACHE_LOAD) or
    671                       ((error == 1) and ((out_DCACHE_REQ_TYPE->read() == DCACHE_STORE_8 ) or
    672                                          (out_DCACHE_REQ_TYPE->read() == DCACHE_STORE_16) or
    673                                          (out_DCACHE_REQ_TYPE->read() == DCACHE_STORE_32) or
    674                                          (out_DCACHE_REQ_TYPE->read() == DCACHE_STORE_64) )))
     669                  if ((out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_SYNCHRONIZATION) or
     670                      (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_LOAD) or
     671                      ((error != DCACHE_ERROR_NONE) and ((out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_8 ) or
     672                                                         (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_16) or
     673                                                         (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_32) or
     674                                                         (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_64) )))
    675675                    {
    676676                      LABEL("     * have_dcache_rsp");
  • 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

    r71 r72  
    114114//    out_MEMORY_OUT_DATA_RE       = interface->set_signal_out <Tspecial_data_t   > ("data_re"       ,_param->_size_general_data     );
    115115      out_MEMORY_OUT_EXCEPTION     = interface->set_signal_out <Texception_t      > ("exception"     ,_param->_size_exception        );
    116 
    117116    }
    118117
     
    132131      out_DCACHE_REQ_CONTEXT_ID = interface->set_signal_out <Tcontext_t        > ("context_id",_param->_size_dcache_context_id  );
    133132      out_DCACHE_REQ_PACKET_ID  = interface->set_signal_out <Tpacket_t         > ("packet_id" ,_param->_size_dcache_packet_id   );
    134       out_DCACHE_REQ_ADDRESS    = interface->set_signal_out <Tdcache_address_t > ("address"   ,_param->_size_dcache_address);
     133      out_DCACHE_REQ_ADDRESS    = interface->set_signal_out <Tdcache_address_t > ("address"   ,_param->_size_general_data);
    135134      out_DCACHE_REQ_TYPE       = interface->set_signal_out <Tdcache_type_t    > ("type"      ,_param->_size_dcache_type );
    136135      out_DCACHE_REQ_WDATA      = interface->set_signal_out <Tdcache_data_t    > ("wdata"     ,_param->_size_general_data);
  • 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

    r71 r72  
    620620               
    621621               
    622                 if (error != 0)
     622                if (error != DCACHE_ERROR_NONE)
    623623                  {
    624624                    log_printf(TRACE,Load_store_unit,FUNCTION," * have a bus error !!!");
Note: See TracChangeset for help on using the changeset viewer.