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_Front_end/Front_end/Context_State/src/Context_State_transition.cpp

    r122 r123  
    1616namespace context_state {
    1717
    18 #define MISS_FAST
     18// #define MANAGE_EVENT MANAGE_EVENT_WAIT_ALL
     19// #define MANAGE_EVENT MANAGE_EVENT_WAIT_DECODE
     20#define MANAGE_EVENT MANAGE_EVENT_NO_WAIT
    1921
    2022#define get_priority(x) \
    2123  (((state == CONTEXT_STATE_KO_MISS_LOAD_ADDR                  ) or  \
     24    (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND               ) or  \
    2225    (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR       ) or  \
    23     (state == CONTEXT_STATE_KO_MISS_LOAD_WAITEND               ) or  \
    2426    (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND    ) or  \
    2527    (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE))?3: \
     
    4345            reg_STATE            [i] = CONTEXT_STATE_OK;
    4446            reg_INTERRUPT_ENABLE [i] = 0;
     47            reg_EVENT_DEPTH      [i] = 0; // unacessary
    4548          }
    4649      }
     
    5962            Tcounter_t inst_all        = inst_commit_all + inst_decod_all;
    6063//          Tcounter_t inst_mem        = inst_commit_mem + inst_decod_all;
     64            bool       condition       = ( (MANAGE_EVENT == MANAGE_EVENT_WAIT_ALL   )?(inst_all       == 0):
     65                                          ((MANAGE_EVENT == MANAGE_EVENT_WAIT_DECODE)?(inst_decod_all == 0):
     66                                            true));
    6167
    6268            context_state_t state = reg_STATE [i];
     
    8995              case CONTEXT_STATE_KO_MISS_BRANCH_WAITEND :
    9096                {
    91                   // Wait end of all instruction
    92 //                if (inst_all == 0)
    93                   if (
    94 #ifdef  MISS_FAST
    95                       inst_decod_all ==
    96 #else
    97                       inst_all ==
    98 #endif
    99                       0)
    100                    
     97                  if (condition)
    10198//                  state = CONTEXT_STATE_OK;
    10299                    state = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
     
    106103                {
    107104                  // Wait end of all instruction
    108 //                if (inst_all == 0)
    109                   if (
    110 #ifdef  MISS_FAST
    111                       inst_decod_all ==
    112 #else
    113                       inst_all ==
    114 #endif
    115                       0)
     105                  if (condition)
    116106                    state = CONTEXT_STATE_KO_MISS_LOAD_ADDR;
    117107
     
    146136                {
    147137                  // Wait end of all instruction
    148 //                if (inst_all == 0)
    149                   if (
    150 #ifdef  MISS_FAST
    151                       inst_decod_all ==
    152 #else
    153                       inst_all ==
    154 #endif
    155                       0)
     138                  if (condition)
    156139//                  state = CONTEXT_STATE_OK; // @@@ TODO : make MISS fast (miss decod)
    157140                    state = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR;
     
    333316#endif
    334317
     318              log_printf(TRACE,Context_State,FUNCTION,"    * state     : %s",toString(state).c_str());
    335319              log_printf(TRACE,Context_State,FUNCTION,"    * depth     : %d",depth     );
    336320              log_printf(TRACE,Context_State,FUNCTION,"    * depth_cur : %d",depth_cur );
     
    648632                          }
    649633                        }
     634
     635                      depth = (depth+1)%_param->_nb_inst_branch_speculated[context];
     636
    650637                      break;
    651638                    }
Note: See TracChangeset for help on using the changeset viewer.