Ignore:
Timestamp:
May 1, 2008, 6:48:45 PM (16 years ago)
Author:
rosiere
Message:
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  128
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    11 
    12 #define NB_ITERATION  128
    13 #define CYCLE_MAX     (128*NB_ITERATION)
    14 
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18 } while(0)
    19 
    20 static uint32_t cycle = 0;
    21 
    22 #define SC_START(cycle_offset)                                          \
    23 do                                                                      \
    24 {                                                                       \
    25 /*cout << "SC_START (begin)" << endl;*/                                 \
    26                                                                         \
    27   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    28   if (cycle_current != cycle)                                           \
    29     {                                                                   \
    30       cycle = cycle_current;                                            \
    31       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    32     }                                                                   \
    33                                                                         \
    34   if (cycle_current > CYCLE_MAX)                                        \
    35     {                                                                   \
    36       TEST_KO("Maximal cycles Reached");                                \
    37     }                                                                   \
    38   sc_start(cycle_offset);                                               \
    39 /*cout << "SC_START (end  )" << endl;*/                                 \
    40 } while(0)
    4114
    4215void test (string name,
     
    4922#endif
    5023
    51   Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue (name.c_str(),
     24  Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue
     25    (name.c_str(),
    5226#ifdef STATISTICS
    53                                              _parameters_statistics,
     27     _parameters_statistics,
    5428#endif
    55                                              _param);
     29     _param,
     30     USE_ALL);
    5631 
    5732#ifdef SYSTEMC
     
    575550  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    576551    {
    577       LABEL("Iteration "+toString(iteration));
     552      LABEL("Iteration %d",iteration);
    578553
    579554      if (test_read == true)
     
    584559              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    585560             
    586               LABEL("GPR_READ  ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
     561              LABEL("GPR_READ  [%d] : %d - %d",j,val,context);
    587562             
    588563              in_GPR_READ_VAL           [j] ->write(val);
     
    623598              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    624599             
    625               LABEL("SPR_READ  ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
     600              LABEL("SPR_READ  [%d] : %d - %d",j,val,context);
    626601             
    627602              in_SPR_READ_VAL           [j] ->write(val);
     
    666641              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    667642             
    668               LABEL("GPR_WRITE ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
    669              
     643              LABEL("GPR_WRITE [%d] : %d - %d",j,val,context);
     644
    670645              in_GPR_WRITE_VAL           [j] ->write(val);
    671646              in_GPR_WRITE_OOO_ENGINE_ID [j] ->write(context);
     
    701676              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    702677             
    703               LABEL("SPR_WRITE ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
     678              LABEL("SPR_WRITE [%d] : %d - %d",j,val,context);
    704679             
    705680              in_SPR_WRITE_VAL           [j] ->write(val);
Note: See TracChangeset for help on using the changeset viewer.