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/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp

    r81 r82  
    66 * Test
    77 */
     8#define NB_ITERATION  2
     9#define CYCLE_MAX     (2048*NB_ITERATION)
    810
    911#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h"
    1012#include "Common/include/Test.h"
    1113#include "Common/include/BitManipulation.h"
    12 
    13 #define NB_ITERATION  2
    14 #define CYCLE_MAX     (2048*NB_ITERATION)
    15 
    16 #define LABEL(str)                                                                       \
    17 {                                                                                        \
    18   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    19 } while(0)
    20 
    21 static uint32_t cycle = 0;
    22 
    23 #define SC_START(cycle_offset)                                          \
    24 do                                                                      \
    25 {                                                                       \
    26 /*cout << "SC_START (begin)" << endl;*/                                 \
    27                                                                         \
    28   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    29   sc_start(cycle_offset);                                               \
    30   if (cycle_current != cycle)                                           \
    31     {                                                                   \
    32       cycle = cycle_current;                                            \
    33       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    34     }                                                                   \
    35                                                                         \
    36   if (cycle_current > CYCLE_MAX)                                        \
    37     {                                                                   \
    38       TEST_KO("Maximal cycles Reached");                                \
    39     }                                                                   \
    40 /*cout << "SC_START (end  )" << endl;*/                                 \
    41 } while(0)
    4214
    4315void test (string name,
     
    5022#endif
    5123
    52   Reservation_station * _Reservation_station = new Reservation_station (name.c_str(),
     24  Reservation_station * _Reservation_station = new Reservation_station
     25    (name.c_str(),
    5326#ifdef STATISTICS
    54                                              _parameters_statistics,
     27     _parameters_statistics,
    5528#endif
    56                                              _param);
     29     _param,
     30     USE_ALL);
    5731 
    5832#ifdef SYSTEMC
     
    354328  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    355329    {
    356       LABEL("Iteration "+toString(iteration));
     330      LABEL("Iteration %d",iteration);
    357331
    358332      int32_t percent_transaction_queue_in     = (rand()%50)+25;
     
    507481              if (val)
    508482                {
    509                   LABEL(" * GPR_WRITE     ["+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));
     483                  LABEL(" * GPR_WRITE     [%d] - gpr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
    510484                  can_gpr_use [ooo_engine][num_reg] = false;
    511485                  need_gpr [ooo_engine][num_reg]    = false;
     
    533507              if (val == 1)
    534508                {
    535                   LABEL(" * SPR_WRITE     ["+toString(i)+"] - spr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));
     509                  LABEL(" * SPR_WRITE     [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
     510
    536511                  can_spr_use [ooo_engine][num_reg] = false;
    537512                  need_spr[ooo_engine][num_reg]     = false;
     
    560535              if (gpr_val)
    561536                {
    562                   LABEL(" * BYPASS_WRITE  ["+toString(i)+"] - gpr["+toString(gpr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(gpr_data));
     537                  LABEL(" * BYPASS_WRITE  [%d] - gpr[%d][%d] <- 0x%x",i,gpr_num_reg,ooo_engine,gpr_data);
    563538                  can_gpr_use [ooo_engine][gpr_num_reg] = false;
    564539                  need_gpr[ooo_engine][gpr_num_reg]     = false;
     
    580555              if (spr_val)
    581556                {
    582                   LABEL(" * BYPASS_WRITE  ["+toString(i)+"] - spr["+toString(spr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(spr_data));
     557                  LABEL(" * BYPASS_WRITE  [%d] - spr[%d][%d] <- 0x%x",i,spr_num_reg,ooo_engine,spr_data);
     558
    583559                  can_spr_use [ooo_engine][spr_num_reg] = false;
    584560                  need_spr[ooo_engine][spr_num_reg]     = false;
     
    608584              if (val)
    609585                {
    610                   LABEL(" * BYPASS_MEMORY ["+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));
     586                  LABEL(" * BYPASS_MEMORY [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
     587
    611588                  can_gpr_use [ooo_engine][num_reg] = false;
    612589                  need_gpr [ooo_engine][num_reg] = false;
     
    622599              (out_INSERT_ACK->read() == 1))
    623600            {
    624               LABEL("Accepted INSERT  number : "+toString(request_in));
     601              LABEL("Accepted INSERT  number : %d",request_in);
    625602              request_in  ++;
    626603            }
     
    628605          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    629606            {
    630               LABEL("Test     RETIRE "+toString(i)+" : "+toString(out_RETIRE_VAL[i]->read())+","+toString(in_RETIRE_ACK[i]->read()));
     607              LABEL("Test     RETIRE %d : %d,%d",i,out_RETIRE_VAL[i]->read(),in_RETIRE_ACK[i]->read());
    631608              if ((out_RETIRE_VAL [i]->read() == 1) and
    632609                  ( in_RETIRE_ACK [i]->read() == 1))
     
    637614                  else
    638615                    rob_id = 0;
    639                   LABEL("Accepted RETIRE ["+toString(i)+"] number : "+toString(rob_id)+", request number : "+toString(request_out));
     616                  LABEL("Accepted RETIRE [%d] number : %d, request number : %d",i,rob_id,request_out);
    640617                  TEST(bool, request_out_wait [rob_id] , true);
    641618
Note: See TracChangeset for help on using the changeset viewer.