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/SelfTest
Files:
3 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg

    r81 r82  
    11Prediction_unit
     21       1       +1 # nb_context                 
     31       1       +1 # nb_decod_unit             
     430      30      +1 # size_address               
     51       4       *4 # nb_instruction             [0] [nb_context]
     61       1       +1 # nb_inst_decod              [0] [nb_decod_unit]
     71       1       +1 # nb_inst_branch_predict     
     81       1       +1 # nb_inst_branch_decod       
     91       1       +1 # nb_inst_branch_update     
     101       1       +1 # nb_inst_branch_complete   
     112       8       *4 # btb_size_queue             
     122       2       +1 # btb_associativity         
     132       2       +1 # btb_size_counter           
     143       3       +1 # btb_victim_scheme         
     151       1       +1 # dir_predictor_scheme       
     161       1       +1 # dir_have_bht               [0] [3]
     171       1       +1 # dir_have_bht               [1] [3]
     181       1       +1 # dir_have_bht               [2] [3]
     191       1       +1 # dir_bht_size_shifter       [0] [3]
     201       1       +1 # dir_bht_size_shifter       [1] [3]
     211       1       +1 # dir_bht_size_shifter       [2] [3]
     221       1       +1 # dir_bht_nb_shifter         [0] [3]
     231       1       +1 # dir_bht_nb_shifter         [1] [3]
     241       1       +1 # dir_bht_nb_shifter         [2] [3]
     251       1       +1 # dir_have_pht               [0] [3]
     261       1       +1 # dir_have_pht               [1] [3]
     271       1       +1 # dir_have_pht               [2] [3]
     281       1       +1 # dir_pht_size_counter       [0] [3]
     291       1       +1 # dir_pht_size_counter       [1] [3]
     301       1       +1 # dir_pht_size_counter       [2] [3]
     311       1       +1 # dir_pht_nb_counter         [0] [3]
     321       1       +1 # dir_pht_nb_counter         [1] [3]
     331       1       +1 # dir_pht_nb_counter         [2] [3]
     341       1       +1 # dir_pht_size_address_share [0] [3]
     351       1       +1 # dir_pht_size_address_share [1] [3]
     361       1       +1 # dir_pht_size_address_share [2] [3]
     372       4       *2 # ras_size_queue             [0] [nb_context]
     381       4       *4 # upt_size_queue             [0] [nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp

    r81 r82  
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 0
     10#define NB_PARAMS (12+3*7)
    1111
    1212void usage (int argc, char * argv[])
     
    1414  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1515  err (_("list_params is :\n"));
    16   err (_(" * ()\n"));
     16  err (_(" * nb_context                                (uint32_t    )\n"));
     17  err (_(" * nb_decod_unit                             (uint32_t    )\n"));
     18  err (_(" * size_address                              (uint32_t    )\n"));
     19  err (_(" * nb_instruction             [nb_context]   (uint32_t    )\n"));
     20  err (_(" * nb_inst_decod              [nb_decod_unit](uint32_t    )\n"));
     21  err (_(" * nb_inst_branch_predict                    (uint32_t    )\n"));
     22  err (_(" * nb_inst_branch_decod                      (uint32_t    )\n"));
     23  err (_(" * nb_inst_branch_update                     (uint32_t    )\n"));
     24  err (_(" * nb_inst_branch_complete                   (uint32_t    )\n"));
     25  err (_(" * btb_size_queue                            (uint32_t    )\n"));
     26  err (_(" * btb_associativity                         (uint32_t    )\n"));
     27  err (_(" * btb_size_counter                          (uint32_t    )\n"));
     28  err (_(" * btb_victim_scheme                         (Tvictim_t   )\n"));
     29  err (_(" * dir_predictor_scheme                      (Tpredictor_t)\n"));
     30  err (_(" * dir_have_bht               [3]            (bool        )\n"));
     31  err (_(" * dir_bht_size_shifter       [3]            (uint32_t    )\n"));
     32  err (_(" * dir_bht_nb_shifter         [3]            (uint32_t    )\n"));
     33  err (_(" * dir_have_pht               [3]            (bool        )\n"));
     34  err (_(" * dir_pht_size_counter       [3]            (uint32_t    )\n"));
     35  err (_(" * dir_pht_nb_counter         [3]            (uint32_t    )\n"));
     36  err (_(" * dir_pht_size_address_share [3]            (uint32_t    )\n"));
     37  err (_(" * ras_size_queue             [nb_context]   (uint32_t    )\n"));
     38  err (_(" * upt_size_queue             [nb_context]   (uint32_t    )\n"));
    1739
    1840  exit (1);
     
    2547#endif
    2648{
    27   if (argc != static_cast<int>(2+NB_PARAMS))
     49  if (argc < static_cast<int>(2+NB_PARAMS))
    2850    usage (argc, argv);
    2951
     
    3153
    3254  string name = argv[x++];
    33 //const uint32_t size_data = atoi(argv[x++]);
    34 //const uint32_t nb_port   = atoi(argv[x++]);
     55  uint32_t     _nb_context                     = fromString<uint32_t>(argv[x++]);
     56  uint32_t     _nb_decod_unit                  = fromString<uint32_t>(argv[x++]);
     57  uint32_t     _size_address                   = fromString<uint32_t>(argv[x++]);
     58
     59  if (argc != static_cast<int>(2+NB_PARAMS+3*_nb_context+_nb_decod_unit))
     60    usage (argc, argv);
     61
     62  uint32_t *   _nb_instruction                 = new uint32_t [_nb_context];
     63  for (uint32_t i=0; i<_nb_context; i++)
     64    _nb_instruction [i]                        = fromString<uint32_t    >(argv[x++]);
     65  uint32_t *   _nb_inst_decod                  = new uint32_t [_nb_decod_unit];
     66  for (uint32_t i=0; i<_nb_decod_unit; i++)
     67    _nb_inst_decod [i]                         = fromString<uint32_t    >(argv[x++]);
     68  uint32_t     _nb_inst_branch_predict         = fromString<uint32_t    >(argv[x++]);
     69  uint32_t     _nb_inst_branch_decod           = fromString<uint32_t    >(argv[x++]);
     70  uint32_t     _nb_inst_branch_update          = fromString<uint32_t    >(argv[x++]);
     71  uint32_t     _nb_inst_branch_complete        = fromString<uint32_t    >(argv[x++]);
     72  uint32_t     _btb_size_queue                 = fromString<uint32_t    >(argv[x++]);
     73  uint32_t     _btb_associativity              = fromString<uint32_t    >(argv[x++]);
     74  uint32_t     _btb_size_counter               = fromString<uint32_t    >(argv[x++]);
     75  Tvictim_t    _btb_victim_scheme              = fromString<Tvictim_t   >(argv[x++]);
     76  Tpredictor_t _dir_predictor_scheme           = fromString<Tpredictor_t>(argv[x++]);
     77  bool         _dir_have_bht               [3];
     78  for (uint32_t i=0; i<3; i++)
     79    _dir_have_bht [i]                          = fromString<bool        >(argv[x++]);
     80  uint32_t     _dir_bht_size_shifter       [3];
     81  for (uint32_t i=0; i<3; i++)
     82    _dir_bht_size_shifter [i]                  = fromString<uint32_t    >(argv[x++]);
     83  uint32_t     _dir_bht_nb_shifter         [3];
     84  for (uint32_t i=0; i<3; i++)
     85    _dir_bht_nb_shifter [i]                    = fromString<uint32_t    >(argv[x++]);
     86  bool         _dir_have_pht               [3];
     87  for (uint32_t i=0; i<3; i++)
     88    _dir_have_pht [i]                          = fromString<bool        >(argv[x++]);
     89  uint32_t     _dir_pht_size_counter       [3];
     90  for (uint32_t i=0; i<3; i++)
     91    _dir_pht_size_counter [i]                  = fromString<uint32_t    >(argv[x++]);
     92  uint32_t     _dir_pht_nb_counter         [3];
     93  for (uint32_t i=0; i<3; i++)
     94    _dir_pht_nb_counter [i]                    = fromString<uint32_t    >(argv[x++]);
     95  uint32_t     _dir_pht_size_address_share [3];
     96  for (uint32_t i=0; i<3; i++)
     97    _dir_pht_size_address_share [i]            = fromString<uint32_t    >(argv[x++]);
     98  uint32_t *   _ras_size_queue                 = new uint32_t    [_nb_context];
     99  for (uint32_t i=0; i<_nb_context; i++)
     100    _ras_size_queue [i]                        = fromString<uint32_t    >(argv[x++]);
     101  uint32_t *   _upt_size_queue                 = new uint32_t    [_nb_context];
     102  for (uint32_t i=0; i<_nb_context; i++)
     103    _upt_size_queue [i]                        = fromString<uint32_t    >(argv[x++]);
    35104
    36105  int _return = EXIT_SUCCESS;
     
    38107    {
    39108      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters
    40         (//size_data,
    41          //nb_port 
    42         );
     109        (_nb_context                ,
     110         _nb_decod_unit             ,
     111         _size_address              ,
     112         _nb_instruction            ,
     113         _nb_inst_decod             ,
     114         _nb_inst_branch_predict    ,
     115         _nb_inst_branch_decod      ,
     116         _nb_inst_branch_update     ,
     117         _nb_inst_branch_complete   ,
     118         _btb_size_queue            ,
     119         _btb_associativity         ,
     120         _btb_size_counter          ,
     121         _btb_victim_scheme         ,
     122         _dir_predictor_scheme      ,
     123         _dir_have_bht              ,
     124         _dir_bht_size_shifter      ,
     125         _dir_bht_nb_shifter        ,
     126         _dir_have_pht              ,
     127         _dir_pht_size_counter      ,
     128         _dir_pht_nb_counter        ,
     129         _dir_pht_size_address_share,
     130         _ras_size_queue            ,
     131         _upt_size_queue           
     132         );
    43133     
    44134      msg(_("%s"),param->print(1).c_str());
     
    57147    }
    58148
     149  delete [] _nb_instruction            ;
     150  delete [] _nb_inst_decod             ;
     151  delete [] _ras_size_queue            ;
     152  delete [] _upt_size_queue            ;
     153
    59154  return (_return);
    60155}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp

    r81 r82  
    2323#endif
    2424
    25   Prediction_unit * _Prediction_unit = new Prediction_unit (name.c_str(),
     25  Prediction_unit * _Prediction_unit = new Prediction_unit
     26    (name.c_str(),
    2627#ifdef STATISTICS
    27                                              _parameters_statistics,
    28 #endif
    29                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    3032 
    3133#ifdef SYSTEMC
     
    3739  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    3840  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     41
     42
     43  ALLOC1_SC_SIGNAL( in_PREDICT_VAL                        ," in_PREDICT_VAL                        ",Tcontrol_t         ,_param->_nb_context);
     44  ALLOC1_SC_SIGNAL(out_PREDICT_ACK                        ,"out_PREDICT_ACK                        ",Tcontrol_t         ,_param->_nb_context);
     45  ALLOC1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS                ," in_PREDICT_PC_PREVIOUS                ",Taddress_t         ,_param->_nb_context);
     46  ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT                 ," in_PREDICT_PC_CURRENT                 ",Taddress_t         ,_param->_nb_context);
     47  ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ," in_PREDICT_PC_CURRENT_IS_DS_TAKE      ",Tcontrol_t         ,_param->_nb_context);
     48  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT                    ,"out_PREDICT_PC_NEXT                    ",Taddress_t         ,_param->_nb_context);
     49  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,"out_PREDICT_PC_NEXT_IS_DS_TAKE         ",Tcontrol_t         ,_param->_nb_context);
     50  ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,"out_PREDICT_INSTRUCTION_ENABLE         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     51  ALLOC1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,"out_PREDICT_INST_IFETCH_PTR            ",Tinst_ifetch_ptr_t ,_param->_nb_context);
     52  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE               ,"out_PREDICT_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_context);
     53  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_context);
     54                                                                                                                         
     55  ALLOC2_SC_SIGNAL( in_DECOD_VAL                          ," in_DECOD_VAL                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     56  ALLOC2_SC_SIGNAL(out_DECOD_ACK                          ,"out_DECOD_ACK                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     57  ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID                   ," in_DECOD_CONTEXT_ID                   ",Tcontext_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     58  ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR        ," in_DECOD_MATCH_INST_IFETCH_PTR        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     59  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE                 ," in_DECOD_BRANCH_STATE                 ",Tbranch_state_t    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     60  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ," in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ",Tprediction_ptr_t  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     61  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION             ," in_DECOD_BRANCH_CONDITION             ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     62  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION             ," in_DECOD_BRANCH_DIRECTION             ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     63  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                  ," in_DECOD_ADDRESS_SRC                  ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     64  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST                 ," in_DECOD_ADDRESS_DEST                 ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     65                                                                                                                         
     66  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL                ," in_BRANCH_COMPLETE_VAL                ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     67  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK                ,"out_BRANCH_COMPLETE_ACK                ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     68  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID         ," in_BRANCH_COMPLETE_CONTEXT_ID         ",Tcontext_t         ,_param->_nb_inst_branch_complete);
     69  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH              ," in_BRANCH_COMPLETE_DEPTH              ",Tdepth_t           ,_param->_nb_inst_branch_complete);
     70  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS            ," in_BRANCH_COMPLETE_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_complete);
     71  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG               ," in_BRANCH_COMPLETE_FLAG               ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     72  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION    ,"out_BRANCH_COMPLETE_MISS_PREDICTION    ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     73  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE               ,"out_BRANCH_COMPLETE_TAKE               ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     74  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC        ,"out_BRANCH_COMPLETE_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_complete);
     75  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST       ,"out_BRANCH_COMPLETE_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_complete);
     76                                                                                                                         
     77  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL                   ,"out_BRANCH_EVENT_VAL                   ",Tcontrol_t         ,_param->_nb_context);
     78  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK                   ," in_BRANCH_EVENT_ACK                   ",Tcontrol_t         ,_param->_nb_context);
     79//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID            ,"out_BRANCH_EVENT_CONTEXT_ID            ",Tcontext_t         ,_param->_nb_context);
     80//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH                 ,"out_BRANCH_EVENT_DEPTH                 ",Tdepth_t           ,_param->_nb_context);
     81//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION       ,"out_BRANCH_EVENT_MISS_PREDICTION       ",Tcontrol_t         ,_param->_nb_context);
     82  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC           ,"out_BRANCH_EVENT_ADDRESS_SRC           ",Taddress_t         ,_param->_nb_context);
     83  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST          ,"out_BRANCH_EVENT_ADDRESS_DEST          ",Taddress_t         ,_param->_nb_context);
     84                                                                                                                         
     85  ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH                    ,"out_DEPTH_NB_BRANCH                    ",Tdepth_t           ,_param->_nb_context);
     86  ALLOC1_SC_SIGNAL(out_DEPTH_TAIL                         ,"out_DEPTH_TAIL                         ",Tdepth_t           ,_param->_nb_context);
    3987 
    4088  /********************************************************
     
    4795  (*(_Prediction_unit->in_NRESET))       (*(in_NRESET));
    4896
     97  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_VAL                        ,_param->_nb_context);
     98  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_ACK                        ,_param->_nb_context);
     99  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_PREVIOUS                ,_param->_nb_context);
     100  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT                 ,_param->_nb_context);
     101  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context);
     102  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT                    ,_param->_nb_context);
     103  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context);
     104  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     105  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_STATE               ,_param->_nb_context);
     106
     107  for (uint32_t i=0; i<_param->_nb_context; i++)
     108    {
     109      if (_param->_have_port_inst_ifetch_ptr [i])
     110        INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_INST_IFETCH_PTR [i]);
     111      if (_param->_have_port_depth [i])
     112        INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]);
     113    }
     114
     115  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_VAL                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     116  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_DECOD_ACK                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     117  if (_param->_have_port_context_id)
     118  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_CONTEXT_ID                   ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     119  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_MATCH_INST_IFETCH_PTR        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     120  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_STATE                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     121  if (_param->_have_port_max_depth)
     122  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     123  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_CONDITION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     124  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_DIRECTION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     125  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_SRC                  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     126  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_DEST                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     127
     128  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_VAL                ,_param->_nb_inst_branch_complete);
     129  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ACK                ,_param->_nb_inst_branch_complete);
     130  if (_param->_have_port_context_id)
     131  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_CONTEXT_ID         ,_param->_nb_inst_branch_complete);
     132  if (_param->_have_port_max_depth)
     133  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_DEPTH              ,_param->_nb_inst_branch_complete);
     134  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ADDRESS            ,_param->_nb_inst_branch_complete);
     135  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_FLAG               ,_param->_nb_inst_branch_complete);
     136  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION    ,_param->_nb_inst_branch_complete);
     137  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE               ,_param->_nb_inst_branch_complete);
     138  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC        ,_param->_nb_inst_branch_complete);
     139  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST       ,_param->_nb_inst_branch_complete);
     140
     141  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_VAL                   ,_param->_nb_context);
     142  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_EVENT_ACK                   ,_param->_nb_context);
     143//if (_param->_have_port_context_id)
     144//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_CONTEXT_ID            ,_param->_nb_context);
     145//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_DEPTH                 ,_param->_nb_context);
     146//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_MISS_PREDICTION       ,_param->_nb_context);
     147  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_SRC           ,_param->_nb_context);
     148  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_DEST          ,_param->_nb_context);
     149
     150  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_NB_BRANCH                    ,_param->_nb_context);
     151  for (uint32_t i=0; i<_param->_nb_context; i++)
     152    if (_param->_have_port_depth[i])
     153      INSTANCE_SC_SIGNAL(_Prediction_unit,out_DEPTH_TAIL [i]);
    49154
    50155  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    91196  delete in_CLOCK;
    92197  delete in_NRESET;
     198
     199  DELETE1_SC_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context);
     200  DELETE1_SC_SIGNAL(out_PREDICT_ACK                        ,_param->_nb_context);
     201  DELETE1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context);
     202  DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context);
     203  DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context);
     204  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context);
     205  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context);
     206  DELETE1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context);
     207  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_context);
     208  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context);
     209
     210  DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE       ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     211  DELETE2_SC_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     212  DELETE2_SC_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     213  DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     214  DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     215  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     216  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     217  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     218  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     219  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     220  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     221
     222  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete);
     223  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete);
     224  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete);
     225  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
     226  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete);
     227  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG           ,_param->_nb_inst_branch_complete);
     228  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete);
     229  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE           ,_param->_nb_inst_branch_complete);
     230  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete);
     231  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete);
     232
     233  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_VAL            ,_param->_nb_context);
     234  DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ACK            ,_param->_nb_context);
     235//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
     236//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
     237//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context);
     238  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context);
     239  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context);
     240
     241  DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context);
     242  DELETE1_SC_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context);
    93243#endif
    94244
Note: See TracChangeset for help on using the changeset viewer.