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

Almost complete design
with Test and test platform

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Parameters.cpp

    r81 r88  
    2222  Parameters::Parameters (uint32_t          nb_front_end         ,
    2323                          uint32_t *        nb_context           ,
     24//                           uint32_t          size_front_end_id    ,
     25//                           uint32_t          size_context_id      ,
    2426                          uint32_t          max_branch_speculated,
    2527                          uint32_t          size_general_data    ,
     
    2830                          uint32_t          nb_front_end_select  ,
    2931                          Tpriority_t       priority             ,
    30                           Tload_balancing_t load_balancing       )
     32                          Tload_balancing_t load_balancing       ,
     33                          bool              is_toplevel)
    3134  {
    3235    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
     
    3538    _nb_context            = nb_context           ;
    3639    _max_branch_speculated = max_branch_speculated;
    37     _size_general_data     = size_general_data    ;
    3840    _nb_inst_rename        = nb_inst_rename       ;
    3941    _nb_inst_decod         = nb_inst_decod        ;
     
    4446    _max_nb_inst_decod     = max<uint32_t>(nb_inst_decod,nb_front_end);
    4547
    46     _size_front_end_id     = log2(nb_front_end);
    47     _size_context_id       = log2(max<uint32_t>(nb_context,nb_front_end));
    48     _size_depth            = log2(max_branch_speculated);
     48    test();
    4949
    50     _have_port_front_end_id= _size_front_end_id > 0;
    51     _have_port_context_id  = _size_context_id   > 0;
    52     _have_port_depth       = _size_depth        > 0;
     50    if (is_toplevel)
     51      {
     52        _size_general_data     = size_general_data    ;
     53        _size_depth            = log2(max_branch_speculated);
     54        _size_front_end_id     = log2(_nb_front_end);
     55        _size_context_id       = log2(max<uint32_t>(_nb_context,_nb_front_end));
    5356       
    54     test();
     57        _have_port_front_end_id= _size_front_end_id > 0;
     58        _have_port_context_id  = _size_context_id   > 0;
     59        _have_port_depth       = _size_depth        > 0;
     60       
     61        copy();
     62      }
     63
    5564    log_printf(FUNC,Rename_select,FUNCTION,"End");
    5665  };
     
    7382  };
    7483
     84#undef  FUNCTION
     85#define FUNCTION "Rename_select::copy"
     86  void Parameters::copy (void)
     87  {
     88    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
     89    log_printf(FUNC,Rename_select,FUNCTION,"End");
     90  };
     91
    7592}; // end namespace rename_select
    7693}; // end namespace rename_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp

    r81 r88  
    3838    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
    3939
     40#if DEBUG_Core == true
     41    log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Rename_select,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Rename_select,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Rename_select,FUNCTION,"Method - transition");
     
    8995                        << (*(in_RENAME_IN_TYPE          [i][j]))
    9096                        << (*(in_RENAME_IN_OPERATION     [i][j]))
     97                        << (*(in_RENAME_IN_NO_EXECUTE    [i][j]))
     98                        << (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]))
    9199                        << (*(in_RENAME_IN_ADDRESS       [i][j]))
    92100                        << (*(in_RENAME_IN_HAS_IMMEDIAT  [i][j]))
     
    102110                        << (*(in_RENAME_IN_WRITE_RE      [i][j]))
    103111                        << (*(in_RENAME_IN_NUM_REG_RE    [i][j]))
    104                         << (*(in_RENAME_IN_EXCEPTION_USE [i][j]));
     112                        << (*(in_RENAME_IN_EXCEPTION_USE [i][j]))
     113                        << (*(in_RENAME_IN_EXCEPTION     [i][j]));
    105114              if (_param->_have_port_front_end_id)
    106115              sensitive << (*(in_RENAME_IN_FRONT_END_ID  [i][j]));
     
    150159                  (*(out_RENAME_OUT_OPERATION     [x])) (*(in_RENAME_IN_VAL           [i][j]));
    151160                  (*(out_RENAME_OUT_OPERATION     [x])) (*(in_RENAME_IN_OPERATION     [i][j]));
     161                  (*(out_RENAME_OUT_NO_EXECUTE    [x])) (*(in_RENAME_IN_VAL           [i][j]));
     162                  (*(out_RENAME_OUT_NO_EXECUTE    [x])) (*(in_RENAME_IN_NO_EXECUTE    [i][j]));
     163                  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_VAL           [i][j]));
     164                  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]));
    152165                  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_VAL           [i][j]));
    153166                  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_ADDRESS       [i][j]));
     
    178191                  (*(out_RENAME_OUT_EXCEPTION_USE [x])) (*(in_RENAME_IN_VAL           [i][j]));
    179192                  (*(out_RENAME_OUT_EXCEPTION_USE [x])) (*(in_RENAME_IN_EXCEPTION_USE [i][j]));
     193                  (*(out_RENAME_OUT_EXCEPTION     [x])) (*(in_RENAME_IN_VAL           [i][j]));
     194                  (*(out_RENAME_OUT_EXCEPTION     [x])) (*(in_RENAME_IN_EXCEPTION     [i][j]));
    180195                }
    181196          }
     
    194209
    195210#ifdef STATISTICS
    196     if (_usage & USE_STATISTICS)
     211    if (usage_is_set(_usage,USE_STATISTICS))
    197212      {
    198213        log_printf(INFO,Rename_select,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp

    r81 r88  
    5858    // ~~~~~[ Interface : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5959    {
    60       ALLOC2_INTERFACE("rename_in", IN, EAST, "output of decod's stage", _param->_nb_front_end, _param->_nb_inst_decod[alloc_interface_it1]);
     60      ALLOC2_INTERFACE("rename_in", IN, EAST, "output of decod's stage", _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    6161     
    62       _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL           ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    63       _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK           ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    64       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID  ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id          , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    65       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID    ,"context_id"   ,Tcontext_t        ,_param->_size_context_id            , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    66       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH         ,"depth"        ,Tdepth_t          ,_param->_size_depth                 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    67       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE          ,"type"         ,Ttype_t           ,_param->_size_type                  , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    68       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION     ,"operation"    ,Toperation_t      ,_param->_size_operation             , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    69       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    70       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    71       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    72       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA       ,"read_ra"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    73       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA    ,"num_reg_ra"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    74       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB       ,"read_rb"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    75       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB    ,"num_reg_rb"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    76       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC       ,"read_rc"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    77       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC    ,"num_reg_rc"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    78       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD      ,"write_rd"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    79       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD    ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    80       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE      ,"write_re"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    81       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE    ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    82       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception             , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
     62      _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL           ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     63      _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK           ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     64      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID  ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     65      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID    ,"context_id"   ,Tcontext_t        ,_param->_size_context_id            , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     66      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH         ,"depth"        ,Tdepth_t          ,_param->_size_depth                 , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     67      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE          ,"type"         ,Ttype_t           ,_param->_size_type                  , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     68      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION     ,"operation"    ,Toperation_t      ,_param->_size_operation             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     69      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     70      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     71      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     72      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     73      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     74      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA       ,"read_ra"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     75      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA    ,"num_reg_ra"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     76      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB       ,"read_rb"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     77      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB    ,"num_reg_rb"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     78      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC       ,"read_rc"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     79      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC    ,"num_reg_rc"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     80      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD      ,"write_rd"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     81      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD    ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     82      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE      ,"write_re"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     83      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE    ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     84      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     85      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION     ,"exception"    ,Texception_t      ,_param->_size_exception             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    8386    }
    8487
     
    9497      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_TYPE          ,"type"         ,Ttype_t           ,_param->_size_type                  );
    9598      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_OPERATION     ,"operation"    ,Toperation_t      ,_param->_size_operation             );
     99      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   );
     100      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   );
    96101      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS       ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data          );
    97102      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   );
     
    108113      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NUM_REG_RE    ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic);
    109114      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception             );
     115      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION     ,"exception"    ,Texception_t      ,_param->_size_exception             );
    110116    }
    111117
    112 
    113118    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     119    _priority = new generic::priority::Priority (_name+"_priority"      ,
     120                                                 _param->_priority      ,
     121                                                 _param->_load_balancing,
     122                                                 _param->_nb_front_end  ,
     123                                                 _param->_nb_inst_decod ,
     124                                                 _param->_nb_front_end_select);
    114125
    115126#ifdef POSITION
    116     _component->generate_file();
     127    if (usage_is_set(_usage,USE_POSITION))
     128      _component->generate_file();
    117129#endif
    118130
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
     
    3838        delete []  in_RENAME_IN_TYPE          ;
    3939        delete []  in_RENAME_IN_OPERATION     ;
     40        delete []  in_RENAME_IN_NO_EXECUTE    ;
     41        delete []  in_RENAME_IN_IS_DELAY_SLOT ;
    4042        delete []  in_RENAME_IN_ADDRESS       ;
    4143        delete []  in_RENAME_IN_HAS_IMMEDIAT  ;
     
    5254        delete []  in_RENAME_IN_NUM_REG_RE    ;
    5355        delete []  in_RENAME_IN_EXCEPTION_USE ;
     56        delete []  in_RENAME_IN_EXCEPTION     ;
    5457
    5558        delete [] out_RENAME_OUT_VAL          ;
     
    7982      }
    8083    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    81 
     84    delete _priority;
    8285    delete _component;
    8386
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp

    r81 r88  
    2222  void Rename_select::genMealy (void)
    2323  {
    24     log_printf(FUNC,Rename_select,FUNCTION,"Begin");
     24    log_begin(Rename_select,FUNCTION);
     25    log_function(Rename_select,FUNCTION,_name.c_str());
    2526
    26     Tcontrol_t ack [_param->_nb_front_end][_param->_max_nb_inst_decod];
     27    Tcontrol_t val                  [_param->_nb_inst_rename];
     28    Tcontrol_t ack                  [_param->_nb_front_end][_param->_max_nb_inst_decod];
     29    Tcontrol_t previous_transaction [_param->_nb_front_end];
     30
     31    for (uint32_t i=0; i<_param->_nb_inst_rename; ++i)
     32      val [i] = false;
    2733    for (uint32_t i=0; i<_param->_nb_front_end; i++)
    28       for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
    29         ack [i][j] = false;
    30    
    31     std::list<select_t>::iterator it=select.begin();
     34      {
     35        previous_transaction [i] = true;
     36        for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     37          ack [i][j] = false;
     38      }
     39
     40    std::list<generic::priority::select_t> * select = _priority->select();
     41    std::list<generic::priority::select_t>::iterator it=select->begin();
    3242
    3343    for (uint32_t i=0; i<_param->_nb_inst_rename; i++)
    3444      {
    35         Tcontrol_t val = false;
     45        log_printf(TRACE,Rename_select,FUNCTION,"  * inst_rename [%d]",i);
    3646
    37         while ((it != select.end()) and (val == false))
     47        // Scan all instruction until find
     48        while ((it != select->end()) and (val [i] == false))
    3849          {
    39             Tcontext_t x = it->_front_end ;
    40             uint32_t   y = it->_inst_decod;
     50            Tcontext_t x = it->grp;
     51            uint32_t   y = it->elt;
    4152
    42             // Test if this instruction is valid
    43             if (PORT_READ(in_RENAME_IN_VAL[x][y]) == 1)
     53            log_printf(TRACE,Rename_select,FUNCTION,"    * front_end[%d].inst_decod[%d]",x,y);
     54            log_printf(TRACE,Rename_select,FUNCTION,"      * rename_in_val        : %d",PORT_READ(in_RENAME_IN_VAL[x][y]));
     55            log_printf(TRACE,Rename_select,FUNCTION,"      * previous_transaction : %d",previous_transaction[x]);
     56
     57            // Test if this instruction is valid and if all previous instruction of this front end is an valid transaction
     58            if (previous_transaction [x] and
     59                PORT_READ(in_RENAME_IN_VAL[x][y]))
    4460              {
    4561                // Find !!!
    46                 val        = true;
     62                val [i]    = true;
    4763                ack [x][y] = PORT_READ(in_RENAME_OUT_ACK [i]);
     64
     65                log_printf(TRACE,Rename_select,FUNCTION,"      * rename_out_ack       : %d",PORT_READ(in_RENAME_OUT_ACK[i]));
    4866
    4967                if (_param->_have_port_front_end_id)
     
    5573                PORT_WRITE(out_RENAME_OUT_TYPE         [i],PORT_READ(in_RENAME_IN_TYPE          [x][y]));
    5674                PORT_WRITE(out_RENAME_OUT_OPERATION    [i],PORT_READ(in_RENAME_IN_OPERATION     [x][y]));
     75                PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],PORT_READ(in_RENAME_IN_NO_EXECUTE    [x][y]));
     76                PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y]));
    5777                PORT_WRITE(out_RENAME_OUT_ADDRESS      [i],PORT_READ(in_RENAME_IN_ADDRESS       [x][y]));
    5878                PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT  [x][y]));
     
    6989                PORT_WRITE(out_RENAME_OUT_NUM_REG_RE   [i],PORT_READ(in_RENAME_IN_NUM_REG_RE    [x][y]));
    7090                PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y]));
     91                PORT_WRITE(out_RENAME_OUT_EXCEPTION    [i],PORT_READ(in_RENAME_IN_EXCEPTION     [x][y]));
    7192              }
     93
     94            // ack = 1 if previous_transaction == true and rename_in_val == true and rename_out == true
     95            previous_transaction [x] = ack [x][y];
    7296
    7397            it ++;
    7498          }
    7599
    76         PORT_WRITE(out_RENAME_OUT_VAL [i], val);
    77100      }
     101
     102    for (uint32_t i=0; i<_param->_nb_inst_rename; ++i)
     103      PORT_WRITE(out_RENAME_OUT_VAL [i], val [i]);
    78104
    79105    for (uint32_t i=0; i<_param->_nb_front_end; i++)
     
    81107        PORT_WRITE(out_RENAME_IN_ACK [i][j], ack [i][j]);
    82108
    83     log_printf(FUNC,Rename_select,FUNCTION,"End");
     109    log_end(Rename_select,FUNCTION);
    84110  };
    85111
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_transition.cpp

    r81 r88  
    2626    if (PORT_READ(in_NRESET) == 0)
    2727      {
    28         select.clear();
    29         reg_FRONT_END_PRIORITY = 0;
     28        _priority->reset();
    3029      }
    3130    else
    3231      {
    33         switch (_param->_priority)
    34           {
    35           case PRIORITY_STATIC :
    36             {
    37               reg_FRONT_END_PRIORITY = (reg_FRONT_END_PRIORITY+_param->_nb_front_end_select)%_param->_nb_front_end;
    38               break;
    39             }
    40           case PRIORITY_ROUND_ROBIN :
    41             {
    42               reg_FRONT_END_PRIORITY = (reg_FRONT_END_PRIORITY+1)%_param->_nb_front_end;
    43               break;
    44             }
    45           default:
    46             {
    47               break;
    48             }
    49           }
    50 
    51         // flush list
    52         select.clear();
    53        
    54         // Compute next scan order !!!
    55         switch (_param->_load_balancing)
    56           {
    57           case LOAD_BALANCING_BALANCE :
    58             {
    59               for (uint32_t j=0; j<_param->_max_nb_inst_decod; j++)
    60                 for (uint32_t i=0; i<_param->_nb_front_end_select; i++)
    61                   {
    62                     uint32_t x=(reg_FRONT_END_PRIORITY+i)%_param->_nb_front_end;
    63                    
    64                     // Test valid inst_decod
    65                     if (j < _param->_nb_inst_decod[x])
    66                       select.push_back(select_t(x,j));
    67                   }
    68                  
    69               break;
    70             }
    71           case LOAD_BALANCING_MAXIMUM_FOR_PRIORITY :
    72             {
    73 
    74               for (uint32_t i=0; i<_param->_nb_front_end_select; i++)
    75                 {
    76                   uint32_t x=(reg_FRONT_END_PRIORITY+i)%_param->_nb_front_end;
    77                  
    78                   for (uint32_t j=0; j<_param->_nb_inst_decod[x]; j++)
    79                     select.push_back(select_t(x,j));
    80                 }
    81 
    82               break;
    83             }
    84           default :
    85             {
    86               break;
    87             }
    88           }
     32        _priority->transition();
    8933
    9034// #if (DEBUG >= DEBUG_TRACE)
Note: See TracChangeset for help on using the changeset viewer.