Ignore:
Timestamp:
Jan 15, 2009, 6:19:08 PM (16 years ago)
Author:
rosiere
Message:

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

Location:
trunk/IPs/systemC/Environment/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/Environment/src/Cache_Access_dreq_type2cache_type.cpp

    r81 r101  
    1010    switch (dreq_type)
    1111      {
    12       case DCACHE_TYPE_LOAD_8     : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1; break;
    13       case DCACHE_TYPE_LOAD_16    : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2; break;
    14       case DCACHE_TYPE_LOAD_32    : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4; break;
    15       case DCACHE_TYPE_LOAD_64    : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8; break;
    16       case DCACHE_TYPE_INVALIDATE : direction=cache::NONE ; type=cache::INVALIDATE                        ; nb_bytes = 1; break;
    17       case DCACHE_TYPE_FLUSH      : direction=cache::NONE ; type=cache::FLUSH                             ; nb_bytes = 1; break;
    18       case DCACHE_TYPE_PREFETCH   : direction=cache::NONE ; type=cache::INVALIDATE                        ; nb_bytes = 1; break;
    19 //    case DCACHE_TYPE_STORE_8_ACK: direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1; break;
    20       case DCACHE_TYPE_STORE_8    : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1; break;
    21       case DCACHE_TYPE_STORE_16   : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2; break;
    22       case DCACHE_TYPE_STORE_32   : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4; break;
    23       case DCACHE_TYPE_STORE_64   : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8; break;
    24       case DCACHE_TYPE_LOCK            :
    25       case DCACHE_TYPE_SYNCHRONIZATION :
     12      case DCACHE_TYPE_LOAD_8          : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break;
     13      case DCACHE_TYPE_LOAD_16         : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break;
     14      case DCACHE_TYPE_LOAD_32         : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break;
     15      case DCACHE_TYPE_LOAD_64         : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break;
     16      case DCACHE_TYPE_INVALIDATE      : direction=cache::NONE ;type=cache::INVALIDATE                               ;nb_bytes = 1;break;
     17      case DCACHE_TYPE_FLUSH           : direction=cache::NONE ;type=cache::FLUSH                                    ;nb_bytes = 1;break;
     18      case DCACHE_TYPE_PREFETCH        : direction=cache::NONE ;type=cache::PREFETCH                                 ;nb_bytes = 1;break;
     19//    case DCACHE_TYPE_STORE_8_ACK     : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break;
     20      case DCACHE_TYPE_STORE_8         : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break;
     21      case DCACHE_TYPE_STORE_16        : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break;
     22      case DCACHE_TYPE_STORE_32        : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break;
     23      case DCACHE_TYPE_STORE_64        : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break;
     24      case DCACHE_TYPE_SYNCHRONIZATION : direction=cache::NONE ;type=cache::SYNCHRONIZATION                          ;nb_bytes = 1;break;
     25      case DCACHE_TYPE_LOCK            : direction=cache::NONE ;type=cache::LOCK                                     ;nb_bytes = 1;break;
    2626      default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << dreq_type << ")" << std::endl; exit(1);}
    2727      }
  • trunk/IPs/systemC/Environment/src/Cache_Access_ireq_type2cache_type.cpp

    r81 r101  
    1313      case ICACHE_TYPE_INVALIDATE : {direction=cache::NONE ; type=cache::INVALIDATE; break;}
    1414      case ICACHE_TYPE_PREFETCH   : {direction=cache::NONE ; type=cache::PREFETCH  ; break;}
    15       case ICACHE_TYPE_LOCK       :
     15      case ICACHE_TYPE_LOCK       : {direction=cache::NONE ; type=cache::LOCK      ; break;}
    1616      default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << ireq_type << ")" << std::endl; exit(1);}
    1717      }
  • trunk/IPs/systemC/Environment/src/Environment_transition.cpp

    r88 r101  
    11#include "../include/Environment.h"
     2
     3#define CYCLE_MAX 0
     4#include "../../processor/Morpheo/Common/include/Test.h"
    25
    36using namespace morpheo;
     
    171174                uint32_t          size      = param->daccess_size_data [i]/8;
    172175
    173 //              _cout(ENVIRONMENT," * information\n");
    174 //              _cout(ENVIRONMENT,"   * context : %d\n" ,static_cast<uint32_t>(context));
    175 //              _cout(ENVIRONMENT,"   * packet  : %d\n" ,static_cast<uint32_t>(packet ));
    176 //              _cout(ENVIRONMENT,"   * address : %.x\n",static_cast<uint32_t>(address));
    177 //              _cout(ENVIRONMENT,"   * type    : %d\n" ,static_cast<uint32_t>(type   ));
    178 //              _cout(ENVIRONMENT,"   * size    : %d\n" ,static_cast<uint32_t>(size   ));
    179 
    180                 // search the entity
    181                 data::Entity      entity    = component_data->entity(static_cast<uint32_t>(address),size);
    182 
    183                 std::cout << entity << std::endl;
     176                _cout(ENVIRONMENT," * information\n");
     177                _cout(ENVIRONMENT,"   * context : %d\n" ,static_cast<uint32_t>(context));
     178                _cout(ENVIRONMENT,"   * packet  : %d\n" ,static_cast<uint32_t>(packet ));
     179                _cout(ENVIRONMENT,"   * address : %.x\n",static_cast<uint32_t>(address));
     180                _cout(ENVIRONMENT,"   * type    : %d\n" ,static_cast<uint32_t>(type   ));
     181                _cout(ENVIRONMENT,"   * size    : %d\n" ,static_cast<uint32_t>(size   ));
    184182
    185183                bool              uncached  = false;
     
    209207                  default                          :{            must_read=false; must_write=false; must_ack=false; must_ack_on_error=false; break;}
    210208                  }
     209               
     210                // search the entity
     211                data::Entity      entity    = component_data->entity(static_cast<uint32_t>(address),nb_bytes);
     212
     213                std::cout << entity << std::endl;
    211214               
    212215                // Test the type of the address
     
    250253                                       ,static_cast<uint32_t>((wdata>> 0)&0xff)
    251254                                       );
     255
     256                                if (wdata == 0)
     257                                  std::cout << STR_OK << std::endl;
     258                                else
     259                                  std::cout << STR_KO << std::endl;
    252260
    253261                                stop (context);
     
    289297                              // Read
    290298                              _cout(ENVIRONMENT," * Read  (%d bytes)\n",size);
    291                               bus_error |= !component_data->read(address,size,read_dram[0]); // always read a complete word
     299                              bus_error |= !component_data->read(address,nb_bytes,read_dram[0]); // always read a complete word
    292300
    293301                              _cout(ENVIRONMENT," * Rdata : ");
    294                               for (uint32_t i=0; i<size; i++)
     302                              for (uint32_t i=0; i<nb_bytes; i++)
    295303                                _cout(ENVIRONMENT,"%.2x",0xff&static_cast<uint32_t>(read_dram[0][i]));
    296304                              _cout(ENVIRONMENT,".\n");
Note: See TracChangeset for help on using the changeset viewer.