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 ...)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h

    r81 r101  
    2828  void operation_l_addc          (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
    2929  void operation_l_sub           (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
    30 //void operation_l_mul           (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
    31 //void operation_l_mulu          (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
    32 //void operation_l_div           (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
    33 //void operation_l_divu          (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
     30  void operation_l_mul           (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
     31  void operation_l_mulu          (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
     32  void operation_l_div           (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
     33  void operation_l_divu          (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
    3434  void operation_l_and           (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
    3535  void operation_l_or            (execute_operation_t * op, execute_register_t  * reg, execute_param_t * param);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp

    r100 r101  
    9090
    9191    bool            overflow  = ovf  (param->_size_data,gpr1,gpr2,gpr3);
    92     bool            carry_out = carry(param->_size_data,gpr1,gpr2,gpr3);
     92//  bool            carry_out = carry(param->_size_data,gpr1,gpr2,gpr3);
     93    // In ISA : l.sub don't change flag carry
     94    bool            carry_out  = get_flag(op->_data_rc,FLAG_CY);
    9395
    9496    // Result
     
    104106
    105107#undef  FUNCTION
     108#define FUNCTION "Functionnal_unit::operation_l_mul"
     109  void operation_l_mul         (execute_operation_t * op, execute_register_t * reg, execute_param_t * param)
     110  {
     111    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mul");
     112
     113    Tgeneral_data_t gpr1      = unsigned(param->_size_data,op->_data_ra);
     114    Tgeneral_data_t gpr2      = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     115    Tgeneral_data_t gpr3      ;
     116    bool            overflow  ;
     117    bool            carry_out ;
     118
     119    if (param->_size_data == 32)
     120      {
     121        int64_t res = static_cast<int64_t>(gpr1) * static_cast<int64_t>(gpr2);
     122
     123        log_printf(TRACE,Functionnal_unit,FUNCTION,"  * res   : %llx",res);
     124
     125        gpr3      = param->_mask_data & static_cast<Tgeneral_data_t>(res);
     126        carry_out = res != gpr3;
     127        overflow  = carry_out;
     128      }
     129    else
     130      {
     131        throw ERRORMORPHEO(FUNCTION,_("64 bits multiplcation : not yet implemented\n"));
     132      }
     133
     134    // Result
     135    op->_timing       = param->_timing[op->_type][op->_operation];
     136    op->_data_rd      = gpr3;
     137    op->_data_re      = 0;
     138    op->_data_re      = set_flag(op->_data_re,FLAG_OV,overflow );
     139    op->_data_re      = set_flag(op->_data_re,FLAG_CY,carry_out);
     140    op->_exception    = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE;
     141    op->_no_sequence  = 0;
     142  //op->_address      = 0;
     143  };
     144
     145#undef  FUNCTION
     146#define FUNCTION "Functionnal_unit::operation_l_mulu"
     147  void operation_l_mulu        (execute_operation_t * op, execute_register_t * reg, execute_param_t * param)
     148  {
     149    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mulu");
     150
     151    Tgeneral_data_t gpr1      = unsigned(param->_size_data,op->_data_ra);
     152    Tgeneral_data_t gpr2      = unsigned(param->_size_data,op->_data_rb);
     153    Tgeneral_data_t gpr3      ;
     154    bool            overflow  ;
     155    bool            carry_out ;
     156
     157    if (param->_size_data == 32)
     158      {
     159        uint64_t res = static_cast<uint64_t>(gpr1) * static_cast<uint64_t>(gpr2);
     160
     161        log_printf(TRACE,Functionnal_unit,FUNCTION,"  * res   : %llx",res);
     162
     163        gpr3      = param->_mask_data & static_cast<Tgeneral_data_t>(res);
     164        carry_out = res != gpr3;
     165        overflow  = carry_out;
     166      }
     167    else
     168      {
     169        throw ERRORMORPHEO(FUNCTION,_("64 bits multiplcation : not yet implemented\n"));
     170      }
     171
     172    // Result
     173    op->_timing       = param->_timing[op->_type][op->_operation];
     174    op->_data_rd      = gpr3;
     175    op->_data_re      = 0;
     176    op->_data_re      = set_flag(op->_data_re,FLAG_OV,overflow );
     177    op->_data_re      = set_flag(op->_data_re,FLAG_CY,carry_out);
     178    op->_exception    = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE;
     179    op->_no_sequence  = 0;
     180  //op->_address      = 0;
     181  };
     182
     183#undef  FUNCTION
     184#define FUNCTION "Functionnal_unit::operation_l_div"
     185  void operation_l_div         (execute_operation_t * op, execute_register_t * reg, execute_param_t * param)
     186  {
     187    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_div");
     188
     189    Tgeneral_data_t gpr1      = signed(param->_size_data,op->_data_ra);
     190    Tgeneral_data_t gpr2      = signed(param->_size_data,op->_data_rb);
     191    Tgeneral_data_t gpr3      = (gpr2!=0)?(gpr1/gpr2):0;
     192    bool            overflow  = ovf  (param->_size_data,gpr1,gpr2,gpr3);
     193    bool            carry_out = (gpr2==0);
     194
     195    // Result
     196    op->_timing       = param->_timing[op->_type][op->_operation];
     197    op->_data_rd      = gpr3;
     198    op->_data_re      = 0;
     199    op->_data_re      = set_flag(op->_data_re,FLAG_OV,overflow );
     200    op->_data_re      = set_flag(op->_data_re,FLAG_CY,carry_out);
     201    op->_exception    = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE;
     202    op->_no_sequence  = 0;
     203  //op->_address      = 0;
     204  };
     205
     206#undef  FUNCTION
     207#define FUNCTION "Functionnal_unit::operation_l_divu"
     208  void operation_l_divu        (execute_operation_t * op, execute_register_t * reg, execute_param_t * param)
     209  {
     210    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_divu");
     211
     212    Tgeneral_data_t gpr1      = unsigned(param->_size_data,op->_data_ra);
     213    Tgeneral_data_t gpr2      = unsigned(param->_size_data,op->_data_rb);
     214    Tgeneral_data_t gpr3      = (gpr2!=0)?(gpr1/gpr2):0;
     215    bool            overflow  = ovf  (param->_size_data,gpr1,gpr2,gpr3);
     216    bool            carry_out = (gpr2==0);
     217
     218    // Result
     219    op->_timing       = param->_timing[op->_type][op->_operation];
     220    op->_data_rd      = gpr3;
     221    op->_data_re      = 0;
     222    op->_data_re      = set_flag(op->_data_re,FLAG_OV,overflow );
     223    op->_data_re      = set_flag(op->_data_re,FLAG_CY,carry_out);
     224    op->_exception    = (overflow==1)?EXCEPTION_ALU_RANGE:EXCEPTION_ALU_NONE;
     225    op->_no_sequence  = 0;
     226  //op->_address      = 0;
     227  };
     228
     229#undef  FUNCTION
    106230#define FUNCTION "Functionnal_unit::operation_l_and"
    107231  void operation_l_and         (execute_operation_t * op, execute_register_t * reg, execute_param_t * param)
     
    465589    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    466590
     591    // Tgeneral_data_t is unsigned
    467592    bool            f_out      = (gpr1 >= gpr2);
    468593
     
    485610    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    486611
     612    // Tgeneral_data_t is unsigned
    487613    bool            f_out      = (gpr1 >  gpr2);
    488614
     
    505631    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    506632
     633    // Tgeneral_data_t is unsigned
    507634    bool            f_out      = (gpr1 <= gpr2);
    508635
     
    525652    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    526653
     654    // Tgeneral_data_t is unsigned
    527655    bool            f_out      = (gpr1 <  gpr2);
    528656
     
    544672    Tgeneral_data_t gpr1       =   op->_data_ra;
    545673    Tgeneral_data_t gpr2       =   (op->_has_immediat==1)?op->_immediat:op->_data_rb;
    546    
    547     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra  : %.8x",unsigned(param->_size_data,op->_data_ra));
    548     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x",  signed(param->_size_data,op->_data_ra));
    549     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb  : %.8x",unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb));
    550     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x",  signed(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb));
    551    
     674       
    552675    bool            f_out;
    553676
    554     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    555       {
    556       case 1 /*b01*/ : f_out = 1                               ; break;
    557       case 2 /*b10*/ : f_out = 0                               ; break;
    558       default        : f_out = signed(param->_size_data,gpr1) >= signed(param->_size_data,gpr2); break;
    559       }
    560 
    561     log_printf(TRACE,Functionnal_unit,FUNCTION," * f_out    : %.8x",f_out);
     677    if (param->_size_data == 32)
     678      f_out = static_cast<int32_t>(gpr1) >= static_cast<int32_t>(gpr2);
     679    else
     680      f_out = static_cast<int64_t>(gpr1) >= static_cast<int64_t>(gpr2);
     681
     682//     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
     683//       {
     684//       case 1 /*b01*/ : f_out = 1                               ; break;
     685//       case 2 /*b10*/ : f_out = 0                               ; break;
     686//       default        : f_out = signed(param->_size_data,gpr1) >= signed(param->_size_data,gpr2); break;
     687//       }
    562688
    563689    // Result
     
    581707    bool            f_out;
    582708
    583     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    584       {
    585       case 1 /*b01*/ : f_out = 1; break;
    586       case 2 /*b10*/ : f_out = 0; break;
    587       default        : f_out = signed(param->_size_data,gpr1) >  signed(param->_size_data,gpr2); break;
    588       }
     709    if (param->_size_data == 32)
     710      f_out = static_cast<int32_t>(gpr1) >  static_cast<int32_t>(gpr2);
     711    else
     712      f_out = static_cast<int64_t>(gpr1) >  static_cast<int64_t>(gpr2);
     713
     714//     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
     715//       {
     716//       case 1 /*b01*/ : f_out = 1; break;
     717//       case 2 /*b10*/ : f_out = 0; break;
     718//       default        : f_out = signed(param->_size_data,gpr1) >  signed(param->_size_data,gpr2); break;
     719//       }
    589720
    590721    // Result
     
    608739    bool            f_out;
    609740
    610     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    611       {
    612       case 1 /*b01*/ : f_out = 0; break;
    613       case 2 /*b10*/ : f_out = 1; break;
    614       default        : f_out = signed(param->_size_data,gpr1) <= signed(param->_size_data,gpr2); break;
    615       }
     741    if (param->_size_data == 32)
     742      f_out = static_cast<int32_t>(gpr1) <= static_cast<int32_t>(gpr2);
     743    else
     744      f_out = static_cast<int64_t>(gpr1) <= static_cast<int64_t>(gpr2);
     745
     746//     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
     747//       {
     748//       case 1 /*b01*/ : f_out = 0; break;
     749//       case 2 /*b10*/ : f_out = 1; break;
     750//       default        : f_out = signed(param->_size_data,gpr1) <= signed(param->_size_data,gpr2); break;
     751//       }
    616752   
    617753    // Result
     
    635771    bool            f_out;
    636772
    637     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    638       {
    639       case 1 /*b01*/ : f_out = 0; break;
    640       case 2 /*b10*/ : f_out = 1; break;
    641       default        : f_out = signed(param->_size_data,gpr1) <  signed(param->_size_data,gpr2); break;
    642       }
     773    if (param->_size_data == 32)
     774      f_out = static_cast<int32_t>(gpr1) <  static_cast<int32_t>(gpr2);
     775    else
     776      f_out = static_cast<int64_t>(gpr1) <  static_cast<int64_t>(gpr2);
     777
     778//     switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
     779//       {
     780//       case 1 /*b01*/ : f_out = 0; break;
     781//       case 2 /*b10*/ : f_out = 1; break;
     782//       default        : f_out = signed(param->_size_data,gpr1) <  signed(param->_size_data,gpr2); break;
     783//       }
    643784
    644785    // Result
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp

    r100 r101  
    1818public : const Tcontext_t         _front_end_id ;
    1919public : const Tcontext_t         _ooo_engine_id;
    20 public : const Tpacket_t          _packet_id    ;
     20public : const uint32_t           _packet_id    ;
    2121public : const Toperation_t       _operation    ;
    2222public : const Ttype_t            _type         ;
     
    4040                              Tcontext_t         front_end_id ,
    4141                              Tcontext_t         ooo_engine_id,
    42                               Tpacket_t          packet_id    ,
     42                              uint32_t           packet_id    ,
    4343                              Toperation_t       operation    ,
    4444                              Ttype_t            type         ,
     
    356356  transaction_in.push_back(execute_transaction(_param,0,0,0, 99,OPERATION_FIND_L_FL1     ,TYPE_FIND,0,0         ,0x80000000,0x0       ,0              ,1,63,32         ,0,15,FLAG_CY        ,EXCEPTION_NONE     ,0));
    357357
    358 //   transaction_in.push_back(execute_transaction(_param,0,0,0,100,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x12344321,0x1       ,0              ,1,63,0x12344320,1,15,0              ,EXCEPTION_NONE     ,0));
    359 //   transaction_in.push_back(execute_transaction(_param,0,0,0,101,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x12345678,0xffffffff,0              ,1,56,0x12345679,1,3 ,0              ,EXCEPTION_NONE     ,0));
    360 //   transaction_in.push_back(execute_transaction(_param,0,0,0,102,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x12345678,0x12345678,0              ,1,56,0x0       ,1,3 ,0              ,EXCEPTION_NONE     ,0));
    361 //   transaction_in.push_back(execute_transaction(_param,0,0,0,103,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x0       ,0x0       ,0              ,1,56,0x0       ,1,3 ,0              ,EXCEPTION_NONE     ,0));
    362 //   transaction_in.push_back(execute_transaction(_param,0,0,0,104,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x70000000,0x90000000,0              ,1,56,0x0       ,1,3 ,FLAG_CY        ,EXCEPTION_NONE     ,0));
    363 //   transaction_in.push_back(execute_transaction(_param,0,0,0,105,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x80001000,0x80000000,0              ,1,1 ,0x1000    ,1,0 ,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
    364 //   transaction_in.push_back(execute_transaction(_param,0,0,0,106,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x00000001,0x7fffffff,FLAG_CY|FLAG_OV,1,1 ,0x80000000,1,0 ,        FLAG_OV,EXCEPTION_ALU_RANGE,0));
     358  transaction_in.push_back(execute_transaction(_param,0,0,0,100,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x12344321,0x1       ,0              ,1,63,0x12344320,1,15,0              ,EXCEPTION_NONE     ,0));
     359  transaction_in.push_back(execute_transaction(_param,0,0,0,101,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x12345678,0xffffffff,0              ,1,56,0x12345679,1,3 ,0              ,EXCEPTION_NONE     ,0));
     360  transaction_in.push_back(execute_transaction(_param,0,0,0,102,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x12345678,0x12345678,0              ,1,56,0x0       ,1,3 ,0              ,EXCEPTION_NONE     ,0));
     361  transaction_in.push_back(execute_transaction(_param,0,0,0,103,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x0       ,0x0       ,0              ,1,56,0x0       ,1,3 ,0              ,EXCEPTION_NONE     ,0));
     362  transaction_in.push_back(execute_transaction(_param,0,0,0,104,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x70000000,0x90000000,0              ,1,56,0xe0000000,1,3 ,        FLAG_OV,EXCEPTION_ALU_RANGE,0));
     363  transaction_in.push_back(execute_transaction(_param,0,0,0,105,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x80001000,0x80000000,0              ,1,1 ,0x1000    ,1,0 ,        FLAG_OV,EXCEPTION_ALU_RANGE,0));
     364  transaction_in.push_back(execute_transaction(_param,0,0,0,106,OPERATION_ALU_L_SUB     ,TYPE_ALU,0,0         ,0x00000001,0x7fffffff,FLAG_CY|FLAG_OV,1,1 ,0x80000002,1,0 ,FLAG_CY        ,EXCEPTION_NONE     ,0));
    365365
    366366  transaction_in.push_back(execute_transaction(_param,0,0,0,120,OPERATION_TEST_L_SFEQ    ,TYPE_TEST,0,0         ,0xdead    ,0xdead    ,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // + == +
     
    440440  transaction_in.push_back(execute_transaction(_param,0,0,0,232,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0x21071981,0x25071959,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // + <  +
    441441  transaction_in.push_back(execute_transaction(_param,0,0,0,233,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbeef,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - == -
    442   transaction_in.push_back(execute_transaction(_param,0,0,0,234,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,FLAG_F         ,EXCEPTION_NONE     ,0)); // - >  -
     442  transaction_in.push_back(execute_transaction(_param,0,0,0,234,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbabe,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - >  -
    443443  transaction_in.push_back(execute_transaction(_param,0,0,0,235,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0xdeadbabe,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - <  -
    444444  transaction_in.push_back(execute_transaction(_param,0,0,0,236,OPERATION_TEST_L_SFGES   ,TYPE_TEST,0,0         ,0xdeadbeef,0x21524111,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // - == + (in unsigned)
     
    569569  transaction_in.push_back(execute_transaction(_param,0,0,0,628,OPERATION_SPECIAL_L_MFSPR   ,TYPE_SPECIAL,1,GROUP_CUSTOM_7<<11, 0,0x0       ,0              ,1,63,0xa       ,0, 0,0              ,EXCEPTION_ALU_NONE                   ,0,(GROUP_CUSTOM_7<<11)|0));
    570570
     571  transaction_in.push_back(execute_transaction(_param,0,0,0,700,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x00000001,0x00000001,0              ,1,63,0x00000001,1,15,0              ,EXCEPTION_NONE     ,0));
     572  transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x00002107,0x00001981,0              ,1,63,0x034a5387,1,15,0              ,EXCEPTION_NONE     ,0));
     573  transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x00048698,0x0000dead,0              ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
     574  transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x40000000,0x00000002,0              ,1,63,0x80000000,1,15,        FLAG_OV,EXCEPTION_ALU_RANGE,0));
     575  transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MUL     ,TYPE_MUL,0,0         ,0x40000000,0x00000004,0              ,1,63,0x00000000,1,15,FLAG_CY        ,EXCEPTION_NONE     ,0));
     576
     577  transaction_in.push_back(execute_transaction(_param,0,0,0,700,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00000001,0x00000001,0              ,1,63,0x00000001,1,15,0              ,EXCEPTION_NONE     ,0));
     578  transaction_in.push_back(execute_transaction(_param,0,0,0,701,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00002107,0x00001981,0              ,1,63,0x034a5387,1,15,0              ,EXCEPTION_NONE     ,0));
     579  transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x00048698,0x0000dead,0              ,1,63,0xefc6c4b8,1,15,FLAG_CY|FLAG_OV,EXCEPTION_ALU_RANGE,0));
     580  transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x40000000,0x00000002,0              ,1,63,0x80000000,1,15,        FLAG_OV,EXCEPTION_ALU_RANGE,0));
     581  transaction_in.push_back(execute_transaction(_param,0,0,0,702,OPERATION_MUL_L_MULU    ,TYPE_MUL,0,0         ,0x40000000,0x00000004,0              ,1,63,0x00000000,1,15,FLAG_CY        ,EXCEPTION_NONE     ,0));
     582
     583
     584
    571585  LABEL("Reset");
    572586  in_NRESET.write(0);
     
    585599
    586600      LABEL("Iteration %d",iteration);
    587 
     601     
    588602      while (nb_transaction_out > 0)
    589         {
     603      {
    590604          Tcontrol_t val = ((rand()%100) < percent_transaction_execute_in) and not transaction_in.empty();
    591605          in_EXECUTE_IN_VAL .write(val);
     
    601615              in_EXECUTE_IN_OOO_ENGINE_ID .write(transaction_in.front()._ooo_engine_id);
    602616              if (_param->_have_port_rob_ptr)
    603               in_EXECUTE_IN_PACKET_ID     .write(transaction_in.front()._packet_id    );
     617              in_EXECUTE_IN_PACKET_ID     .write(static_cast<Tpacket_t>(transaction_in.front()._packet_id));
    604618              in_EXECUTE_IN_OPERATION     .write(transaction_in.front()._operation    );
    605619              in_EXECUTE_IN_TYPE          .write(transaction_in.front()._type         );
     
    624638              // TEST
    625639              if (_param->_have_port_rob_ptr)
    626               TEST(Tpacket_t         , out_EXECUTE_OUT_PACKET_ID    .read(), transaction_out.front()._packet_id    );
     640              TEST(Tpacket_t         , out_EXECUTE_OUT_PACKET_ID    .read(), static_cast<Tpacket_t>(transaction_out.front()._packet_id    ));
    627641              if (_param->_have_port_context_id)
    628642              TEST(Tcontext_t        , out_EXECUTE_OUT_CONTEXT_ID   .read(), transaction_out.front()._context_id   );
     
    649663                  TEST(Tgeneral_data_t   , out_EXECUTE_OUT_DATA_RD      .read(), transaction_out.front()._data_rd      );
    650664                  TEST(Tgeneral_data_t   , out_EXECUTE_OUT_ADDRESS      .read(), transaction_out.front()._address      );
    651                   break;
    652665                }
    653666
     
    659672                  TEST(Tgeneral_data_t   , out_EXECUTE_OUT_DATA_RD      .read(), transaction_out.front()._data_rd      );
    660673                  TEST(Tgeneral_data_t   , out_EXECUTE_OUT_ADDRESS      .read(), transaction_out.front()._address      );
    661                   break;
    662674                }
    663675             
     
    685697
    686698          SC_START(1);
    687         }
     699      }
    688700
    689701    }
     702
    690703  /********************************************************
    691704   * Simulation - End
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp

    r97 r101  
    174174     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_ADDC        ]._latence > 0)
    175175       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_ADDC        ] = &(operation_l_addc    );
    176 //   if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_SUB         ]._latence > 0)
    177 //     _function_execute[TYPE_ALU    ][OPERATION_ALU_L_SUB         ] = &(operation_l_sub     );
     176     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_SUB         ]._latence > 0)
     177       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_SUB         ] = &(operation_l_sub     );
    178178     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_AND         ]._latence > 0)
    179179       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_AND         ] = &(operation_l_and     );
     
    214214     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFNE       ]._latence > 0)
    215215       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFNE       ] = &(operation_l_sfne    );
    216 //   if (_param->_timing[TYPE_MUL    ][OPERATION_MUL_L_MUL         ]._latence > 0)
    217 //     _function_execute[TYPE_MUL    ][OPERATION_MUL_L_MUL         ] = &(operation_l_mul     );
    218 //   if (_param->_timing[TYPE_MUL    ][OPERATION_MUL_L_MULU        ]._latence > 0)
    219 //     _function_execute[TYPE_DIV    ][OPERATION_MUL_L_MULU        ] = &(operation_l_mulu    );
    220 //   if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIV         ]._latence > 0)
    221 //     _function_execute[TYPE_DIV    ][OPERATION_DIV_L_DIV         ] = &(operation_l_div     );
    222 //   if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIVU        ]._latence > 0)
    223 //     _function_execute[TYPE_DIV    ][OPERATION_DIV_L_DIVU        ] = &(operation_l_divu    );
     216     if (_param->_timing[TYPE_MUL    ][OPERATION_MUL_L_MUL         ]._latence > 0)
     217       _function_execute[TYPE_MUL    ][OPERATION_MUL_L_MUL         ] = &(operation_l_mul     );
     218     if (_param->_timing[TYPE_MUL    ][OPERATION_MUL_L_MULU        ]._latence > 0)
     219       _function_execute[TYPE_MUL    ][OPERATION_MUL_L_MULU        ] = &(operation_l_mulu    );
     220     if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIV         ]._latence > 0)
     221       _function_execute[TYPE_DIV    ][OPERATION_DIV_L_DIV         ] = &(operation_l_div     );
     222     if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIVU        ]._latence > 0)
     223       _function_execute[TYPE_DIV    ][OPERATION_DIV_L_DIVU        ] = &(operation_l_divu    );
    224224     if (_param->_timing[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ]._latence > 0)
    225225       _function_execute[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ] = &(operation_l_extend_s);
Note: See TracChangeset for help on using the changeset viewer.