Ignore:
Timestamp:
Jun 8, 2009, 10:43:30 PM (15 years ago)
Author:
rosiere
Message:

1) Fix performance
2) add auto generation to SPECINT2000
3) add reset in genMoore and genMealy

File:
1 edited

Legend:

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

    r122 r123  
    1717namespace rename_select {
    1818
    19 // #define CONTINUE_ON_EVENT_STOP
    20 
    2119#undef  FUNCTION
    2220#define FUNCTION "Rename_select::genMealy"
     
    2826    Tcontrol_t val                  [_param->_nb_inst_rename];
    2927    Tcontrol_t ack                  [_param->_nb_front_end][_param->_max_nb_inst_decod];
    30     Tcontrol_t previous_transaction [_param->_nb_front_end];
    3128
    3229    for (uint32_t i=0; i<_param->_nb_inst_rename; ++i)
    3330      val [i] = false;
    3431    for (uint32_t i=0; i<_param->_nb_front_end; i++)
     32      for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     33        ack [i][j] = false;
     34   
     35    if (PORT_READ(in_NRESET))
    3536      {
    36         previous_transaction [i] = true;
    37         for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
    38           ack [i][j] = false;
    39       }
     37        Tcontrol_t previous_transaction [_param->_nb_front_end];
     38        for (uint32_t i=0; i<_param->_nb_front_end; i++)
     39          previous_transaction [i] = true;
    4040
    4141    std::list<generic::priority::select_t> * select = _priority->select();
     
    7171               
    7272                // Test if ROB is Flushed
    73 #ifndef CONTINUE_ON_EVENT_STOP
    7473                if (not stop)
    75 #endif
    7674                  {
    7775                    // Find !!!
     
    7977                    ack [x][y] = PORT_READ(in_RENAME_OUT_ACK [i]);
    8078                   
    81                     Tcontrol_t     have_event          = (PORT_READ(in_RETIRE_EVENT_FLUSH [x][context_id])
    82 #ifdef CONTINUE_ON_EVENT_STOP
    83                                                           or stop
    84 #endif
    85                                                           );
    86                     Tcontrol_t     can_register_access = not have_event;
    87                     Tcontrol_t     no_execute          = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]) or have_event);
    88                     Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]) and can_register_access);
    89                     Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]) and can_register_access);
    90                     Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]) and can_register_access);
    91                     Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]) and can_register_access);
    92                     Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]) and can_register_access);
    93 //                  Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]));
    94 //                  Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]));
    95 //                  Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]));
    96 //                  Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]));
    97 //                  Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]));
     79//                  Tcontrol_t     have_event          = (PORT_READ(in_RETIRE_EVENT_FLUSH [x][context_id]) // or
     80//                                                           );
     81//                  log_printf(TRACE,Rename_select,FUNCTION,"      * have_event           : %d",have_event);
     82
     83//                  Tcontrol_t     can_register_access = not have_event;
     84//                  Tcontrol_t     no_execute          = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]) or have_event);
     85//                  Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]) and can_register_access);
     86//                  Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]) and can_register_access);
     87//                  Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]) and can_register_access);
     88//                  Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]) and can_register_access);
     89//                  Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]) and can_register_access);
     90                    Tcontrol_t     no_execute          = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]));
     91                    Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]));
     92                    Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]));
     93                    Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]));
     94                    Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]));
     95                    Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]));
    9896                   
    99                     log_printf(TRACE,Rename_select,FUNCTION,"      * have_event           : %d",have_event);
    100                     log_printf(TRACE,Rename_select,FUNCTION,"      * no_execute (before)  : %d",PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]));
    101                     log_printf(TRACE,Rename_select,FUNCTION,"      * no_execute (after)   : %d",no_execute);
     97                    log_printf(TRACE,Rename_select,FUNCTION,"      * no_execute           : %d",no_execute);
    10298                   
    10399                    if (_param->_have_port_front_end_id)
     
    110106                    PORT_WRITE(out_RENAME_OUT_OPERATION    [i],PORT_READ(in_RENAME_IN_OPERATION     [x][y]));
    111107                    PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],no_execute);
     108                    PORT_WRITE(out_RENAME_OUT_LAST_EVENT   [i],PORT_READ(in_RENAME_IN_LAST_EVENT    [x][y]));
    112109                    PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y]));
    113110#ifdef DEBUG       
     
    140137      }
    141138
     139      }
     140//     else
     141//       {
     142//       }
     143
    142144    for (uint32_t i=0; i<_param->_nb_inst_rename; ++i)
    143145      PORT_WRITE(out_RENAME_OUT_VAL [i], val [i]);
     
    146148      for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
    147149        PORT_WRITE(out_RENAME_IN_ACK [i][j], ack [i][j]);
     150
    148151
    149152    log_end(Rename_select,FUNCTION);
Note: See TracChangeset for help on using the changeset viewer.