Ignore:
Timestamp:
Mar 18, 2009, 11:36:26 PM (15 years ago)
Author:
rosiere
Message:

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src
Files:
2 edited

Legend:

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

    r88 r112  
    4949                                                         ,IN
    5050                                                         ,SOUTH,
    51                                                          "Generalist interface"
     51                                                         _("Generalist interface")
    5252#endif
    5353                                                         );
     
    5959    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6060    {
    61       ALLOC1_INTERFACE("predict", IN, SOUTH, "Compute next pc.", _param->_nb_inst_predict);
     61      ALLOC1_INTERFACE_BEGIN("predict", IN, SOUTH, _("Compute next pc."), _param->_nb_inst_predict);
    6262
    6363      ALLOC1_VALACK_IN ( in_PREDICT_VAL         ,VAL);
     
    6666      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS     ,"address"     ,Tgeneral_data_t    ,_param->_size_instruction_address);
    6767
    68       {
    69         ALLOC2_INTERFACE("predict", OUT, SOUTH, "Compute next pc.", _param->_nb_inst_predict, _param->_associativity);
    70  
    71         ALLOC2_SIGNAL_OUT(out_PREDICT_HIT         ,"hit"         ,Tcontrol_t         ,1);
    72         ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t    ,_param->_size_instruction_address);
    73         ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST,"address_dest",Tgeneral_data_t    ,_param->_size_instruction_address);
    74         ALLOC2_SIGNAL_OUT(out_PREDICT_CONDITION   ,"condition"   ,Tbranch_condition_t,_param->_size_branch_state);
    75         ALLOC2_SIGNAL_OUT(out_PREDICT_LAST_TAKE   ,"last_take"   ,Tcontrol_t         ,1);
    76         ALLOC2_SIGNAL_OUT(out_PREDICT_IS_ACCURATE ,"is_accurate" ,Tcontrol_t         ,1);
    77       }
     68      ALLOC1_INTERFACE_END(_param->_nb_inst_predict);
     69    }
     70    {
     71      ALLOC2_INTERFACE_BEGIN("predict", OUT, SOUTH, _("Compute next pc."), _param->_nb_inst_predict, _param->_associativity);
     72     
     73      ALLOC2_SIGNAL_OUT(out_PREDICT_HIT         ,"hit"         ,Tcontrol_t         ,1);
     74      ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t    ,_param->_size_instruction_address);
     75      ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST,"address_dest",Tgeneral_data_t    ,_param->_size_instruction_address);
     76      ALLOC2_SIGNAL_OUT(out_PREDICT_CONDITION   ,"condition"   ,Tbranch_condition_t,_param->_size_branch_state);
     77      ALLOC2_SIGNAL_OUT(out_PREDICT_LAST_TAKE   ,"last_take"   ,Tcontrol_t         ,1);
     78      ALLOC2_SIGNAL_OUT(out_PREDICT_IS_ACCURATE ,"is_accurate" ,Tcontrol_t         ,1);
     79
     80      ALLOC2_INTERFACE_END(_param->_nb_inst_predict, _param->_associativity);
    7881    }
    7982
    8083    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8184    {
    82       ALLOC1_INTERFACE("decod", IN, SOUTH, "decod instruction", _param->_nb_inst_decod);
     85      ALLOC1_INTERFACE_BEGIN("decod", IN, SOUTH, _("decod instruction"), _param->_nb_inst_decod);
    8386
    8487      ALLOC1_VALACK_IN ( in_DECOD_VAL            ,VAL);
     
    97100      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
    98101      ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
     102
     103      ALLOC1_INTERFACE_END(_param->_nb_inst_decod);
    99104    }
    100105
    101106    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    102107    {
    103       ALLOC1_INTERFACE("update", IN, SOUTH, "update instruction", _param->_nb_inst_update);
     108      ALLOC1_INTERFACE_BEGIN("update", IN, SOUTH, _("update instruction"), _param->_nb_inst_update);
    104109
    105110      ALLOC1_VALACK_IN ( in_UPDATE_VAL            ,VAL);
     
    117122      ALLOC1_SIGNAL_IN ( in_UPDATE_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
    118123      ALLOC1_SIGNAL_IN ( in_UPDATE_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
     124
     125      ALLOC1_INTERFACE_END(_param->_nb_inst_update);
    119126    }
    120127
     
    122129      {
    123130    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    124     reg_BTB = new btb_entry_t * [_param->_size_bank];
    125     for (uint32_t i=0; i<_param->_size_bank; i++)
    126       reg_BTB [i] = new btb_entry_t [_param->_associativity];
     131        ALLOC2(reg_BTB,btb_entry_t,_param->_size_bank,_param->_associativity);
    127132
    128     internal_DECOD_ACK        = new Tcontrol_t [_param->_nb_inst_decod];
    129     internal_DECOD_HIT        = new Tcontrol_t [_param->_nb_inst_decod];
    130     internal_DECOD_NUM_BANK   = new uint32_t   [_param->_nb_inst_decod];
    131     internal_DECOD_NUM_ENTRY  = new uint32_t   [_param->_nb_inst_decod];
     133        ALLOC1(internal_DECOD_ACK       ,Tcontrol_t,_param->_nb_inst_decod );
     134        ALLOC1(internal_DECOD_HIT       ,Tcontrol_t,_param->_nb_inst_decod );
     135        ALLOC1(internal_DECOD_NUM_BANK  ,uint32_t  ,_param->_nb_inst_decod );
     136        ALLOC1(internal_DECOD_NUM_ENTRY ,uint32_t  ,_param->_nb_inst_decod );
    132137
    133     internal_UPDATE_ACK       = new Tcontrol_t [_param->_nb_inst_update];
    134     internal_UPDATE_HIT       = new Tcontrol_t [_param->_nb_inst_update];
    135     internal_UPDATE_NUM_BANK  = new uint32_t   [_param->_nb_inst_update];
    136     internal_UPDATE_NUM_ENTRY = new uint32_t   [_param->_nb_inst_update];
     138        ALLOC1(internal_UPDATE_ACK      ,Tcontrol_t,_param->_nb_inst_update);
     139        ALLOC1(internal_UPDATE_HIT      ,Tcontrol_t,_param->_nb_inst_update);
     140        ALLOC1(internal_UPDATE_NUM_BANK ,uint32_t  ,_param->_nb_inst_update);
     141        ALLOC1(internal_UPDATE_NUM_ENTRY,uint32_t  ,_param->_nb_inst_update);
    137142      }
    138143
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_deallocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2930        delete    in_NRESET;
    3031
    31         delete []  in_PREDICT_VAL           ;
    32         delete [] out_PREDICT_ACK           ;
    33         if (_param->_have_port_context_id)
    34         delete []  in_PREDICT_CONTEXT_ID    ;
    35         delete []  in_PREDICT_ADDRESS       ;
    36         delete [] out_PREDICT_HIT           ;
    37         delete [] out_PREDICT_ADDRESS_SRC   ;
    38         delete [] out_PREDICT_ADDRESS_DEST  ;
    39         delete [] out_PREDICT_CONDITION     ;
    40         delete [] out_PREDICT_LAST_TAKE     ;
    41         delete [] out_PREDICT_IS_ACCURATE   ;
    42         delete []  in_DECOD_VAL             ;
    43         delete [] out_DECOD_ACK             ;
    44         if (_param->_have_port_victim)
    45           {
    46         delete [] out_DECOD_HIT             ;
    47         delete [] out_DECOD_HIT_INDEX       ;
    48         delete []  in_DECOD_VICTIM          ;
    49           }
    50         if (_param->_have_port_context_id)
    51         delete []  in_DECOD_CONTEXT_ID      ;
    52         delete []  in_DECOD_ADDRESS_SRC     ;
    53         delete []  in_DECOD_ADDRESS_DEST    ;
    54         delete []  in_DECOD_CONDITION       ;
    55         delete []  in_DECOD_LAST_TAKE       ;
    56         delete []  in_DECOD_MISS_PREDICTION ;
    57         delete []  in_DECOD_IS_ACCURATE     ;
    58         delete []  in_UPDATE_VAL            ;
    59         delete [] out_UPDATE_ACK            ;
    60         if (_param->_have_port_victim)
    61           {
    62         delete [] out_UPDATE_HIT            ;
    63         delete [] out_UPDATE_HIT_INDEX      ;
    64         delete []  in_UPDATE_VICTIM         ;
    65           }
    66         if (_param->_have_port_context_id)
    67         delete []  in_UPDATE_CONTEXT_ID     ;
    68         delete []  in_UPDATE_ADDRESS_SRC    ;
    69         delete []  in_UPDATE_ADDRESS_DEST   ;
    70         delete []  in_UPDATE_CONDITION      ;
    71         delete []  in_UPDATE_LAST_TAKE      ;
    72         delete []  in_UPDATE_MISS_PREDICTION;
     32        DELETE1_SIGNAL( in_PREDICT_VAL         ,_param->_nb_inst_predict,1);
     33        DELETE1_SIGNAL(out_PREDICT_ACK         ,_param->_nb_inst_predict,1);
     34        DELETE1_SIGNAL( in_PREDICT_CONTEXT_ID  ,_param->_nb_inst_predict,_param->_size_context_id);
     35        DELETE1_SIGNAL( in_PREDICT_ADDRESS     ,_param->_nb_inst_predict,_param->_size_instruction_address);
     36        DELETE2_SIGNAL(out_PREDICT_HIT         , _param->_nb_inst_predict, _param->_associativity,1);
     37        DELETE2_SIGNAL(out_PREDICT_ADDRESS_SRC , _param->_nb_inst_predict, _param->_associativity,_param->_size_instruction_address);
     38        DELETE2_SIGNAL(out_PREDICT_ADDRESS_DEST, _param->_nb_inst_predict, _param->_associativity,_param->_size_instruction_address);
     39        DELETE2_SIGNAL(out_PREDICT_CONDITION   , _param->_nb_inst_predict, _param->_associativity,_param->_size_branch_state);
     40        DELETE2_SIGNAL(out_PREDICT_LAST_TAKE   , _param->_nb_inst_predict, _param->_associativity,1);
     41        DELETE2_SIGNAL(out_PREDICT_IS_ACCURATE , _param->_nb_inst_predict, _param->_associativity,1);
     42 
     43        DELETE1_SIGNAL( in_DECOD_VAL            , _param->_nb_inst_decod,1);
     44        DELETE1_SIGNAL(out_DECOD_ACK            , _param->_nb_inst_decod,1);
     45        if (_param->_have_port_victim)
     46        {
     47        DELETE1_SIGNAL(out_DECOD_HIT            , _param->_nb_inst_decod,1);
     48        DELETE1_SIGNAL(out_DECOD_HIT_INDEX      , _param->_nb_inst_decod,_param->_size_victim);
     49        DELETE1_SIGNAL( in_DECOD_VICTIM         , _param->_nb_inst_decod,_param->_size_victim);
     50        }
     51        DELETE1_SIGNAL( in_DECOD_CONTEXT_ID     , _param->_nb_inst_decod,_param->_size_context_id);
     52        DELETE1_SIGNAL( in_DECOD_ADDRESS_SRC    , _param->_nb_inst_decod,_param->_size_instruction_address);
     53        DELETE1_SIGNAL( in_DECOD_ADDRESS_DEST   , _param->_nb_inst_decod,_param->_size_instruction_address);
     54        DELETE1_SIGNAL( in_DECOD_CONDITION      , _param->_nb_inst_decod,_param->_size_branch_state);
     55        DELETE1_SIGNAL( in_DECOD_LAST_TAKE      , _param->_nb_inst_decod,1);
     56        DELETE1_SIGNAL( in_DECOD_MISS_PREDICTION, _param->_nb_inst_decod,1);
     57        DELETE1_SIGNAL( in_DECOD_IS_ACCURATE    , _param->_nb_inst_decod,1);
     58 
     59        DELETE1_SIGNAL( in_UPDATE_VAL            , _param->_nb_inst_update,1);
     60        DELETE1_SIGNAL(out_UPDATE_ACK            , _param->_nb_inst_update,1);
     61        if (_param->_have_port_victim)
     62        {
     63        DELETE1_SIGNAL(out_UPDATE_HIT            , _param->_nb_inst_update,1);
     64        DELETE1_SIGNAL(out_UPDATE_HIT_INDEX      , _param->_nb_inst_update,_param->_size_victim);
     65        DELETE1_SIGNAL( in_UPDATE_VICTIM         , _param->_nb_inst_update,_param->_size_victim);
     66        }
     67        DELETE1_SIGNAL( in_UPDATE_CONTEXT_ID     , _param->_nb_inst_update,_param->_size_context_id);
     68        DELETE1_SIGNAL( in_UPDATE_ADDRESS_SRC    , _param->_nb_inst_update,_param->_size_instruction_address);
     69        DELETE1_SIGNAL( in_UPDATE_ADDRESS_DEST   , _param->_nb_inst_update,_param->_size_instruction_address);
     70        DELETE1_SIGNAL( in_UPDATE_CONDITION      , _param->_nb_inst_update,_param->_size_branch_state);
     71        DELETE1_SIGNAL( in_UPDATE_LAST_TAKE      , _param->_nb_inst_update,1);
     72        DELETE1_SIGNAL( in_UPDATE_MISS_PREDICTION, _param->_nb_inst_update,1);
     73 
     74        DELETE2(reg_BTB                  ,_param->_size_bank,_param->_associativity);
    7375
    74         delete [] reg_BTB;
    75 
    76         delete [] internal_DECOD_ACK       ;
    77         delete [] internal_DECOD_HIT       ;
    78         delete [] internal_DECOD_NUM_BANK  ;
    79         delete [] internal_DECOD_NUM_ENTRY ;
    80 
    81         delete [] internal_UPDATE_ACK      ;
    82         delete [] internal_UPDATE_HIT      ;
    83         delete [] internal_UPDATE_NUM_BANK ;
    84         delete [] internal_UPDATE_NUM_ENTRY;
     76        DELETE1(internal_DECOD_ACK       ,_param->_nb_inst_decod );
     77        DELETE1(internal_DECOD_HIT       ,_param->_nb_inst_decod );
     78        DELETE1(internal_DECOD_NUM_BANK  ,_param->_nb_inst_decod );
     79        DELETE1(internal_DECOD_NUM_ENTRY ,_param->_nb_inst_decod );
     80        DELETE1(internal_UPDATE_ACK      ,_param->_nb_inst_update);
     81        DELETE1(internal_UPDATE_HIT      ,_param->_nb_inst_update);
     82        DELETE1(internal_UPDATE_NUM_BANK ,_param->_nb_inst_update);
     83        DELETE1(internal_UPDATE_NUM_ENTRY,_param->_nb_inst_update);
    8584      }
    8685
Note: See TracChangeset for help on using the changeset viewer.