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
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1024
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1024
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(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       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer (name.c_str(),
     25  Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
     28     _parameters_statistics,
    5629#endif
    57                                              _param);
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
     
    8458  ALLOC1_SC_SIGNAL( in_DECOD_LAST_TAKE       ," in_DECOD_LAST_TAKE       ",Tcontrol_t         ,_param->_nb_inst_decod);
    8559  ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t         ,_param->_nb_inst_decod);
     60  ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE     ," in_DECOD_IS_ACCURATE     ",Tcontrol_t         ,_param->_nb_inst_decod);
    8661  ALLOC1_SC_SIGNAL( in_UPDATE_VAL            ," in_UPDATE_VAL            ",Tcontrol_t         ,_param->_nb_inst_update);
    8762  ALLOC1_SC_SIGNAL(out_UPDATE_ACK            ,"out_UPDATE_ACK            ",Tcontrol_t         ,_param->_nb_inst_update);
     
    12297  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_LAST_TAKE       ,_param->_nb_inst_decod);
    12398  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod);
     99  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_IS_ACCURATE     ,_param->_nb_inst_decod);
    124100  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_UPDATE_VAL            ,_param->_nb_inst_update);
    125101  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer,out_UPDATE_ACK            ,_param->_nb_inst_update);
     
    195171  delete []  in_DECOD_LAST_TAKE       ;
    196172  delete []  in_DECOD_MISS_PREDICTION ;
     173  delete []  in_DECOD_IS_ACCURATE     ;
    197174 
    198175  delete []  in_UPDATE_VAL            ;
Note: See TracChangeset for help on using the changeset viewer.