Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 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/Prediction_unit_Glue/src/Parameters.cpp

    r82 r88  
    3030                          uint32_t   nb_inst_branch_predict,
    3131                          uint32_t   nb_inst_branch_decod  ,
    32                           uint32_t   nb_inst_branch_update )
     32                          uint32_t   nb_inst_branch_update ,
     33                          bool       is_toplevel
     34                          )
    3335  {
    3436    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    3537
    3638    _nb_context                = nb_context     ;
    37     _size_address              = size_address   ;
    3839    _nb_instruction            = nb_instruction ;
    39     _size_depth                = size_depth     ;
     40//  _size_depth                = size_depth     ;
     41    _array_size_depth          = size_depth     ;
    4042    _nb_decod_unit             = nb_decod_unit  ;
    4143    _nb_inst_decod             = nb_inst_decod  ;
    42 //     _nb_ooo_engine             = nb_ooo_engine  ;
    43 //     _nb_inst_update            = nb_inst_update ;
     44//  _nb_ooo_engine             = nb_ooo_engine  ;
     45//  _nb_inst_update            = nb_inst_update ;
    4446    _nb_inst_branch_predict    = nb_inst_branch_predict;
    4547    _nb_inst_branch_decod      = nb_inst_branch_decod  ;
    4648    _nb_inst_branch_update     = nb_inst_branch_update ;
    4749     
    48     _size_context_id           = log2(_nb_context);
    49     _size_inst_ifetch_ptr      = new uint32_t [_nb_context];
    50     _max_size_depth            = max<uint32_t>(_size_depth,_nb_context);
     50    test();
    5151
    52     _have_port_context_id      = (_size_context_id>0);
    53     _have_port_max_depth       = (_max_size_depth>0);
    54     _have_port_depth           = new bool [_nb_context];
    55     _have_port_inst_ifetch_ptr = new bool [_nb_context];
     52    if (is_toplevel)
     53      {
     54        _size_instruction_address  = size_address;
     55        _size_context_id           = log2(_nb_context);
     56        _size_depth                = max<uint32_t>(size_depth,_nb_context);
     57        _size_inst_ifetch_ptr      = log2(max<uint32_t>(_nb_instruction,_nb_context));
    5658
    57     for (uint32_t i=0; i<_nb_context; i++)
    58       {
    59         _size_inst_ifetch_ptr      [i] = log2(_nb_instruction [i]);
    60         _have_port_depth           [i] = (_size_depth [i] > 0);
    61         _have_port_inst_ifetch_ptr [i] = (_size_inst_ifetch_ptr [i] > 0);
     59        _have_port_context_id      = (_size_context_id > 0);
     60        _have_port_depth           = (_size_depth > 0);
     61        _have_port_inst_ifetch_ptr = (_size_inst_ifetch_ptr > 0);
     62
     63        copy ();
    6264      }
    6365
    64     test();
    6566    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
    6667  };
     
    8081  {
    8182    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    82     delete  [] _size_inst_ifetch_ptr     ;
    83     delete  [] _have_port_depth          ;
    84     delete  [] _have_port_inst_ifetch_ptr;
     83    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
     84  };
     85
     86#undef  FUNCTION
     87#define FUNCTION "Prediction_unit_Glue::copy"
     88  void Parameters::copy (void)
     89  {
     90    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    8591    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
    8692  };
Note: See TracChangeset for help on using the changeset viewer.