Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (15 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters.cpp

    r87 r88  
    2525                          uint32_t            size_general_data            ,
    2626                          uint32_t          * nb_branch_speculated         ,
    27                           uint32_t            size_branch_update_prediction,
     27//                        uint32_t          * size_branch_update_prediction,
    2828                          uint32_t            nb_context_select            ,
    2929                          Tpriority_t         select_priority              ,
    3030                          Tload_balancing_t   select_load_balancing        ,
    3131                          bool             ** instruction_implemeted       ,
    32                           morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t))
     32                          morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     33                          bool                is_toplevel                         
     34                          )
    3335  {
    3436    log_begin(Decod_unit,FUNCTION);
     
    3840    _nb_inst_decod                 = nb_inst_decod                ;
    3941    _size_queue                    = size_queue                   ;
    40     _size_general_data             = size_general_data            ;
     42//  _size_general_data             = size_general_data            ;
    4143    _nb_branch_speculated          = nb_branch_speculated         ;
    42     _size_branch_update_prediction = size_branch_update_prediction;
     44//  _size_branch_update_prediction = size_branch_update_prediction;
    4345    _nb_context_select             = nb_context_select            ;
    4446    _select_priority               = select_priority              ;
     
    4850
    4951    _max_nb_inst_fetch                     = max<uint32_t>(_nb_inst_fetch,_nb_context);
     52//  _size_address_inst                     = size_general_data-2;
    5053
    51     _size_address_inst                     = size_general_data-2;
    52     _size_context_id                       = log2(nb_context          );
    53     _size_depth                            = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
    54     _size_inst_ifetch_ptr                  = log2(_max_nb_inst_fetch  );
    55 
    56     _have_port_context_id                  = (_size_context_id > 0);
    57     _have_port_depth                       = (_size_depth      > 0);
    58     _have_port_branch_update_prediction_id = (_size_branch_update_prediction > 0);
    59     _have_port_inst_ifetch_ptr             = (_size_inst_ifetch_ptr > 0);
    60    
    6154    test();
    6255
     
    6558       _nb_inst_fetch                ,
    6659       _nb_inst_decod                ,
    67        max<uint32_t>(_nb_branch_speculated,_nb_context),
    68        _size_branch_update_prediction,
     60       _nb_branch_speculated,
     61//     _size_branch_update_prediction,
    6962       _nb_context_select            ,
    70        _size_general_data            ,
     63        size_general_data            ,
    7164       _select_priority              ,
    7265       _select_load_balancing        ,
     
    7871       _nb_inst_decod       ,
    7972       _size_queue          ,
    80        _size_general_data   ,
     73        size_general_data   ,
    8174       _nb_branch_speculated);
    8275
    83     _size_nb_inst_decod = _param_decod_queue->_size_nb_inst;
    84    
     76    if (is_toplevel)
     77      {
     78        _size_context_id                       = log2(_nb_context);
     79        _size_depth                            = max<uint32_t>(_nb_branch_speculated,_nb_context);
     80//      _size_branch_update_prediction_id      = max<uint32_t>(_size_branch_update_prediction,_nb_context);
     81        _size_inst_ifetch_ptr                  = log2(max<uint32_t>(_nb_inst_fetch,_nb_context));
     82        _size_nb_inst_decod                    = log2(_size_queue)+1;
     83
     84        _size_instruction_address              = size_general_data-2;
     85        _size_general_data                     = size_general_data;
     86
     87        _have_port_context_id                  = _size_context_id > 0;
     88        _have_port_depth                       = (_size_depth                       > 0);
     89//      _have_port_branch_update_prediction_id = (_size_branch_update_prediction_id > 0);
     90        _have_port_inst_ifetch_ptr             = (_size_inst_ifetch_ptr             > 0);
     91
     92        copy ();
     93      }
     94
    8595    log_end(Decod_unit,FUNCTION);
    8696  };
     
    101111    log_begin(Decod_unit,FUNCTION);
    102112
    103     delete _param_decod;
    104     delete _param_decod_queue;
     113    delete    _param_decod;
     114    delete    _param_decod_queue;
     115
     116    log_end(Decod_unit,FUNCTION);
     117  };
     118
     119
     120#undef  FUNCTION
     121#define FUNCTION "Decod_unit::copy"
     122  void Parameters::copy (void)
     123  {
     124    log_begin(Decod_unit,FUNCTION);
     125
     126    COPY(_param_decod      );
     127    COPY(_param_decod_queue);
    105128
    106129    log_end(Decod_unit,FUNCTION);
Note: See TracChangeset for help on using the changeset viewer.