Ignore:
Timestamp:
Jul 30, 2010, 4:47:27 PM (14 years ago)
Author:
rosiere
Message:
  • Add test for all configuration
  • RAT : add rat scheme (depth_save)
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
Files:
9 edited

Legend:

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

    r138 r139  
    150150  public    : SC_OUT(Tspecial_address_t ) *** out_RETIRE_NUM_REG_RE_PHY_OLD        ;//[nb_rename_unit][nb_inst_retire]
    151151  public    : SC_OUT(Tspecial_address_t ) *** out_RETIRE_NUM_REG_RE_PHY_NEW        ;//[nb_rename_unit][nb_inst_retire]
     152  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_RESTORE                   ;//[nb_rename_unit][nb_inst_retire]
     153  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_RESTORE_RD_PHY_OLD        ;//[nb_rename_unit][nb_inst_retire]
     154  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_RESTORE_RE_PHY_OLD        ;//[nb_rename_unit][nb_inst_retire]
    152155
    153156    // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     
    157160//public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_FLUSH               ;//[nb_front_end][nb_context]
    158161  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_STOP                ;//[nb_front_end][nb_context]
    159                                                                                    
     162  public    : SC_OUT(Tevent_type_t      ) *** out_RETIRE_EVENT_TYPE                ;//[nb_front_end][nb_context]
     163  public    : SC_OUT(Tdepth_t           ) *** out_RETIRE_EVENT_DEPTH               ;//[nb_front_end][nb_context]
     164
    160165    // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
    161166  public    : SC_IN (Tcontrol_t         )  **  in_COMMIT_VAL                       ;//[nb_inst_commit]
     
    260265
    261266  private   : Tcommit_event_state_t        ** reg_EVENT_STATE                      ;//[nb_front_end][nb_context]
     267  private   : Tevent_type_t                ** reg_EVENT_TYPE                       ;//[nb_front_end][nb_context]
    262268//private   : bool                         ** reg_EVENT_FLUSH                      ;//[nb_front_end][nb_context]
    263269//private   : bool                         ** reg_EVENT_STOP                       ;//[nb_front_end][nb_context]
    264   private   : uint32_t                     ** reg_EVENT_NUM_BANK                   ;//[nb_front_end][nb_context]
    265   private   : uint32_t                     ** reg_EVENT_NUM_PTR                    ;//[nb_front_end][nb_context]
     270//private   : uint32_t                     ** reg_EVENT_NUM_BANK                   ;//[nb_front_end][nb_context]
     271//private   : uint32_t                     ** reg_EVENT_NUM_PTR                    ;//[nb_front_end][nb_context]
    266272//private   : bool                         ** reg_EVENT_CAN_RESTART                ;//[nb_front_end][nb_context]
    267273  private   : uint32_t                     ** reg_EVENT_PACKET                     ;//[nb_front_end][nb_context]
     274  private   : Tdepth_t                     ** reg_EVENT_DEPTH                      ;//[nb_front_end][nb_context]
    268275  private   : uint32_t                     ** reg_EVENT_NB_INST                    ;//[nb_front_end][nb_context]
    269276  private   : bool                         ** reg_EVENT_LAST                       ;//[nb_front_end][nb_context]
     
    279286  private   : Taddress_t                   ** reg_PC_CURRENT_IS_DS_TAKE            ;//[nb_front_end][nb_context]
    280287  private   : Taddress_t                   ** reg_PC_NEXT                          ;//[nb_front_end][nb_context]
     288
     289  private   : bool                        *** rat_gpr_update_table                 ;//[nb_front_end][nb_context][nb_general_register_logic]
     290  private   : bool                        *** rat_spr_update_table                 ;//[nb_front_end][nb_context][nb_special_register_logic]
    281291                                                                                   
    282292    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     
    292302  private   : entry_t *                    ** internal_BANK_COMMIT_ENTRY           ;//[nb_bank][nb_bank_access_commit]
    293303
    294   private   : uint32_t                        internal_BANK_RETIRE_HEAD            ;
    295   private   : Tcontrol_t                    * internal_BANK_RETIRE_VAL             ;//[nb_bank]
    296   private   : uint32_t                      * internal_BANK_RETIRE_NUM_RENAME_UNIT ;//[nb_bank]
    297   private   : uint32_t                      * internal_BANK_RETIRE_NUM_INST        ;//[nb_bank]
     304  private   : uint32_t                        internal_BANK_RETIRE_HEAD              ;
     305  private   : Tcontrol_t                    * internal_BANK_RETIRE_VAL               ;//[nb_bank]
     306  private   : uint32_t                      * internal_BANK_RETIRE_NUM_RENAME_UNIT   ;//[nb_bank]
     307  private   : uint32_t                      * internal_BANK_RETIRE_NUM_INST          ;//[nb_bank]
     308//private   : Tcontrol_t                    * internal_BANK_RETIRE_RESTORE           ;//[nb_bank]
     309  private   : Tcontrol_t                    * internal_BANK_RETIRE_RESTORE_RD_PHY_OLD;//[nb_bank]
     310  private   : Tcontrol_t                    * internal_BANK_RETIRE_RESTORE_RE_PHY_OLD;//[nb_bank]
    298311
    299312  private   : Tcontrol_t                    * internal_REEXECUTE_VAL               ;//[nb_inst_reexecute]
     
    309322
    310323  private   : Tcontrol_t                   ** internal_RETIRE_EVENT_VAL            ;//[nb_front_end][nb_context]
     324
     325  private   : bool                        *** internal_rat_gpr_update_table;//[nb_front_end][nb_context][nb_general_register_logic]
     326  private   : bool                        *** internal_rat_spr_update_table;//[nb_front_end][nb_context][nb_special_register_logic]
    311327#endif
    312328
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Parameters.h

    r138 r139  
    4141//public : uint32_t             _size_general_register              ;
    4242//public : uint32_t             _size_special_register              ;
     43  public : Trat_scheme_t      * _rat_scheme                         ;//[nb_front_end]
    4344  public : Tpriority_t          _priority                           ;
    4445  public : Tload_balancing_t    _load_balancing                     ;
    4546  public : uint32_t             _nb_rename_unit_select              ;
    4647  public : uint32_t             _nb_thread                          ;
    47   public : uint32_t          ** _translate_num_context_to_num_thread; //[nb_front_end][nb_context]
     48  public : uint32_t          ** _translate_num_context_to_num_thread;//[nb_front_end][nb_context]
    4849  public : const uint32_t       _nb_bank_access_commit              ;
    49                              
     50
    5051  public : uint32_t             _max_nb_context          ;
    5152  public : uint32_t             _max_nb_inst_insert      ;
     
    9697                        uint32_t             size_general_register              ,
    9798                        uint32_t             size_special_register              ,
     99                        Trat_scheme_t      * rat_scheme                         ,//[nb_front_end]
    98100                        Tpriority_t          priority                           ,
    99101                        Tload_balancing_t    load_balancing                     ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h

    r138 r139  
    7171
    7272#define commit_event_state_to_event_state(x) ((x==COMMIT_EVENT_STATE_EVENT)?EVENT_STATE_EVENT:((x==COMMIT_EVENT_STATE_WAIT_END)?EVENT_STATE_WAITEND:EVENT_STATE_NO_EVENT))
     73#define rob_state_to_event_type(x) ((x==ROB_END_BRANCH_MISS)?EVENT_TYPE_BRANCH_MISS_SPECULATION:((x==ROB_END_LOAD_MISS)?EVENT_TYPE_LOAD_MISS_SPECULATION:((x==ROB_END_EXCEPTION)?EVENT_TYPE_EXCEPTION:EVENT_TYPE_NONE)))
    7374
    7475// #define commit_event_state_to_event_state(x) ((x==COMMIT_EVENT_STATE_EVENT)?EVENT_STATE_EVENT:((x==COMMIT_EVENT_STATE_WAIT_END)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_END)?EVENT_STATE_END:EVENT_STATE_NO_EVENT)))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp

    r137 r139  
    120120      _ALLOC2_SIGNAL_OUT(out_RETIRE_STORE_QUEUE_PTR_WRITE   ,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    121121      _ALLOC2_SIGNAL_OUT(out_RETIRE_LOAD_QUEUE_PTR_WRITE    ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    122 //       _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RA                 ,"read_ra"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    123 //       _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RA_PHY          ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    124 //       _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RB                 ,"read_rb"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    125 //       _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RB_PHY          ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    126 //       _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RC                 ,"read_rc"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    127 //       _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RC_PHY          ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     122//    _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RA                 ,"read_ra"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     123//    _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RA_PHY          ,"num_reg_ra_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     124//    _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RB                 ,"read_rb"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     125//    _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RB_PHY          ,"num_reg_rb_phy"       ,Tgeneral_address_t,_param->_size_general_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     126//    _ALLOC2_SIGNAL_OUT(out_RETIRE_READ_RC                 ,"read_rc"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     127//    _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RC_PHY          ,"num_reg_rc_phy"       ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    128128      _ALLOC2_SIGNAL_OUT(out_RETIRE_WRITE_RD                ,"write_rd"             ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    129129      _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RD_LOG          ,"num_reg_rd_log"       ,Tgeneral_address_t,_param->_size_general_register_logic,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    134134      _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RE_PHY_OLD      ,"num_reg_re_phy_old"   ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    135135      _ALLOC2_SIGNAL_OUT(out_RETIRE_NUM_REG_RE_PHY_NEW      ,"num_reg_re_phy_new"   ,Tspecial_address_t,_param->_size_special_register      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     136      _ALLOC2_SIGNAL_OUT(out_RETIRE_RESTORE                 ,"RESTORE"              ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     137      _ALLOC2_SIGNAL_OUT(out_RETIRE_RESTORE_RD_PHY_OLD      ,"RESTORE_RD_PHY_OLD"   ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     138      _ALLOC2_SIGNAL_OUT(out_RETIRE_RESTORE_RE_PHY_OLD      ,"RESTORE_RE_PHY_OLD"   ,Tcontrol_t        ,1                                   ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
    136139
    137140      ALLOC2_INTERFACE_END(_param->_nb_rename_unit,_param->_nb_inst_retire[it1]);
     
    142145      ALLOC2_INTERFACE_BEGIN("retire_event",OUT,SOUTH, _("Interface to update rename_unit."),_param->_nb_front_end,_param->_nb_context[it1]);
    143146   
    144       _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_VAL               ,VAL,_param->_nb_front_end,_param->_nb_context[it1]);
    145       _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_ACK               ,ACK,_param->_nb_front_end,_param->_nb_context[it1]);
    146       _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STATE             ,"state"                ,Tevent_state_t    ,_param->_size_event_state           ,_param->_nb_front_end,_param->_nb_context[it1]);
    147 //    _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_FLUSH             ,"flush"                ,Tcontrol_t        ,1                                   ,_param->_nb_front_end,_param->_nb_context[it1]);
    148       _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STOP              ,"stop"                 ,Tcontrol_t        ,1                                   ,_param->_nb_front_end,_param->_nb_context[it1]);
     147      _ALLOC2_VALACK_OUT     (out_RETIRE_EVENT_VAL   ,VAL,_param->_nb_front_end,_param->_nb_context[it1]);
     148      _ALLOC2_VALACK_IN      ( in_RETIRE_EVENT_ACK   ,ACK,_param->_nb_front_end,_param->_nb_context[it1]);
     149      _ALLOC2_SIGNAL_OUT     (out_RETIRE_EVENT_STATE ,"state"      ,Tevent_state_t    ,_param->_size_event_state,_param->_nb_front_end,_param->_nb_context[it1]);
     150//    _ALLOC2_SIGNAL_OUT     (out_RETIRE_EVENT_FLUSH ,"flush"      ,Tcontrol_t        ,1                        ,_param->_nb_front_end,_param->_nb_context[it1]);
     151      _ALLOC2_SIGNAL_OUT     (out_RETIRE_EVENT_STOP  ,"stop"       ,Tcontrol_t        ,1                        ,_param->_nb_front_end,_param->_nb_context[it1]);
     152      _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_TYPE  ,"type"       ,Tevent_type_t     ,_param->_size_event_type ,_param->_nb_front_end,_param->_nb_context[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
     153      _ALLOC2_SIGNAL_OUT_COND(out_RETIRE_EVENT_DEPTH ,"depth"      ,Tdepth_t          ,_param->_size_depth      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
    149154
    150155      ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]);
     
    306311    ALLOC2(internal_BANK_COMMIT_ENTRY           ,entry_t * ,_param->_nb_bank,_param->_nb_bank_access_commit);
    307312
    308     ALLOC1(internal_BANK_RETIRE_VAL             ,Tcontrol_t,_param->_nb_bank);
    309     ALLOC1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,uint32_t  ,_param->_nb_bank);
    310     ALLOC1(internal_BANK_RETIRE_NUM_INST        ,uint32_t  ,_param->_nb_bank);
     313    ALLOC1(internal_BANK_RETIRE_VAL               ,Tcontrol_t,_param->_nb_bank);
     314    ALLOC1(internal_BANK_RETIRE_NUM_RENAME_UNIT   ,uint32_t  ,_param->_nb_bank);
     315    ALLOC1(internal_BANK_RETIRE_NUM_INST          ,uint32_t  ,_param->_nb_bank);
     316//  ALLOC1(internal_BANK_RETIRE_RESTORE           ,Tcontrol_t,_param->_nb_bank);
     317    ALLOC1(internal_BANK_RETIRE_RESTORE_RD_PHY_OLD,Tcontrol_t,_param->_nb_bank);
     318    ALLOC1(internal_BANK_RETIRE_RESTORE_RE_PHY_OLD,Tcontrol_t,_param->_nb_bank);
    311319
    312320    ALLOC1(internal_REEXECUTE_VAL               ,Tcontrol_t,_param->_nb_inst_reexecute);
     
    318326    ALLOC2(internal_EVENT_ACK                   ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]);
    319327    ALLOC2(internal_RETIRE_EVENT_VAL            ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]);
     328
     329    ALLOC3(internal_rat_gpr_update_table        ,bool      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
     330    ALLOC3(internal_rat_spr_update_table        ,bool      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
     331
    320332
    321333    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    329341   
    330342    ALLOC2(reg_EVENT_STATE          ,Tcommit_event_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
     343    ALLOC2(reg_EVENT_TYPE           ,Tevent_type_t        ,_param->_nb_front_end,_param->_nb_context [it1]);
    331344//  ALLOC2(reg_EVENT_FLUSH          ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    332345//  ALLOC2(reg_EVENT_STOP           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    333     ALLOC2(reg_EVENT_NUM_BANK       ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    334     ALLOC2(reg_EVENT_NUM_PTR        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     346//  ALLOC2(reg_EVENT_NUM_BANK       ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     347//  ALLOC2(reg_EVENT_NUM_PTR        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    335348//  ALLOC2(reg_EVENT_CAN_RESTART    ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
    336349    ALLOC2(reg_EVENT_PACKET         ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
     350    ALLOC2(reg_EVENT_DEPTH          ,Tdepth_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    337351    ALLOC2(reg_EVENT_NB_INST        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
    338352    ALLOC2(reg_EVENT_LAST           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
     
    348362    ALLOC2(reg_PC_CURRENT_IS_DS_TAKE,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
    349363    ALLOC2(reg_PC_NEXT              ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     364
     365    ALLOC3(rat_gpr_update_table     ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic);
     366    ALLOC3(rat_spr_update_table     ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic);
    350367      }
    351368
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp

    r137 r139  
    9696        DELETE2_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_special_register      );
    9797        DELETE2_SIGNAL(out_RETIRE_NUM_REG_RE_PHY_NEW      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],_param->_size_special_register      );
    98 
    99         DELETE2_SIGNAL(out_RETIRE_EVENT_VAL               ,_param->_nb_front_end,_param->_nb_context[it1],1);
    100         DELETE2_SIGNAL( in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1],1);
    101         DELETE2_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_state);
    102 //      DELETE2_SIGNAL(out_RETIRE_EVENT_FLUSH             ,_param->_nb_front_end,_param->_nb_context[it1],1);
    103         DELETE2_SIGNAL(out_RETIRE_EVENT_STOP              ,_param->_nb_front_end,_param->_nb_context[it1],1);
     98        DELETE2_SIGNAL(out_RETIRE_RESTORE                 ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1);
     99        DELETE2_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1);
     100        DELETE2_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD      ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1],1);
     101
     102        DELETE2_SIGNAL     (out_RETIRE_EVENT_VAL               ,_param->_nb_front_end,_param->_nb_context[it1],1);
     103        DELETE2_SIGNAL     ( in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1],1);
     104        DELETE2_SIGNAL     (out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_state);
     105//      DELETE2_SIGNAL     (out_RETIRE_EVENT_FLUSH             ,_param->_nb_front_end,_param->_nb_context[it1],1);
     106        DELETE2_SIGNAL     (out_RETIRE_EVENT_STOP              ,_param->_nb_front_end,_param->_nb_context[it1],1);
     107        DELETE2_SIGNAL_COND(out_RETIRE_EVENT_TYPE              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_type,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
     108        DELETE2_SIGNAL_COND(out_RETIRE_EVENT_DEPTH             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_depth     ,_param->_rat_scheme[it1] == RAT_DEPTH_SAVE);
    104109
    105110        DELETE1_SIGNAL( in_COMMIT_VAL               ,_param->_nb_inst_commit,1                             );
     
    187192        DELETE2(internal_BANK_COMMIT_ENTRY           ,_param->_nb_bank,_param->_nb_bank_access_commit);
    188193       
    189         DELETE1(internal_BANK_RETIRE_VAL             ,_param->_nb_bank);
    190         DELETE1(internal_BANK_RETIRE_NUM_RENAME_UNIT ,_param->_nb_bank);
    191         DELETE1(internal_BANK_RETIRE_NUM_INST        ,_param->_nb_bank);
     194        DELETE1(internal_BANK_RETIRE_VAL               ,_param->_nb_bank);
     195        DELETE1(internal_BANK_RETIRE_NUM_RENAME_UNIT   ,_param->_nb_bank);
     196        DELETE1(internal_BANK_RETIRE_NUM_INST          ,_param->_nb_bank);
     197//      DELETE1(internal_BANK_RETIRE_RESTORE           ,_param->_nb_bank);
     198        DELETE1(internal_BANK_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_bank);
     199        DELETE1(internal_BANK_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_bank);
    192200       
    193201        DELETE1(internal_REEXECUTE_VAL               ,_param->_nb_inst_reexecute);
     
    200208       
    201209        DELETE2(internal_RETIRE_EVENT_VAL            ,_param->_nb_front_end,_param->_nb_context[it1]);
     210
     211        DELETE3(internal_rat_gpr_update_table        ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
     212        DELETE3(internal_rat_spr_update_table        ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
    202213       
    203214        // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    217228
    218229        DELETE2(reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
     230        DELETE2(reg_EVENT_TYPE           ,_param->_nb_front_end,_param->_nb_context [it1]);
    219231//      DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
    220232//      DELETE2(reg_EVENT_STOP           ,_param->_nb_front_end,_param->_nb_context [it1]);
    221         DELETE2(reg_EVENT_NUM_BANK       ,_param->_nb_front_end,_param->_nb_context [it1]);
    222         DELETE2(reg_EVENT_NUM_PTR        ,_param->_nb_front_end,_param->_nb_context [it1]);
     233//      DELETE2(reg_EVENT_NUM_BANK       ,_param->_nb_front_end,_param->_nb_context [it1]);
     234//      DELETE2(reg_EVENT_NUM_PTR        ,_param->_nb_front_end,_param->_nb_context [it1]);
    223235//      DELETE2(reg_EVENT_CAN_RESTART    ,_param->_nb_front_end,_param->_nb_context [it1]);
    224236        DELETE2(reg_EVENT_PACKET         ,_param->_nb_front_end,_param->_nb_context [it1]);
     237        DELETE2(reg_EVENT_DEPTH          ,_param->_nb_front_end,_param->_nb_context [it1]);
    225238        DELETE2(reg_EVENT_NB_INST        ,_param->_nb_front_end,_param->_nb_context [it1]);
    226239        DELETE2(reg_EVENT_LAST           ,_param->_nb_front_end,_param->_nb_context [it1]);
     
    236249        DELETE2(reg_PC_CURRENT_IS_DS_TAKE,_param->_nb_front_end,_param->_nb_context [it1]);
    237250        DELETE2(reg_PC_NEXT              ,_param->_nb_front_end,_param->_nb_context [it1]);
     251
     252        DELETE3(rat_gpr_update_table     ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_general_register_logic);
     253        DELETE3(rat_spr_update_table     ,_param->_nb_front_end,_param->_nb_context [it1],_param->_nb_special_register_logic);
    238254      }
    239255
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp

    r133 r139  
    6060          spr_write_sr_cy     [i][j] = 0; // not necessary
    6161          spr_write_sr_ov     [i][j] = 0; // not necessary
     62
     63          // Init internal update table
     64         
     65          // Test if an event occure
     66          // bool event = (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) != EVENT_STATE_NO_EVENT);
     67          bool reset_update_table = (commit_event_state_to_event_state(reg_EVENT_STATE[i][j]) == EVENT_STATE_EVENT);
     68
     69          log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * reset_update_table : %d",reset_update_table);
     70
     71          // not event -> update_table == 1 -> always update
     72          // event     -> update_table and not reset
     73          for (uint32_t k=0; k<_param->_nb_general_register_logic; ++k)
     74            internal_rat_gpr_update_table [i][j][k] = // not event or
     75                                                      (not reset_update_table and rat_gpr_update_table [i][j][k]);
     76          for (uint32_t k=0; k<_param->_nb_special_register_logic; ++k)
     77            internal_rat_spr_update_table [i][j][k] = // not event or
     78                                                      (not reset_update_table and rat_spr_update_table [i][j][k]);
    6279        }
    6380
     
    116133                        )
    117134                      {
     135                        Tcontrol_t         write_rd       = entry->write_rd;
    118136                        Tcontrol_t         write_re       = entry->write_re;
     137                        Tgeneral_address_t num_reg_rd_log = entry->num_reg_rd_log;
    119138                        Tspecial_address_t num_reg_re_log = entry->num_reg_re_log;
    120139                       
     
    172191                          }
    173192                       
    174                         internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank] = x;
    175                         internal_BANK_RETIRE_NUM_INST        [num_bank] = y;
     193                        // Restore Old Register
     194                        Tcontrol_t retire_restore = (commit_event_state_to_event_state(reg_EVENT_STATE[front_end_id][context_id]) != EVENT_STATE_NO_EVENT);
     195
     196                        // Test if event -> need restore ?
     197                        if (retire_restore)
     198                          {
     199                            log_printf(TRACE,Commit_unit,FUNCTION,"      * Restore");
     200                           
     201                            // Test and update update table
     202                            if (write_rd)
     203                              {
     204                                internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank] = (internal_rat_gpr_update_table[front_end_id][context_id][num_reg_rd_log] == 0);
     205
     206                                internal_rat_gpr_update_table[front_end_id][context_id][num_reg_rd_log] = 1;
     207                              }
     208                            if (write_re)
     209                              {
     210                                internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank] = (internal_rat_spr_update_table[front_end_id][context_id][num_reg_re_log] == 0);
     211                               
     212                                internal_rat_spr_update_table[front_end_id][context_id][num_reg_re_log] = 1;
     213                              }
     214
     215                            log_printf(TRACE,Commit_unit,FUNCTION,"      * restore_rd_phy_old   : %d",internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank]);
     216                            log_printf(TRACE,Commit_unit,FUNCTION,"      * restore_re_phy_old   : %d",internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank]);
     217                          }
     218
     219                        internal_BANK_RETIRE_NUM_RENAME_UNIT    [num_bank] = x;
     220                        internal_BANK_RETIRE_NUM_INST           [num_bank] = y;
    176221                       
    177222                        if (_param->_have_port_front_end_id)
     
    199244                        PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_OLD    [x][y], entry->num_reg_re_phy_old   );
    200245                        PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_NEW    [x][y], entry->num_reg_re_phy_new   );
     246                        PORT_WRITE(out_RETIRE_RESTORE               [x][y],retire_restore);
     247                        PORT_WRITE(out_RETIRE_RESTORE_RD_PHY_OLD    [x][y],internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank]);
     248                        PORT_WRITE(out_RETIRE_RESTORE_RE_PHY_OLD    [x][y],internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank]);
    201249                       
    202250                        // Event -> rob must be manage this event
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp

    r129 r139  
    331331          PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], ((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_NOT_YET_EVENT) or
    332332                                                     reg_EVENT_NEXT_STOP [i][j]));
     333          if (_param->_rat_scheme[i] == RAT_DEPTH_SAVE)
     334            {
     335          PORT_WRITE(out_RETIRE_EVENT_TYPE  [i][j], reg_EVENT_TYPE  [i][j]);
     336          if (_param->_have_port_depth)
     337          PORT_WRITE(out_RETIRE_EVENT_DEPTH [i][j], reg_EVENT_DEPTH [i][j]);
     338            }
    333339        }
    334340      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp

    r137 r139  
    5454//            reg_EVENT_FLUSH           [i][j] = false;
    5555//            reg_EVENT_STOP            [i][j] = false;
    56               reg_EVENT_NUM_BANK        [i][j] = 0; // not necessary
    57               reg_EVENT_NUM_PTR         [i][j] = 0; // not necessary
    58             //reg_EVENT_CAN_RESTART     [i][j] = 0; // not necessary
     56//            reg_EVENT_NUM_BANK        [i][j] = 0; // not necessary
     57//            reg_EVENT_NUM_PTR         [i][j] = 0; // not necessary
     58//            reg_EVENT_CAN_RESTART     [i][j] = 0; // not necessary
    5959              reg_EVENT_PACKET          [i][j] = 0; // not necessary
     60              reg_EVENT_DEPTH           [i][j] = 0; // not necessary
    6061              reg_EVENT_NB_INST         [i][j] = 0;
    6162              reg_EVENT_LAST            [i][j] = false;
     
    7273              reg_PC_NEXT               [i][j] = (0x100+4)>>2;
    7374            }
     75
     76        // Resert RAT_UPDATE_TABLE
     77        for (uint32_t i=0; i<_param->_nb_front_end; i++)
     78          for (uint32_t j=0; j<_param->_nb_context[i]; j++)
     79            {
     80              for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
     81                rat_gpr_update_table       [i][j][k] = false; // not necessary
     82              for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
     83                rat_spr_update_table       [i][j][k] = false; // not necessary
     84            }
    7485
    7586        // Reset priority algorithm
     
    114125//                         else
    115126                          reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END;
     127                         
     128                          // Reset update_table
     129                          for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
     130                            rat_gpr_update_table      [i][j][k] = false;
     131                          for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
     132                            rat_spr_update_table      [i][j][k] = false;
    116133                      }
    117134                   
     
    180197                        else
    181198                          {
     199                            uint32_t next_packet = reg_EVENT_NEXT_PACKET [i][j];
     200
    182201                            reg_EVENT_STATE         [i][j] = COMMIT_EVENT_STATE_NOT_YET_EVENT;
    183202
    184203                            reg_EVENT_NEXT_STOP     [i][j] = false;
    185                             reg_EVENT_PACKET        [i][j] = reg_EVENT_NEXT_PACKET [i][j];
     204                            reg_EVENT_PACKET        [i][j] = next_packet;
     205//                          reg_EVENT_DEPTH         [i][j] = _rob[next_packet].depth;
    186206                            reg_EVENT_NB_INST       [i][j] = reg_NB_INST_COMMIT_ALL [i][j];
    187207                          //reg_EVENT_STOP          [i][j] = true;
     
    596616                                reg_EVENT_STATE         [front_end_id][context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT;
    597617
     618//                              reg_EVENT_DEPTH         [front_end_id][context_id] = _rob[packet].depth;
    598619                                reg_EVENT_NB_INST       [front_end_id][context_id] = reg_NB_INST_COMMIT_ALL [front_end_id][context_id];
    599620
     
    697718#endif
    698719
    699 
    700720#ifdef STATISTICS
    701             if (usage_is_set(_usage,USE_STATISTICS))
    702               (*_stat_nb_inst_retire [x]) ++;
    703                
     721                if (usage_is_set(_usage,USE_STATISTICS))
     722                  (*_stat_nb_inst_retire [x]) ++;
    704723#endif
    705724               
     
    709728                entry->state_old = entry->state;
    710729                entry->state     = ROB_END;
     730
     731
     732                // Update RAT_UPDATE_TABLE
     733                Tcontext_t front_end_id = entry->front_end_id;
     734                Tcontext_t context_id   = entry->context_id  ;
     735
     736                if (entry->write_rd and internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank])
     737                  rat_gpr_update_table [front_end_id][context_id][entry->num_reg_rd_log] = true;
     738                if (entry->write_re and internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank])
     739                  rat_spr_update_table [front_end_id][context_id][entry->num_reg_re_log] = true;
    711740              }
    712741          }
     
    771800                      {
    772801                          reg_EVENT_STATE         [front_end_id][context_id] = COMMIT_EVENT_STATE_EVENT;
     802                          reg_EVENT_TYPE          [front_end_id][context_id] = rob_state_to_event_type(state);
    773803//                        reg_EVENT_STOP          [front_end_id][context_id] = false; // instruction flow can continue
    774804                          reg_EVENT_LAST          [front_end_id][context_id] = false;
    775805                          // it the head !
    776806                          reg_EVENT_PACKET        [front_end_id][context_id] = packet_id;
    777                    
     807                          reg_EVENT_DEPTH         [front_end_id][context_id] = entry->depth;
     808
    778809//                           // If event is an load_miss, many instruction can be inserted.
    779810//                           // -> new last instruction
     
    947978                      // In all case, stop instruction flow
    948979                      reg_EVENT_STATE         [entry->front_end_id][entry->context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT;
     980//                    reg_EVENT_DEPTH         [entry->front_end_id][entry->context_id] = _rob[packet]._depth;
    949981                      reg_EVENT_NB_INST       [entry->front_end_id][entry->context_id] = reg_NB_INST_COMMIT_ALL [entry->front_end_id][entry->context_id];
    950                                
    951982//                    reg_EVENT_STOP          [entry->front_end_id][entry->context_id] = true;
    952983
     
    12831314//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT             : %d (bank %d, ptr %d)",((reg_EVENT_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_NUM_BANK [i][j]), reg_EVENT_NUM_BANK [i][j],reg_EVENT_NUM_PTR [i][j]);
    12841315//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_CAN_RESTART : %d",reg_EVENT_CAN_RESTART [i][j]);
     1316            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_DEPTH       : %d - type %s",reg_EVENT_DEPTH [i][j],toString(reg_EVENT_TYPE [i][j]).c_str());
    12851317            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_LAST        : %d - packet %d - ptr %d (bank %d, ptr %d)",reg_EVENT_LAST [i][j],reg_EVENT_PACKET[i][j],((reg_EVENT_LAST_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_LAST_NUM_BANK [i][j]), reg_EVENT_LAST_NUM_BANK [i][j],reg_EVENT_LAST_NUM_PTR [i][j]);
    12861318            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_NEXT        : stop : %d - packet : %d",reg_EVENT_NEXT_STOP  [i][j],reg_EVENT_NEXT_PACKET[i][j]);
     
    13701402        }
    13711403
     1404      log_printf(TRACE,Commit_unit,FUNCTION,"  * Dump RAT Update Table");
     1405      for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     1406        for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     1407          {
     1408            {
     1409              std::string str = "";
     1410              for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
     1411                str+=toString("%.1d ",rat_gpr_update_table[i][j][k]);
     1412             
     1413              log_printf(TRACE,Commit_unit,FUNCTION,"    * GPR [%d][%d] %s",i,j,str.c_str());
     1414            }
     1415
     1416            {
     1417              std::string str = "";
     1418              for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
     1419                str+=toString("%.1d ",rat_spr_update_table[i][j][k]);
     1420             
     1421              log_printf(TRACE,Commit_unit,FUNCTION,"    * GPR [%d][%d] %s",i,j,str.c_str());
     1422            }
     1423          }
     1424
    13721425      log_printf(TRACE,Commit_unit,FUNCTION,"    * nb_write_rd   : %d",nb_write_rd);
    13731426      log_printf(TRACE,Commit_unit,FUNCTION,"    * nb_write_re   : %d",nb_write_re);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp

    r138 r139  
    2222#define FUNCTION "Commit_unit::Parameters"
    2323  Parameters::Parameters (uint32_t             nb_front_end                       ,
    24                           uint32_t           * nb_context                         ,
    25                           uint32_t             nb_rename_unit                     ,
    26                           uint32_t             size_queue                         ,
    27                           uint32_t             nb_bank                            ,
    28                           Tretire_ooo_scheme_t retire_ooo_scheme                  ,
    29                           uint32_t           * nb_inst_insert                     ,
    30                           uint32_t           * nb_inst_retire                     ,
    31                           uint32_t             nb_inst_commit                     ,
    32                           uint32_t             nb_inst_reexecute                  ,
    33                           uint32_t             nb_inst_branch_complete            ,
    34                           uint32_t          ** nb_branch_speculated               ,
     24                          uint32_t           * nb_context                         ,//[nb_front_end]           
     25                          uint32_t             nb_rename_unit                     ,                           
     26                          uint32_t             size_queue                         ,                           
     27                          uint32_t             nb_bank                            ,                           
     28                          Tretire_ooo_scheme_t retire_ooo_scheme                  ,                           
     29                          uint32_t           * nb_inst_insert                     ,//[nb_rename_unit]         
     30                          uint32_t           * nb_inst_retire                     ,//[nb_rename_unit]
     31                          uint32_t             nb_inst_commit                     ,                           
     32                          uint32_t             nb_inst_reexecute                  ,                           
     33                          uint32_t             nb_inst_branch_complete            ,                           
     34                          uint32_t          ** nb_branch_speculated               ,//[nb_front_end][nb_context]
    3535                          uint32_t             size_nb_inst_decod                 ,
    3636                          uint32_t             size_general_data                  ,
     
    3939                          uint32_t             size_general_register              ,
    4040                          uint32_t             size_special_register              ,
     41                          Trat_scheme_t      * rat_scheme                         ,//[nb_front_end]
    4142                          Tpriority_t          priority                           ,
    4243                          Tload_balancing_t    load_balancing                     ,
    4344                          uint32_t             nb_rename_unit_select              ,
    4445                          uint32_t             nb_thread                          ,
    45                           uint32_t          ** translate_num_context_to_num_thread,
     46                          uint32_t          ** translate_num_context_to_num_thread,//[nb_front_end][nb_context]
    4647                          bool                 is_toplevel):
    4748    _nb_bank_access_commit (1              )
     
    6162    _nb_inst_branch_complete             = nb_inst_branch_complete            ;
    6263    _nb_branch_speculated                = nb_branch_speculated               ;
     64    _rat_scheme                          = rat_scheme                         ;
    6365    _priority                            = priority                           ;
    6466    _load_balancing                      = load_balancing                     ;
Note: See TracChangeset for help on using the changeset viewer.