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/Prediction_unit/Branch_Target_Buffer/src/Parameters.cpp

    r81 r88  
    2929                          uint32_t   nb_inst_decod  ,
    3030                          uint32_t   nb_inst_update ,
    31                           Tvictim_t  victim_scheme  )
     31                          Tvictim_t  victim_scheme  ,
     32                          bool       is_toplevel)
    3233  {
    3334    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin");
     
    3738    _size_buffer     = size_buffer    ;
    3839    _associativity   = associativity  ;
    39     _size_address    = size_address   ;
    4040    _size_counter    = size_counter   ;
    4141    _nb_inst_predict = nb_inst_predict;
     
    4545
    4646    _size_bank       = size_buffer/associativity;
    47     _size_context_id = log2(nb_context);
    4847    _size_victim     = log2(associativity);
    4948
    50     _have_port_context_id   = (_size_context_id > 0);
    5149    _have_component_victim  = (_size_victim     > 0);
    5250    _is_full_associative    = _size_bank == 1;
    5351    uint32_t nb_access = nb_inst_predict + nb_inst_decod + nb_inst_update;
     52
     53    test();
    5454
    5555    if (_have_component_victim)
     
    7878       _size_buffer       ,
    7979       _associativity     ,
    80        _size_address      ,
     80        size_address      ,
    8181       _nb_inst_predict   ,
    8282       _nb_inst_decod     ,
    8383       _nb_inst_update    );
    84    
     84
    8585    _param_branch_target_buffer_register = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Parameters
    8686      (_nb_context     ,
     
    8888       _size_buffer    ,
    8989       _associativity  ,
    90        _size_address   ,
     90        size_address   ,
    9191       _size_counter   ,
    9292       _nb_inst_predict,
     
    9494       _nb_inst_update );
    9595
    96     test();
     96    if (is_toplevel)
     97      {
     98        _size_instruction_address = size_address   ;
     99        _size_context_id          = log2(nb_context);
     100        _have_port_context_id     = (_size_context_id > 0);
     101
     102        copy ();
     103      }
     104
    97105    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End");
    98106  };
     
    125133  };
    126134
     135
     136#undef  FUNCTION
     137#define FUNCTION "Branch_Target_Buffer::copy"
     138  void Parameters::copy (void)
     139  {
     140    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin");
     141
     142    if (_have_component_victim)
     143      {
     144        COPY(_param_sort);
     145        COPY(_param_victim);
     146      }
     147    COPY(_param_branch_target_buffer_glue);
     148    COPY(_param_branch_target_buffer_register);
     149
     150    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End");
     151  };
     152
     153
    127154}; // end namespace branch_target_buffer
    128155}; // end namespace prediction_unit
Note: See TracChangeset for help on using the changeset viewer.