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/Instruction/src/Instruction.cpp

    r100 r101  
    2929  void instruction_decod               (decod_instruction_t * inst, decod_param_t * param)
    3030  {
     31    log_printf(TRACE,Decod,"instruction_decod","  * instruction   : decod");
     32
    3133//     instruction_decod_type_0 (inst,param);
    3234
    3335    uint32_t opcod = range<uint32_t>(inst->_instruction,31,26);
     36
     37    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     38
    3439    (* param->_function_decod[ 0][opcod]) (inst,param);
    3540  }
     
    4348  void instruction_decod_type_1        (decod_instruction_t * inst, decod_param_t * param)
    4449  {
     50    log_printf(TRACE,Decod,"instruction_decod_type_1","  * instruction   : decod type_1");
     51   
    4552    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0);
     53
     54    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     55
    4656    (* param->_function_decod[ 1][opcod]) (inst,param);
    4757  }
     
    4959  void instruction_decod_type_2        (decod_instruction_t * inst, decod_param_t * param)
    5060  {
     61    log_printf(TRACE,Decod,"instruction_decod_type_2","  * instruction   : decod type_2");
     62
    5163    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0);
     64
     65    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     66
    5267    (* param->_function_decod[ 2][opcod]) (inst,param);
    5368  }
     
    5570  void instruction_decod_type_3        (decod_instruction_t * inst, decod_param_t * param)
    5671  {
     72    log_printf(TRACE,Decod,"instruction_decod_type_3","  * instruction   : decod type_3");
     73
    5774    uint32_t opcod = ((range<uint32_t>(inst->_instruction, 9, 8)<<4) |
    5875                      (range<uint32_t>(inst->_instruction, 3, 0)));
     76
     77    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     78
    5979    (* param->_function_decod[ 3][opcod]) (inst,param);
    6080  }
     
    6282  void instruction_decod_type_4        (decod_instruction_t * inst, decod_param_t * param)
    6383  {
     84    log_printf(TRACE,Decod,"instruction_decod_type_4","  * instruction   : decod type_4");
     85
    6486    uint32_t opcod = range<uint32_t>(inst->_instruction,25,21);
     87
     88    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     89
    6590    (* param->_function_decod[ 4][opcod]) (inst,param);
    6691  }
     
    6893  void instruction_decod_type_5        (decod_instruction_t * inst, decod_param_t * param)
    6994  {
     95    log_printf(TRACE,Decod,"instruction_decod_type_5","  * instruction   : decod type_5");
     96
    7097    uint32_t opcod = range<uint32_t>(inst->_instruction,25,21);
     98
     99    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     100
    71101    (* param->_function_decod[ 5][opcod]) (inst,param);
    72102  }
     
    74104  void instruction_decod_type_6        (decod_instruction_t * inst, decod_param_t * param)
    75105  {
     106    log_printf(TRACE,Decod,"instruction_decod_type_6","  * instruction   : decod type_6");
     107
    76108    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     109
     110    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     111
    77112    (* param->_function_decod[ 6][opcod]) (inst,param);
    78113  }
     
    80115  void instruction_decod_type_7        (decod_instruction_t * inst, decod_param_t * param)
    81116  {
     117    log_printf(TRACE,Decod,"instruction_decod_type_7","  * instruction   : decod type_7");
     118
    82119    uint32_t opcod = range<uint32_t>(inst->_instruction, 3, 0);
     120
     121    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     122
    83123    (* param->_function_decod[ 7][opcod]) (inst,param);
    84124  }
     
    86126  void instruction_decod_type_8        (decod_instruction_t * inst, decod_param_t * param)
    87127  {
     128    log_printf(TRACE,Decod,"instruction_decod_type_8","  * instruction   : decod type_8");
     129
    88130    uint32_t opcod = range<uint32_t>(inst->_instruction,16,16);
     131
     132    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     133
    89134    (* param->_function_decod[ 8][opcod]) (inst,param);
    90135  }
     
    92137  void instruction_decod_type_9        (decod_instruction_t * inst, decod_param_t * param)
    93138  {
     139    log_printf(TRACE,Decod,"instruction_decod_type_9","  * instruction   : decod type_9");
     140
    94141    uint32_t opcod = range<uint32_t>(inst->_instruction,25,23);
     142
     143    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     144
    95145    (* param->_function_decod[ 9][opcod]) (inst,param);
    96146  }
     
    98148  void instruction_decod_type_10       (decod_instruction_t * inst, decod_param_t * param)
    99149  {
     150    log_printf(TRACE,Decod,"instruction_decod_type_10","  * instruction   : decod type_10");
     151
    100152    uint32_t opcod = range<uint32_t>(inst->_instruction,25,24);
     153
     154    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     155
    101156    (* param->_function_decod[10][opcod]) (inst,param);
    102157  }
     
    104159  void instruction_decod_type_11       (decod_instruction_t * inst, decod_param_t * param)
    105160  {
     161    log_printf(TRACE,Decod,"instruction_decod_type_11","  * instruction   : decod type_11");
     162
    106163    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     164
     165    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     166
    107167    (* param->_function_decod[11][opcod]) (inst,param);
    108168  }
     
    110170  void instruction_decod_type_12       (decod_instruction_t * inst, decod_param_t * param)
    111171  {
     172    log_printf(TRACE,Decod,"instruction_decod_type_12","  * instruction   : decod type_12");
     173
    112174    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     175
     176    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     177
    113178    (* param->_function_decod[12][opcod]) (inst,param);
    114179  }
     
    116181  void instruction_decod_type_13       (decod_instruction_t * inst, decod_param_t * param)
    117182  {
     183    log_printf(TRACE,Decod,"instruction_decod_type_13","  * instruction   : decod type_13");
     184
    118185    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 6);
     186
     187    log_printf(TRACE,Decod,"instruction_decod","    * opcod : %d (0x%x)",opcod,opcod);
     188
    119189    (* param->_function_decod[13][opcod]) (inst,param);
    120190  }
     
    122192  void instruction_illegal             (decod_instruction_t * inst, decod_param_t * param)
    123193  {
    124     log_printf(TRACE,Decod,"instruction_illegal","instruction_illegal");
     194    log_printf(TRACE,Decod,"instruction_illegal","  * instruction   : illegal");
     195
     196    msgWarning(_("Instruction \"%.8x\" at address \"%.8x\" is illegal.\n"),inst->_instruction,inst->_address);
    125197       
    126198    inst->_exception_use = EXCEPTION_USE_ILLEGAL_INSTRUCTION;
Note: See TracChangeset for help on using the changeset viewer.