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

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h

    r110 r111  
    3131
    3232#include <iostream>
     33#include <fstream>
    3334
    3435namespace morpheo {
     
    275276#endif
    276277
     278#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
     279  private   : std::ofstream                 * instruction_log_file;
     280#endif
     281
    277282    // -----[ Methods ]---------------------------------------------------
    278283
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h

    r108 r111  
    9696#endif
    9797  public  : Taddress_t         address_next            ;
     98#ifdef DEBUG
     99  public  : double             cycle_rob_in            ;
     100  public  : double             cycle_commit            ;
     101#endif   
    98102
    99 //   public  : entry_t (uint32_t           ptr                     ,
    100 //                   Tcontext_t         front_end_id            ,
    101 //                   Tcontext_t         context_id              ,
    102 //                   Tcontext_t         rename_unit_id          ,
    103 //                   Tdepth_t           depth                   ,
    104 //                   Ttype_t            type                    ,
    105 //                   Toperation_t       operation               ,
    106 //                   Tcontrol_t         is_delay_slot           ,
    107 //                   Tgeneral_data_t    address                 ,
    108 //                   Texception_t       exception               ,
    109 //                   Texception_t       exception_use           ,
    110 //                   Tlsq_ptr_t         store_queue_ptr_write   ,
    111 //                   Tlsq_ptr_t         load_queue_ptr_write    ,
    112 //                   Tcontrol_t         read_ra                 ,
    113 //                   Tgeneral_address_t num_reg_ra_log          ,
    114 //                   Tgeneral_address_t num_reg_ra_phy          ,
    115 //                   Tcontrol_t         read_rb                 ,
    116 //                   Tgeneral_address_t num_reg_rb_log          ,
    117 //                   Tgeneral_address_t num_reg_rb_phy          ,
    118 //                   Tcontrol_t         read_rc                 ,
    119 //                   Tspecial_address_t num_reg_rc_log          ,
    120 //                   Tspecial_address_t num_reg_rc_phy          ,
    121 //                   Tcontrol_t         write_rd                ,
    122 //                   Tgeneral_address_t num_reg_rd_log          ,
    123 //                   Tgeneral_address_t num_reg_rd_phy_old      ,
    124 //                   Tgeneral_address_t num_reg_rd_phy_new      ,
    125 //                   Tcontrol_t         write_re                ,
    126 //                   Tspecial_address_t num_reg_re_log          ,
    127 //                   Tspecial_address_t num_reg_re_phy_old      ,
    128 //                   Tspecial_address_t num_reg_re_phy_new      )
    129 //     {
    130 //       this->ptr                     = ptr                   ;
    131 //       this->front_end_id            = front_end_id          ;
    132 //       this->context_id              = context_id            ;
    133 //       this->rename_unit_id          = rename_unit_id        ;
    134 //       this->depth                   = depth                 ;
    135 //       this->type                    = type                  ;
    136 //       this->operation               = operation             ;
    137 //       this->is_delay_slot           = is_delay_slot         ;
    138 //       this->address                 = address               ;
    139 //       this->exception               = exception             ;
    140 //       this->exception_use           = exception_use         ;
    141 //       this->store_queue_ptr_write   = store_queue_ptr_write ;
    142 //       this->load_queue_ptr_write    = load_queue_ptr_write  ;
    143 //       this->read_ra                 = read_ra               ;
    144 //       this->num_reg_ra_log          = num_reg_ra_log        ;
    145 //       this->num_reg_ra_phy          = num_reg_ra_phy        ;
    146 //       this->read_rb                 = read_rb               ;
    147 //       this->num_reg_rb_log          = num_reg_rb_log        ;
    148 //       this->num_reg_rb_phy          = num_reg_rb_phy        ;
    149 //       this->read_rc                 = read_rc               ;
    150 //       this->num_reg_rc_log          = num_reg_rc_log        ;
    151 //       this->num_reg_rc_phy          = num_reg_rc_phy        ;
    152 //       this->write_rd                = write_rd              ;
    153 //       this->num_reg_rd_log          = num_reg_rd_log        ;
    154 //       this->num_reg_rd_phy_old      = num_reg_rd_phy_old    ;
    155 //       this->num_reg_rd_phy_new      = num_reg_rd_phy_new    ;
    156 //       this->write_re                = write_re              ;
    157 //       this->num_reg_re_log          = num_reg_re_log        ;
    158 //       this->num_reg_re_phy_old      = num_reg_re_phy_old    ;
    159 //       this->num_reg_re_phy_new      = num_reg_re_phy_new    ;
    160 //     }
    161103  };
    162104
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r109 r111  
    310310#endif
    311311
     312#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
     313    instruction_log_file = new std::ofstream [_param->_nb_thread];
     314    for (uint32_t i=0; i<_param->_nb_thread; ++i)
     315      if (_param->_have_thread [i])
     316        {
     317          std::string filename = "Instruction_flow-thread_" + toString(i) + ".log";
     318         
     319          instruction_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc);
     320        }
     321#endif
     322
    312323    log_end(Commit_unit,FUNCTION);
    313324  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r109 r111  
    207207    delete _component;
    208208
     209#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
     210    for (uint32_t i=0; i<_param->_nb_thread; ++i)
     211      if (_param->_have_thread [i])
     212        {
     213          instruction_log_file [i].close();
     214        }
     215#endif
     216
    209217    log_end(Commit_unit,FUNCTION);
    210218  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp

    r110 r111  
    5959      std::string sum_nb_inst_retire_ok = "0";
    6060      std::string sum_nb_inst_retire_ko = "0";
    61 
     61      std::string sum_average;
    6262      for (uint32_t i=0; i<_param->_nb_thread; i++)
    6363        if (_param->_have_thread [i])
     
    6868            sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok;
    6969            sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko;
     70            sum_average           = "+ average_inst_retire_ok_"+toString(i)+" average_inst_retire_ko_"+toString(i);
     71                       
     72            _stat->create_expr_average_by_cycle("average_inst_retire_ok_"+toString(i),"nb_inst_retire_ok_"+toString(i), "", toString(_("Average instruction retire ok by cycle (thread %d)"),i));
     73            _stat->create_expr_average_by_cycle("average_inst_retire_ko_"+toString(i),"nb_inst_retire_ko_"+toString(i), "", toString(_("Average instruction retire ko (event, miss) by cycle (thread %d)"),i));
    7074           
    71             _stat->create_expr_average_by_cycle("average_inst_retire_ok_"+toString(i), sum_nb_inst_retire_ok, "", toString(_("Average instruction retire ok by cycle (IPC) (thread %d)"),i));
    72             _stat->create_expr_average_by_cycle("average_inst_retire_ko_"+toString(i), sum_nb_inst_retire_ko, "", toString(_("Average instruction retire ko (event, miss) by cycle (thread %d)"),i));
    73            
     75            _stat->create_expr_percent         ("percent_inst_retire_ok_"+toString(i),"average_inst_retire_ok_"+toString(i), sum_average, toString(_("Percent instruction retire ok by cycle (thread %d)"),i));
     76            _stat->create_expr_percent         ("percent_inst_retire_ko_"+toString(i),"average_inst_retire_ko_"+toString(i), sum_average, toString(_("Percent instruction retire ko by cycle (thread %d)"),i));
     77
    7478            _stat->create_expr                 ("IPC_ok_"+toString(i) , "average_inst_retire_ok_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ok) (thread %d)",i));
    7579            _stat->create_expr                 ("CPI_ok_"+toString(i) , "/ 1 IPC_ok_"+toString(i)            , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ok) (thread %d)",i));
     
    8286          }
    8387
     88      _stat->create_expr_average_by_cycle("average_inst_retire_ok", sum_nb_inst_retire_ok, "", _("Average instruction retire ok by cycle (all thread)"));
     89      _stat->create_expr_average_by_cycle("average_inst_retire_ko", sum_nb_inst_retire_ko, "", _("Average instruction retire ko (event, miss) by cycle (all thread)"));
     90     
     91      sum_average = "+ average_inst_retire_ok average_inst_retire_ko";
     92
     93      _stat->create_expr_percent         ("percent_inst_retire_ok","average_inst_retire_ok", sum_average, _("Percent instruction retire ok by cycle (all thread)"));
     94      _stat->create_expr_percent         ("percent_inst_retire_ko","average_inst_retire_ko", sum_average, _("Percent instruction retire ko by cycle (all thread)"));
     95           
    8496      _stat->create_expr                 ("IPC_ok" , "/ "+sum_nb_inst_retire_ok+" cycle", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)");
    8597      _stat->create_expr                 ("CPI_ok" , "/ 1 IPC_ok"            , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok)");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r110 r111  
    172172#endif
    173173                  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
     174#ifdef DEBUG
     175                  entry->cycle_rob_in            = sc_simulation_time();
     176                  entry->cycle_commit            = sc_simulation_time();
     177#endif
    174178
    175179                  // Test if exception :
     
    340344                        (entry->read_rb))
    341345                    entry->address_next = PORT_READ(in_COMMIT_ADDRESS     [x]);
     346
     347#ifdef DEBUG
     348                  entry->cycle_commit            = sc_simulation_time();
     349#endif
    342350                  }
    343351              }
     
    406414                  }
    407415               
     416#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
     417                // log file
     418                instruction_log_file [num_thread]
     419                  << "[" << sc_simulation_time() << "] "
     420                  << "{" << ((retire_ok)?" OK ":"!KO!") << "} "
     421                  << std::hex
     422                  << "0x" << entry->address << " (0x" << (entry->address<<2) << ") "
     423                  << std::dec
     424                  << "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] "
     425                  << std::endl;
     426#endif
     427
    408428                // Update nb_inst
    409429                reg_NB_INST_COMMIT_ALL [front_end_id][context_id] --;
Note: See TracChangeset for help on using the changeset viewer.