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

    r83 r88  
    2121  Parameters::Parameters (uint32_t   nb_context,
    2222                          uint32_t   nb_decod_unit,
    23                           uint32_t   nb_ooo_engine,
    2423                          uint32_t   nb_inst_branch_complete,
    2524                          uint32_t * size_depth,               
    2625                          uint32_t   size_address,
    27                           uint32_t * size_inst_decod,           
    28                           uint32_t * size_inst_commit,         
     26                          uint32_t * size_nb_inst_decod,           
     27                          uint32_t   size_nb_inst_commit,         
    2928                          uint32_t * link_context_to_decod_unit,
    30                           uint32_t * link_decod_unit_to_ooo_engine)
     29                          bool       is_toplevel)
    3130  {
    3231    log_begin(Context_State,FUNCTION);
     
    3433    _nb_context                    = nb_context                   ;
    3534    _nb_decod_unit                 = nb_decod_unit                ;
    36     _nb_ooo_engine                 = nb_ooo_engine                ;
    3735    _nb_inst_branch_complete       = nb_inst_branch_complete      ;
    38     _size_depth                    = size_depth                   ;
    39     _size_address                  = size_address                 ;
    40     _size_inst_decod               = size_inst_decod              ;
    41     _size_inst_commit              = size_inst_commit             ;
     36    _array_size_depth              = size_depth                   ;
     37//  _size_address                  = size_address                 ;
     38//  _size_nb_inst_decod            = size_nb_inst_decod           ;
     39//  _size_nb_inst_commit           = size_nb_inst_commit          ;
    4240    _link_context_to_decod_unit    = link_context_to_decod_unit   ;
    43     _link_decod_unit_to_ooo_engine = link_decod_unit_to_ooo_engine;
     41
     42    test();
     43
     44    if (is_toplevel)
     45      {
     46        _size_context_id               = log2(_nb_context);
     47        _size_depth                    = log2(max<uint32_t>(size_depth,_nb_context));
     48        _size_instruction_address      = size_address;
     49        _size_nb_inst_decod            = max<uint32_t>(size_nb_inst_decod,_nb_decod_unit);
     50        _size_nb_inst_commit           = size_nb_inst_commit;
     51
     52        _have_port_context_id          = (_size_context_id>0);
     53        _have_port_depth               = (_size_depth > 0);
     54
     55        copy ();
     56      }
    4457   
    45     _size_context_id               = log2(_nb_context);
    46     _size_max_depth                = max<uint32_t>(_size_depth,_nb_context);
    47 
    48     _have_port_context_id          = (_size_context_id>0);
    49     _have_port_max_depth           = (_size_max_depth >0);
    50     _have_port_depth               = new bool [_nb_context];
    51     for (uint32_t i=0; i<_nb_context; i++)
    52       _have_port_depth [i] = (_size_depth [i] >0);
    53    
    54     test();
    5558    log_end(Context_State,FUNCTION);
    5659  };
     
    7073  {
    7174    log_begin(Context_State,FUNCTION);
    72     delete [] _have_port_depth;
     75    log_end(Context_State,FUNCTION);
     76  };
     77
     78#undef  FUNCTION
     79#define FUNCTION "Context_State::copy"
     80  void Parameters::copy (void)
     81  {
     82    log_begin(Context_State,FUNCTION);
    7383    log_end(Context_State,FUNCTION);
    7484  };
Note: See TracChangeset for help on using the changeset viewer.