Ignore:
Timestamp:
Jan 15, 2009, 6:19:08 PM (15 years ago)
Author:
rosiere
Message:

1) Add soc test
2) fix bug (Pc management, Decod and execute, Update prediction ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp

    r88 r101  
    7777              {
    7878                log_printf(TRACE,Decod,FUNCTION,"  * IFETCH [%d][%d]",x,y);   
     79                log_printf(TRACE,Decod,FUNCTION,"    * decod_ack [%d] : %d",i,PORT_READ(in_DECOD_ACK [i]));
    7980
    8081                can_continue [x] = can_continue_next [x];
     
    145146                PORT_WRITE(out_DECOD_READ_RC       [i], _decod_instruction->_read_rc       );
    146147                PORT_WRITE(out_DECOD_NUM_REG_RC    [i], _decod_instruction->_num_reg_rc    );
    147                 PORT_WRITE(out_DECOD_WRITE_RD      [i], _decod_instruction->_write_rd      );
     148                PORT_WRITE(out_DECOD_WRITE_RD      [i],(_decod_instruction->_num_reg_rd!=0)?_decod_instruction->_write_rd:0);
    148149                PORT_WRITE(out_DECOD_NUM_REG_RD    [i], _decod_instruction->_num_reg_rd    );
    149150                PORT_WRITE(out_DECOD_WRITE_RE      [i], _decod_instruction->_write_re      );
     
    152153//              PORT_WRITE(out_DECOD_EXCEPTION     [i], _decod_instruction->_exception     );
    153154
     155                // Branch predictor can accept : the depth is valid
     156                log_printf(TRACE,Decod,FUNCTION,"    * context_depth_val : %d",PORT_READ(in_CONTEXT_DEPTH_VAL [x]));
     157                decod_val   [i]    &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]);
     158                ifetch_ack  [x][y] &= PORT_READ(in_CONTEXT_DEPTH_VAL [x]);
     159
    154160                if (type == TYPE_BRANCH)
    155161                  {
    156162                    log_printf(TRACE,Decod,FUNCTION,"    * type is branch");
     163                    log_printf(TRACE,Decod,FUNCTION,"      * predict_ack  : %d",PORT_READ(in_PREDICT_ACK [i]));
     164
    157165                    log_printf(TRACE,Decod,FUNCTION,"      * address src  : %.8x (%.8x)",_decod_instruction->_address     ,_decod_instruction->_address     <<2);
    158166                    log_printf(TRACE,Decod,FUNCTION,"      * address dest : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2);
     
    160168                    predict_val [i]     = ifetch_ack  [x][y] // and decod_val [i]
    161169                      ;
    162                     decod_val   [i]    &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable               
    163                     ifetch_ack  [x][y] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack
    164 
     170                    decod_val   [i]    &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable               
     171                    ifetch_ack  [x][y] &= PORT_READ(in_PREDICT_ACK [i]);// predict_ack and fetch_val and decod_enable and decod_ack
     172               
    165173                    if (_param->_have_port_context_id)
    166174                    PORT_WRITE(out_PREDICT_CONTEXT_ID                  [i],x);
Note: See TracChangeset for help on using the changeset viewer.