Ignore:
Timestamp:
Feb 27, 2009, 7:37:40 PM (15 years ago)
Author:
rosiere
Message:

1) Decod_queue : multi implementation (one_fifo, multi_fifo)
2) Issue_queue : multi implementation (in_order, out_of_order)
3) Direction : Add Meta predictor
4) Context_State : re add Branch_complete, More priority to Load miss (is not speculative)
5) Return_Address_Stack : update reg_PREDICT pointer on decod miss prediction
6) UPT : Fix bug in multi event
7) Prediction_glue : in read_stack case, insert in UPT pc_next
8) Rename select : when rob have an event (need flush), read_r{a,b,c} and write_r{d,e} is set at 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_genMoore.cpp

    r110 r111  
    3939      }
    4040
    41     // ===================================================================
    42     // =====[ ISSUE_IN ]==================================================
    43     // ===================================================================
    44     {
    45       Tcontrol_t ack [_param->_nb_rename_unit][_param->_max_nb_inst_rename];
    46 
    47       // Initialisation
    48       for (uint32_t i=0; i<_param->_nb_bank; i++)
    49         internal_BANK_IN_ACK  [i] = false;
    50    
    51       for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
    52         for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
    53           ack [i][j] = false;
    54    
    55       std::list<generic::priority::select_t> * select_reg = _priority_reg->select(); // same select for all issue
    56      
    57       // issue_in interface
    58       std::list<generic::priority::select_t> * select_in = _priority_in ->select(); // same select for all issue
    59       for (std::list<generic::priority::select_t>::iterator it=select_in ->begin();
    60            it!=select_in ->end();
    61            it++)
    62         {
    63           // Get num interface
    64           uint32_t num_rename_unit = it->grp;
    65           uint32_t num_inst_rename = it->elt;
    66 
    67           log_printf(TRACE,Issue_queue,FUNCTION,"  * ISSUE_IN [%d][%d]",num_rename_unit,num_inst_rename);
    68          
    69           // scan all bank
    70           for (std::list<generic::priority::select_t>::iterator it=select_reg->begin();
    71                it!=select_reg->end();
    72                it++)
    73             {
    74               uint32_t num_bank  = it->grp;
    75 
    76               log_printf(TRACE,Issue_queue,FUNCTION,"    * BANK [%d]",num_bank);
    77          
    78               // test if bank is not busy (full or previous access)
    79               if (not internal_BANK_IN_ACK [num_bank] and (_issue_queue[num_bank].size() < _param->_size_bank))
    80                 {
    81                   log_printf(TRACE,Issue_queue,FUNCTION,"    * find");
    82 
    83                   // find
    84                   ack [num_rename_unit][num_inst_rename] = true;
    85                   internal_BANK_IN_ACK             [num_bank] = true;
    86                   internal_BANK_IN_NUM_RENAME_UNIT [num_bank] = num_rename_unit;
    87                   internal_BANK_IN_NUM_INST        [num_bank] = num_inst_rename;
    88                  
    89                   break; // Stop scan
    90                 }
    91               else
    92                 log_printf(TRACE,Issue_queue,FUNCTION,"    * not find");
    93             }
    94         }
    95    
    96       for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
    97         for (uint32_t j=0; j<_param->_nb_inst_rename[i]; j++)
    98           PORT_WRITE(out_ISSUE_IN_ACK [i][j],ack [i][j]);
    99     }
    100 
    101     // ===================================================================
    102     // =====[ ISSUE_OUT ]=================================================
    103     // ===================================================================
    104     {
    105       Tcontrol_t val [_param->_nb_inst_issue];
    106 
    107       for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
    108         val [i] = 0;
    109 
    110       // From Reexecute_queue
    111 
    112 //       uint32_t num_reexecute_entry = 0;
    113       for (std::list<entry_t*>::iterator it=_reexecute_queue.begin();
    114            it!=_reexecute_queue.end();
    115            ++it)
    116         {
    117           entry_t* entry = (*it);
    118 
    119           for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
    120             // test if no previous transaction and can accept this type
    121             if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type])
    122               {
    123                 // find a issue port
    124                 val [i] = 1;
    125            
    126                 if (_param->_have_port_context_id)
    127                 PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [i], entry->_context_id           );
    128                 if (_param->_have_port_front_end_id)
    129                 PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [i], entry->_front_end_id         );
    130                 if (_param->_have_port_rob_ptr  )
    131                 PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [i], entry->_packet_id            );
    132                 PORT_WRITE(out_ISSUE_OUT_OPERATION             [i], entry->_operation            );
    133                 PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
    134                 PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
    135                 if (_param->_have_port_load_queue_ptr)
    136                 PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
    137                 PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [i], entry->_has_immediat         );
    138                 PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [i], entry->_immediat             );
    139                 PORT_WRITE(out_ISSUE_OUT_READ_RA               [i], entry->_read_ra              );
    140                 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [i], entry->_num_reg_ra           );
    141                 PORT_WRITE(out_ISSUE_OUT_READ_RB               [i], entry->_read_rb              );
    142                 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [i], entry->_num_reg_rb           );
    143                 PORT_WRITE(out_ISSUE_OUT_READ_RC               [i], entry->_read_rc              );
    144                 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [i], entry->_num_reg_rc           );
    145                 PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [i], entry->_write_rd             );
    146                 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [i], entry->_num_reg_rd           );
    147                 PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [i], entry->_write_re             );
    148                 PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [i], entry->_num_reg_re           );
    149 
    150                 internal_ISSUE_OUT_FROM_REEXECUTE [i] = true;
    151 //              internal_ISSUE_OUT_NUM_BANK       [i] = num_reexecute_entry;
    152                 internal_ISSUE_OUT_ENTRY          [i] = entry;
    153 
    154                 break; // stop scan
    155               }
    156 //           num_reexecute_entry ++;
    157         }
    158 
    159       // From Issue_queue
    160 
    161       std::list<generic::priority::select_t> * select = _priority_out->select(); // same select for all issue
    162 
    163       for (std::list<generic::priority::select_t>::iterator it=select->begin();
    164            it!=select->end();
    165            it++)
    166         {
    167           uint32_t num_bank=it->grp;
    168 
    169 //        log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION,"    * Bank [%d]",num_bank);
    170 
    171           // Have instruction ?
    172           if (not _issue_queue [num_bank].empty())
    173             {
    174 //            log_printf(TRACE,Issue_queue,Issue_queue,FUNCTION,"      * Not Empty !!!");
    175 
    176               entry_t* entry = _issue_queue [num_bank].front();
    177              
    178               for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
    179                 // test if no previous transaction and can accept this type
    180                 if ((val[i] == 0) and _param->_table_issue_type [i][entry->_type])
    181                   {
    182                     // find a issue port
    183                     val [i] = 1;
    184 
    185                     if (_param->_have_port_context_id)
    186                     PORT_WRITE(out_ISSUE_OUT_CONTEXT_ID            [i], entry->_context_id           );
    187                     if (_param->_have_port_front_end_id)
    188                     PORT_WRITE(out_ISSUE_OUT_FRONT_END_ID          [i], entry->_front_end_id         );
    189                     if (_param->_have_port_rob_ptr  )
    190                     PORT_WRITE(out_ISSUE_OUT_PACKET_ID             [i], entry->_packet_id            );
    191                     PORT_WRITE(out_ISSUE_OUT_OPERATION             [i], entry->_operation            );
    192                     PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
    193                     PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
    194                     if (_param->_have_port_load_queue_ptr)
    195                     PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
    196                     PORT_WRITE(out_ISSUE_OUT_HAS_IMMEDIAT          [i], entry->_has_immediat         );
    197                     PORT_WRITE(out_ISSUE_OUT_IMMEDIAT              [i], entry->_immediat             );
    198                     PORT_WRITE(out_ISSUE_OUT_READ_RA               [i], entry->_read_ra              );
    199                     PORT_WRITE(out_ISSUE_OUT_NUM_REG_RA            [i], entry->_num_reg_ra           );
    200                     PORT_WRITE(out_ISSUE_OUT_READ_RB               [i], entry->_read_rb              );
    201                     PORT_WRITE(out_ISSUE_OUT_NUM_REG_RB            [i], entry->_num_reg_rb           );
    202                     PORT_WRITE(out_ISSUE_OUT_READ_RC               [i], entry->_read_rc              );
    203                     PORT_WRITE(out_ISSUE_OUT_NUM_REG_RC            [i], entry->_num_reg_rc           );
    204                     PORT_WRITE(out_ISSUE_OUT_WRITE_RD              [i], entry->_write_rd             );
    205                     PORT_WRITE(out_ISSUE_OUT_NUM_REG_RD            [i], entry->_num_reg_rd           );
    206                     PORT_WRITE(out_ISSUE_OUT_WRITE_RE              [i], entry->_write_re             );
    207                     PORT_WRITE(out_ISSUE_OUT_NUM_REG_RE            [i], entry->_num_reg_re           );
    208                    
    209                     internal_ISSUE_OUT_FROM_REEXECUTE [i] = false;
    210                     internal_ISSUE_OUT_NUM_BANK       [i] = num_bank;
    211                     internal_ISSUE_OUT_ENTRY          [i] = entry;
    212 
    213                     break; // stop scan
    214                   }
    215             }
    216         }
    217 
    218       for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
    219         {
    220           internal_ISSUE_OUT_VAL [i] = val [i];
    221           PORT_WRITE(out_ISSUE_OUT_VAL [i], internal_ISSUE_OUT_VAL [i]);
    222         }
    223     }
     41    (this->*function_genMoore) ();
    22442
    22543    log_end(Issue_queue,FUNCTION);
Note: See TracChangeset for help on using the changeset viewer.