Ignore:
Timestamp:
Apr 17, 2009, 12:35:37 AM (15 years ago)
Author:
rosiere
Message:

1) Fix bug with previous commit
2) Add test libc
3) Change Dhrystone

Location:
trunk/IPs/systemC/Environment
Files:
6 edited

Legend:

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

    r81 r114  
    2020//      if (latence != 0)
    2121//        {
    22 //          std::cout << "<Cache_MultiLevel::update_access> after all update, latence must be null." << std::endl;
     22//          _cout(CACHE,"after all update, latence must be null.\n");
    2323//          exit(1);
    2424//        }
  • trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_access.cpp

    r101 r114  
    3030      case SYNCHRONIZATION : return access_synchronization (num_port,address,trdid    ); break;
    3131      case CACHED          : return access_cached          (num_port,address,trdid,dir); break;
    32       default              : std::cout << "<Cache_Onelevel.access> unknow type : " << std::endl; exit(1); break;
     32      default              : _cerr("<Cache_Onelevel.access> unknow type\n"); exit(1); break;
    3333      }
    3434  }
  • trunk/IPs/systemC/Environment/Common/include/Debug.h

    r88 r114  
    1111#define DEBUG_TTY         true
    1212
    13 // #ifdef DEBUG
    1413# define _cout(component, str...)                                       \
    1514  do                                                                    \
     
    2120    }                                                                   \
    2221  while(0)
    23 // #else
    24 // # define _cout(component, str...)                                   
    25 //   do                                                                 
    26 //     {                                                               
    27 //     }
    28 //    while(0)
    29 // #endif
     22
     23# define _cerr(str...)                                                   \
     24  do                                                                    \
     25    {                                                                   \
     26      fprintf(stderr,str);                                              \
     27    }                                                                   \
     28  while(0)
    3029
    3130#endif
  • trunk/IPs/systemC/Environment/Makefile

    r113 r114  
    4545all                             :
    4646                                @\
    47                                 $(MAKE) all_environment; \
    4847                                $(MAKE) --directory=$(DIR_CACHE)      all; \
    4948                                $(MAKE) --directory=$(DIR_DATA)       all; \
     
    5655
    5756
    58 $(LIBRARY_FILE)                 : $(Environment_OBJECTS_DEPS)
     57$(LIBRARY_FILE)                 : $(DIR_LIB) $(Environment_OBJECTS_DEPS)
    5958                                @\
    6059                                $(ECHO) "Archive            : $@";\
    61                                 $(ECHO) "Archive            : $@";\
    62                                 $(MKDIR) $(DIR_LIB);\
    6360                                $(AR)  -r $@ $(Environment_OBJECTS_DEPS);\
    6461                                $(RANLIB) $@;
  • trunk/IPs/systemC/Environment/Makefile.Environment

    r113 r114  
    2929                                $(CXX) $(MORPHEO_L_FLAGS)      -o $@ $^ $(LIBNAME);
    3030
    31 $(DIR_OBJ)                      :
     31$(DIR_OBJ) $(DIR_BIN)           :
    3232                                @\
    3333                                $(ECHO) "Create directory   : $@";\
    3434                                $(MKDIR) $@
    35 
    36 $(DIR_BIN)                      :
    37                                 @\
    38                                 $(ECHO) "Create directory   : $@";\
    39                                 $(MKDIR) $@
    40 
    4135
    4236exe                             : all $(DIR_BIN)
  • trunk/IPs/systemC/Environment/src/Environment_transition.cpp

    r101 r114  
    130130                    if (bus_error == true)
    131131                      {
    132                         std::cout << "Icache : have a bus error" << std::endl
    133                                   << "  * entity     : " << i << std::endl
    134                                   << "  * port       : " << j << std::endl
    135                                   << std::hex
    136                                   << "  * req_addr   : " << address << std::endl
    137                                   << std::dec
    138                                   << "  * req_trdid  : " << context << std::endl
    139                                   << "  * req_pktid  : " << packet  << std::endl;
     132                        _cout(ENVIRONMENT,"  * Icache : have a bus error\n");
     133                        _cout(ENVIRONMENT,"    * entity     : %d\n",i);
     134                        _cout(ENVIRONMENT,"    * port       : %d\n",j);
     135                        _cout(ENVIRONMENT,"    * req_addr   : %x\n",address);
     136                        _cout(ENVIRONMENT,"    * req_trdid  : %d\n",context);
     137                        _cout(ENVIRONMENT,"    * req_pktid  : %d\n",packet );
    140138
    141139                        // Write in instruction [0] the bad address (only 32bit ....)
     
    211209                data::Entity      entity    = component_data->entity(static_cast<uint32_t>(address),nb_bytes);
    212210
    213                 std::cout << entity << std::endl;
     211//              std::cout << entity << std::endl;
    214212               
    215213                // Test the type of the address
     
    377375                                if (must_write == false)
    378376                                  {
    379                                     std::cerr << "<Environment::transition> SIM2OS[0] is not accessible in Read" << std::endl;
     377                                    _cerr("<Environment::transition> SIM2OS[0] is not accessible in Read\n");
    380378                                    bus_error = true;
    381379                                  }
     
    391389                                if (must_read == false)
    392390                                  {
    393                                     std::cerr << "<Environment::transition> SIM2OS[1] is not accessible in Write" << std::endl;
     391                                    _cerr("<Environment::transition> SIM2OS[1] is not accessible in Write\n");
    394392                                    bus_error = true;
    395393                                  }
     
    408406                                if (must_read == false)
    409407                                  {
    410                                     std::cerr << "<Environment::transition> SIM2OS[2] is not accessible in Write" << std::endl;
     408                                    _cerr("<Environment::transition> SIM2OS[2] is not accessible in Write\n");
    411409                                    bus_error = true;
    412410                                  }
     
    426424                                  if (must_write == false)
    427425                                    {
    428                                       std::cerr << "<Environment::transition> SIM2OS[" << num_reg << "] is not accessible in Read" << std::endl;
     426                                      _cerr("<Environment::transition> SIM2OS[%d] is not accessible in Read\n",num_reg);
    429427                                      bus_error = true;
    430428                                    }
     
    443441                      default :
    444442                        {
    445                           std::cerr << "<Environment::transition> Dcache_req : Unknow type" << std::endl;
     443                          _cerr("<Environment::transition> Dcache_req : Unknow type\n");
    446444                          exit(1);
    447445                          break;
     
    482480                    if (bus_error == true)
    483481                      {
    484                         std::cout << "Dcache : have a bus error" << std::endl
    485                                   << "  * entity     : " << i << std::endl
    486                                   << "  * port       : " << j << std::endl
    487                                   << std::hex
    488                                   << "  * req_addr   : 0x" << address << std::endl
    489                                   << std::dec
    490                                   << "  * req_trdid  : " << context << std::endl
    491                                   << "  * req_pktid  : " << packet  << std::endl;
     482                        _cout(ENVIRONMENT,"  * Dcache : have a bus error\n");
     483                        _cout(ENVIRONMENT,"    * entity     : %d\n",i);
     484                        _cout(ENVIRONMENT,"    * port       : %d\n",j);
     485                        _cout(ENVIRONMENT,"    * req_addr   : 0x%x\n",address);
     486                        _cout(ENVIRONMENT,"    * req_trdid  : %d\n",context);
     487                        _cout(ENVIRONMENT,"    * req_pktid  : %d\n",packet );
    492488
    493489                        // Write in data [0] the bad address (32bit or 64bits    )
Note: See TracChangeset for help on using the changeset viewer.