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_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Parameters.cpp

    r81 r88  
    2828                          uint32_t   nb_reg_free           ,
    2929                          uint32_t   nb_bank               ,
    30                           uint32_t   size_read_counter     )
     30                          uint32_t   size_read_counter     ,
     31                          bool       is_toplevel)
    3132  {
    3233    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
     
    4243    _size_read_counter   = size_read_counter  ;
    4344
    44     uint32_t max_nb_context = max<uint32_t>(nb_context, nb_front_end);
     45    uint32_t size_general_register = log2(nb_general_register);
     46    uint32_t size_special_register = log2(nb_special_register);
     47    uint32_t max_nb_context        = max<uint32_t>(nb_context, nb_front_end);
    4548   
    46     _size_front_end_id      = log2(nb_front_end       );
    47     _size_context_id        = log2(max_nb_context     );
    48     _size_general_register  = log2(nb_general_register);
    49     _size_special_register  = log2(nb_special_register);
    50    
    51     _have_port_front_end_id = _size_front_end_id>0;
    52     _have_port_context_id   = _size_context_id  >0;
    53 
    54 
    5549    uint32_t nb_thread = 0;
    5650    for (uint32_t i=0; i<nb_front_end; i++)
     
    9488    _param_register_translation_unit_glue    = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters
    9589      (_nb_inst_insert,
    96        _nb_inst_retire);
     90       _nb_inst_retire,
     91        size_general_register,
     92        size_special_register);
    9793     
    9894    test();
     95
     96    if (is_toplevel)
     97      {
     98        _size_front_end_id      = log2(nb_front_end       );
     99        _size_context_id        = log2(max_nb_context     );
     100
     101        _size_general_register  = size_general_register;
     102        _size_special_register  = size_special_register;
     103       
     104        _have_port_front_end_id = _size_front_end_id>0;
     105        _have_port_context_id   = _size_context_id  >0;
     106
     107        copy();
     108      }
     109
    99110    log_printf(FUNC,Register_translation_unit,FUNCTION,"End");
    100111  };
     
    124135  };
    125136
     137#undef  FUNCTION
     138#define FUNCTION "Register_translation_unit::copy"
     139  void Parameters::copy (void)
     140  {
     141    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
     142
     143    COPY(_param_dependency_checking_unit);
     144    COPY(_param_free_list_unit);
     145    COPY(_param_register_address_translation_unit);
     146    COPY(_param_stat_list_unit);   
     147    COPY(_param_register_translation_unit_glue);
     148
     149    log_printf(FUNC,Register_translation_unit,FUNCTION,"End");
     150  };
     151
    126152}; // end namespace register_translation_unit
    127153}; // end namespace rename_unit
Note: See TracChangeset for help on using the changeset viewer.