Changeset 141
- Timestamp:
- Aug 2, 2010, 8:56:05 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h
r139 r141 56 56 #ifdef STATISTICS 57 57 public : Stat * _stat; 58 public : counter _t * _stat_sum_inst_decod;58 public : counters_t * _stat_nb_inst_decod; 59 59 #endif 60 60 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_statistics_allocation.cpp
r110 r141 28 28 param_statistics); 29 29 30 _stat_ sum_inst_decod = _stat->create_variable("sum_inst_decod");31 32 33 _stat->create_expr_average_by_cycle ("average_nb_inst_decod","sum_inst_decod","","Average of decod instruction by cycle");34 _stat->create_expr_percent ("percent_nb_inst_decod","average_nb_inst_decod", toString(_param->_nb_inst_decod), "Percent of decod instruction by cycle");30 _stat_nb_inst_decod = _stat->create_counters("nb_inst_decod",_param->_nb_inst_decod,"", 31 _("Cycle number with %d decoded instruction(s)."), 32 _("Percent of cycle number with %d decoded instruction(s)."), 33 _("Average of decoded instructions.") 34 ); 35 35 36 36 log_printf(FUNC,Decod,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_transition.cpp
r139 r141 53 53 #ifdef STATISTICS 54 54 if (usage_is_set(_usage,USE_STATISTICS)) 55 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 56 if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i])) 57 (*_stat_sum_inst_decod) ++; 55 { 56 uint32_t stat_nb_inst_decod = 0; 57 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 58 if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i])) 59 stat_nb_inst_decod ++; 60 (*_stat_nb_inst_decod) += stat_nb_inst_decod; 61 } 58 62 #endif 59 63 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h
r136 r141 55 55 private : counter_t * _sum_use_queue_error_wait_rsp; 56 56 57 private : counter_t * _sum_inst_enable;58 57 private : counter_t * _sum_transaction_address; 59 58 60 private : counter_t * _average_occupation_bundle; 59 private : counters_t * _stat_nb_inst_fetch; 60 61 61 #endif 62 62 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_full_assoc_transition.cpp
r136 r141 51 51 // =====[ ADDRESS ]========================================== 52 52 // ========================================================== 53 #ifdef STATISTICS 54 uint32_t stat_nb_inst_fetch=0; 55 #endif 56 53 57 if (PORT_READ(in_ADDRESS_VAL) and internal_ADDRESS_ACK) 54 58 { … … 70 74 Tcontrol_t enable = PORT_READ(in_ADDRESS_INSTRUCTION_ENABLE [i]); 71 75 #ifdef STATISTICS 72 if (usage_is_set(_usage,USE_STATISTICS)) 73 (*_sum_inst_enable) += enable; 76 stat_nb_inst_fetch+=enable; 74 77 #endif 75 78 _queue[reg_PTR_WRITE]->_instruction_enable [i] = enable; … … 83 86 reg_PTR_WRITE = (reg_PTR_WRITE+1)%_param->_size_queue; 84 87 } 88 89 #ifdef STATISTICS 90 if (usage_is_set(_usage,USE_STATISTICS)) 91 (*_stat_nb_inst_fetch)+=stat_nb_inst_fetch; 92 #endif 93 85 94 86 95 // ========================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_no_assoc_transition.cpp
r136 r141 51 51 // =====[ ADDRESS ]========================================== 52 52 // ========================================================== 53 #ifdef STATISTICS 54 uint32_t stat_nb_inst_fetch=0; 55 #endif 56 53 57 if (PORT_READ(in_ADDRESS_VAL) and internal_ADDRESS_ACK) 54 58 { … … 70 74 Tcontrol_t enable = PORT_READ(in_ADDRESS_INSTRUCTION_ENABLE [i]); 71 75 #ifdef STATISTICS 72 if (usage_is_set(_usage,USE_STATISTICS)) 73 (*_sum_inst_enable) += enable; 76 stat_nb_inst_fetch += enable; 74 77 #endif 75 78 _queue[reg_PTR_WRITE]->_instruction_enable [i] = enable; … … 83 86 reg_PTR_WRITE = (reg_PTR_WRITE+1)%_param->_size_queue; 84 87 } 88 #ifdef STATISTICS 89 if (usage_is_set(_usage,USE_STATISTICS)) 90 (*_stat_nb_inst_fetch) += stat_nb_inst_fetch; 91 #endif 85 92 86 93 // ========================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_statistics_allocation.cpp
r110 r141 34 34 _sum_use_queue_have_rsp = _stat->create_variable("sum_use_queue_have_rsp"); 35 35 _sum_use_queue_error_wait_rsp = _stat->create_variable("sum_use_queue_error_wait_rsp"); 36 _sum_inst_enable = _stat->create_variable("sum_inst_enable");37 36 38 _average_occupation_bundle = _stat->create_counter ("average_occupation_bundle", "", "Occupation average of instruction's bundle.");39 40 _stat->create_expr ("average_occupation_bundle" ,"/ sum_inst_enable sum_transaction_address");41 _stat->create_expr_percent ("percent_occupation_bundle" ,"average_occupation_bundle", toString(_param->_nb_instruction),"Percent of instruction's bundle occupation.");42 37 _stat->create_expr ("sum_use_queue" ,"+ + sum_use_queue_wait_rsp sum_use_queue_have_rsp sum_use_queue_error_wait_rsp"); 43 38 _stat->create_expr_average_by_cycle("average_use_queue" ,"sum_use_queue" ,"","Average occupation of ifetch queue"); … … 48 43 49 44 _stat->create_expr_average ("average_miss_icache" ,"+ sum_use_queue_wait_rsp sum_use_queue_error_wait_rsp", "sum_transaction_address", "", "Average Miss Instruction Cache"); 45 46 _stat_nb_inst_fetch = _stat->create_counters("nb_inst_fetch",_param->_nb_instruction,"", 47 _("Number bundle with %d instruction(s)."), 48 _("Percent of bundle with %d instruction(s)."), 49 _("Average instruction in a bundle.") 50 ); 50 51 51 52 log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r139 r141 55 55 #ifdef STATISTICS 56 56 public : Stat * _stat; 57 public : counter_t ** _stat_nb_inst_insert ;//[nb_rename_unit] 58 public : counter_t ** _stat_nb_inst_retire ;//[nb_rename_unit] 59 public : counter_t * _stat_nb_inst_commit ; 57 58 public : counters_t ** _stat_nb_inst_insert ;//[nb_rename_unit] 59 public : counters_t ** _stat_nb_inst_retire ;//[nb_rename_unit] 60 public : counters_t ** _stat_nb_inst_commit ;//[nb_rename_unit] 61 60 62 public : counter_t * _stat_nb_inst_commit_conflit_access; 61 63 public : counter_t ** _stat_nb_inst_retire_ok ;//[nb_thread] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
r137 r141 48 48 } 49 49 50 _stat_nb_inst_insert = new counter_t * [_param->_nb_rename_unit];51 _stat_nb_inst_retire = new counter_t * [_param->_nb_rename_unit];52 50 _stat_nb_inst_retire_ok = new counter_t * [_param->_nb_thread]; 53 51 _stat_nb_inst_retire_ko = new counter_t * [_param->_nb_thread]; … … 55 53 _stat_nb_inst_type = new counter_t * [_param->_nb_type]; 56 54 _stat_bank_nb_inst = new counter_t * [_param->_nb_bank]; 57 58 {59 std::string sum_nb_inst_insert = "0";60 std::string sum_nb_inst_retire = "0";61 62 for (uint32_t i=0; i<_param->_nb_rename_unit; i++)63 {64 _stat_nb_inst_insert [i] = _stat->create_variable("nb_inst_insert_" +toString(i));65 _stat_nb_inst_retire [i] = _stat->create_variable("nb_inst_retire_" +toString(i));66 67 _stat->create_expr_average_by_cycle("average_use_interface_insert_"+toString(i), "nb_inst_insert_"+toString(i), "", toString(_("Average instruction by cycle on insert interface (rename_unit %d)"),i));68 _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), "nb_inst_retire_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i));69 _stat->create_expr_percent ("percent_use_interface_insert_"+toString(i) , "average_use_interface_insert_"+toString(i), toString(_param->_nb_inst_insert [i]), toString(_("Percent usage of insert interface (rename_unit %d)"),i));70 _stat->create_expr_percent ("percent_use_interface_retire_"+toString(i) , "average_use_interface_retire_"+toString(i), toString(_param->_nb_inst_retire [i]), toString(_("Percent usage of retire interface (rename_unit %d)"),i));71 72 sum_nb_inst_insert = "+ nb_inst_insert_"+ toString(i) + " " +sum_nb_inst_insert;73 sum_nb_inst_retire = "+ nb_inst_retire_"+ toString(i) + " " +sum_nb_inst_retire;74 }75 76 _stat->create_expr_average_by_cycle("average_inst_insert" , sum_nb_inst_insert , "", _("Average instruction insert by cycle"));77 _stat->create_expr_average_by_cycle("average_inst_retire" , sum_nb_inst_retire , "", _("Average instruction retire by cycle"));78 }79 55 80 56 { … … 163 139 } 164 140 } 165 166 _stat_nb_inst_commit = _stat->create_variable("nb_inst_commit");167 _stat->create_expr_average_by_cycle("average_use_interface_commit","nb_inst_commit", "", _("Average instruction by cycle on commit interface"));168 _stat->create_expr_percent ("percent_use_interface_commit", "average_use_interface_commit", toString(_param->_nb_inst_commit), _("Percent usage of commit interface"));169 170 _stat_nb_inst_commit_conflit_access = _stat->create_variable("nb_inst_commit_conflit_access");171 _stat->create_expr_average_by_cycle("average_use_interface_commit_conflit_access","nb_inst_commit_conflit_access", "", _("Average access conflit by cycle on commit interface"));172 _stat->create_expr_percent ("percent_use_interface_commit_conflit_access","average_use_interface_commit_conflit_access", "average_use_interface_commit", _("Percent access conflit on commit interface"));173 141 174 142 // bank/queue occupation … … 192 160 } 193 161 162 _stat_nb_inst_insert = new counters_t * [_param->_nb_rename_unit]; 163 _stat_nb_inst_retire = new counters_t * [_param->_nb_rename_unit]; 164 _stat_nb_inst_commit = new counters_t * [_param->_nb_rename_unit]; 165 166 std::string average_nb_inst_commit = "0"; 167 168 for (uint32_t i=0; i<_param->_nb_rename_unit; i++) 169 { 170 _stat_nb_inst_insert [i] = _stat->create_counters("nb_inst_insert_"+toString(i),_param->_nb_inst_insert[i],"", 171 _("Cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i), 172 _("Percent of cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i), 173 _("Average of instruction(s) included ")+toString(_("(rename_unit %d)."),i) 174 ); 175 176 _stat_nb_inst_retire [i] = _stat->create_counters("nb_inst_retire_"+toString(i),_param->_nb_inst_retire[i],"", 177 _("Cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i), 178 _("Percent of cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i), 179 _("Average of instruction(s) removed ")+toString(_("(rename_unit %d)."),i) 180 ); 181 182 _stat_nb_inst_commit [i] = _stat->create_counters("nb_inst_commit_"+toString(i),_param->_nb_inst_commit,"", 183 _("Cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i), 184 _("Percent of cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i), 185 _("Average of instruction(s) commited "+toString(_("(rename_unit %d)."),i)) 186 ); 187 188 average_nb_inst_commit = "+ average_nb_inst_commit_"+toString(i) + " " + average_nb_inst_commit; 189 } 190 191 _stat_nb_inst_commit_conflit_access = _stat->create_variable("nb_inst_commit_conflit_access"); 192 _stat->create_expr_average_by_cycle("average_use_interface_commit_conflit_access","nb_inst_commit_conflit_access", "", _("Average access conflit by cycle on commit interface")); 193 _stat->create_expr_percent ("percent_use_interface_commit_conflit_access","average_use_interface_commit_conflit_access", average_nb_inst_commit, _("Percent access conflit on commit interface")); 194 194 195 195 log_end(Commit_unit,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp
r137 r141 27 27 delete _stat; 28 28 29 delete [] _stat_nb_inst_insert;30 delete [] _stat_nb_inst_retire;31 29 delete [] _stat_nb_inst_retire_ok; 32 30 delete [] _stat_nb_inst_retire_ko; … … 40 38 delete [] _stat_nb_cycle_state_wait_end ; 41 39 42 40 delete [] _stat_nb_inst_insert; 41 delete [] _stat_nb_inst_retire; 42 delete [] _stat_nb_inst_commit; 43 43 44 log_end(Commit_unit,FUNCTION); 44 45 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r139 r141 89 89 else 90 90 { 91 #ifdef STATISTICS 92 uint32_t stat_nb_inst_insert [_param->_nb_rename_unit]; 93 uint32_t stat_nb_inst_retire [_param->_nb_rename_unit]; 94 uint32_t stat_nb_inst_commit [_param->_nb_rename_unit]; 95 96 if (usage_is_set(_usage,USE_STATISTICS)) 97 for (uint32_t i=0; i<_param->_nb_rename_unit; ++i) 98 { 99 stat_nb_inst_insert [i] = 0; 100 stat_nb_inst_retire [i] = 0; 101 stat_nb_inst_commit [i] = 0; 102 } 103 #endif 104 91 105 // Increase number idle cycle 92 106 for (uint32_t i=0; i<_param->_nb_front_end; i++) … … 354 368 #ifdef STATISTICS 355 369 if (usage_is_set(_usage,USE_STATISTICS)) 356 (*_stat_nb_inst_insert [x])++;370 stat_nb_inst_insert [x] ++; 357 371 #endif 358 372 … … 433 447 { 434 448 log_printf(TRACE,Commit_unit,FUNCTION," * COMMIT [%d]",x); 449 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank : %d",i); 450 451 // find the good entry !!! 452 entry_t * entry = internal_BANK_COMMIT_ENTRY [i][j]; 435 453 436 454 #ifdef STATISTICS 437 455 if (usage_is_set(_usage,USE_STATISTICS)) 438 (*_stat_nb_inst_commit)++;456 stat_nb_inst_commit [entry->rename_unit_id] ++; 439 457 #endif 440 441 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank : %d",i);442 443 // find the good entry !!!444 entry_t * entry = internal_BANK_COMMIT_ENTRY [i][j];445 458 446 459 log_printf(TRACE,Commit_unit,FUNCTION," * ptr : %d",entry->ptr); … … 720 733 #ifdef STATISTICS 721 734 if (usage_is_set(_usage,USE_STATISTICS)) 722 (*_stat_nb_inst_retire [x])++;735 stat_nb_inst_retire [x] ++; 723 736 #endif 724 737 … … 1290 1303 } 1291 1304 } 1305 1306 for (uint32_t i=0; i<_param->_nb_rename_unit; ++i) 1307 { 1308 (*_stat_nb_inst_insert [i]) += stat_nb_inst_insert [i]; 1309 (*_stat_nb_inst_retire [i]) += stat_nb_inst_retire [i]; 1310 (*_stat_nb_inst_commit [i]) += stat_nb_inst_commit [i]; 1311 } 1292 1312 } 1293 1313 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp
r138 r141 23 23 if (_param->_nb_port_read>0) 24 24 _stat_port_read = _stat->create_counters("port_read",_param->_nb_port_read,"", 25 _(" Usage of read port %d."),26 _("Percent of usage read port %d."),27 _("Average of usage read port.")25 _("Cycle number cycle with %d read(s)."), 26 _("Percent of cycle number cycle with %d read(s)."), 27 _("Average of read per cycle.") 28 28 ); 29 29 30 30 if (_param->_nb_port_write>0) 31 31 _stat_port_write = _stat->create_counters("port_write",_param->_nb_port_write,"", 32 _(" Usage of write port %d."),33 _("Percent of usage write port %d."),34 _("Average of usage write port.")32 _("Cycle number cycle with %d write(s)."), 33 _("Percent of cycle number cycle with %d write(s)."), 34 _("Average of write per cycle.") 35 35 ); 36 36 if (_param->_nb_port_read_write>0) 37 37 _stat_port_read_write = _stat->create_counters("port_read_write",_param->_nb_port_read_write,"", 38 _(" Usage of read_write port."),39 _("Percent of usage read_write port %d."),40 _("Average of usage read_write port.")38 _("Cycle number cycle with %d read_write(s)."), 39 _("Percent of cycle number cycle with %d read_write(s)."), 40 _("Average of read_write per cycle.") 41 41 ); 42 42 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Operation.h
r88 r141 12 12 namespace behavioural { 13 13 14 #define neg(size,data) (~(data)+1) 15 #define sign(size,data) ((data)>>(size-1)) 16 #define unsigned(size,data) (data) 17 #define signed(size,data) ((sign(size,data)==0)?(data):neg(size,data)) 18 #define ovf(size,op1, op2, res) ((sign(size,op1) == sign(size,op2))?(sign(size,op1) xor sign(size,res)):0) 19 #define carry(size,op1, op2, res) (((res)<(op1)) or ((res)<(op2))) 20 #define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag))) 21 #define get_flag(data,flag) (((data)&(flag))!=0) 22 #define concatenation_bool(a,b) (((a)<<1) | (b)) 14 # define neg( size,data) (~(data)+1) 15 # define sign( size,data) ((data)>>(size-1)) 16 # define unsigned(size,data) (data) 17 # define signed( size,data) ((sign(size,data)==0)?(data):neg(size,data)) 18 //#define ovf( size,op1, op2, c_in) ((op2^(op1+op2+c_in))&~(op1^op2))>>(size-1); 19 # define ovf( size,op1, op2, res) ((sign(size,op1) == sign(size,op2))?(sign(size,op1) xor sign(size,res)):0) 20 # define carry( size,op1, op2, res) (((res)<(op1)) or ((res)<(op2))) 21 # define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag))) 22 # define get_flag(data,flag) (((data)&(flag))!=0) 23 # define concatenation_bool(a,b) (((a)<<1) | (b)) 23 24 24 25 }; // end namespace behavioural -
trunk/Platforms/Test/data/debug/debug.cfg
r139 r141 2 2 ${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Files/Morpheo.gen 3 3 ${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Files/debug.cfg 4 ${MORPHEO_TOPLEVEL}/Softwares/Test/Test_0 09/bin/soft_NEWLIB_MORPHEO.x4 ${MORPHEO_TOPLEVEL}/Softwares/Test/Test_074/bin/soft_NEWLIB_MORPHEO.x 5 5 0 6 6 0 -
trunk/Softwares/Test/Test_010/src/sys/crt0.s
r101 r141 37 37 _start: 38 38 /* 39 A (r1) B (r2) - D (r3 wait)CY OV (SR = r6, mask SR = r5) 40 (r4) (r7) 41 1) 0x00000000 0x00000000 - 0x00000000 0 0 42 2) 0x14011959 0x25071959 - 0x390832b2 0 0 43 3) 0xebfee6a7 0xdaf8e6a7 - 0xc6f7cd4e 1 0 44 4) 0xebfee6a7 0x25071959 - 0x11060001 1 0 45 5) 0x14011959 0xdaf8e6a7 - 0xeefa0001 0 0 46 6) 0x87654321 0xabcdef01 - 0x33333222 1 1 47 7) 0x789abcde 0x08765432 - 0x81111111 0 1 48 */ 39 A (r1) B (r2) CY - D (r3 wait)CY OV (SR = r6, mask SR = r5) 40 (r4) (r7) 41 1) 0x00000000 0x00000000 0 - 0x00000000 0 0 42 0x00000000 0x00000000 1 - 0x00000001 0 0 43 2) 0x14011959 0x25071959 0 - 0x390832b2 0 0 44 0x14011959 0x25071959 1 - 0x390832b3 0 0 45 3) 0xebfee6a7 0xdaf8e6a7 0 - 0xc6f7cd4e 1 0 46 0xebfee6a7 0xdaf8e6a7 1 - 0xc6f7cd4f 1 0 47 4) 0xebfee6a7 0x25071959 0 - 0x11060000 1 0 48 0xebfee6a7 0x25071959 1 - 0x11060001 1 0 49 5) 0x14011959 0xdaf8e6a7 0 - 0xeefa0000 0 0 50 0x14011959 0xdaf8e6a7 1 - 0xeefa0001 0 0 51 6) 0x87654321 0xabcdef01 0 - 0x33333222 1 1 52 0x87654321 0xabcdef01 1 - 0x33333223 1 1 53 7) 0x789abcde 0x08765432 0 - 0x81111110 0 1 54 0x789abcde 0x08765432 1 - 0x81111111 0 1 55 8) 0xffffffff 0x00000000 0 - 0xffffffff 0 0 56 0xffffffff 0x00000000 1 - 0x00000000 1 0 57 9) 0x7fffffff 0x00000000 0 - 0x7fffffff 0 0 58 0x7fffffff 0x00000000 1 - 0x80000000 0 1 59 60 */ 49 61 50 62 /* Mask to read OV (SR[11]), CY (SR[10]) and not F (SR[9]) */ 51 63 l.movhi r5, hi(0x00000c00) 52 64 l.ori r5, r5, lo(0x00000c00) 65 l.movhi r8, hi(0x80000000) 66 l.ori r8, r8, lo(0x80000000) 53 67 54 68 /**********/ 55 69 /* Test 1 */ 56 70 /**********/ 71 l.add r0,r0,r0 /* unset carry */ 57 72 l.movhi r1, hi(0x00000000) /* RA */ 58 73 l.ori r1, r1, lo(0x00000000) … … 79 94 l.nop 80 95 96 l.add r0,r8,r8 /* set carry */ 97 l.movhi r3, hi(0x00000001) /* RD wait */ 98 l.ori r3, r3, lo(0x00000001) 99 l.movhi r6, hi(0x00000000) /* SR wait */ 100 l.ori r6, r6, lo(0x00000000) 101 102 l.addc r4, r1, r2 103 104 /* Test flag */ 105 l.mfspr r7, r0, 17 106 l.and r7, r7, r5 107 108 l.sfeq r6, r7 109 l.bnf _end_ko 110 l.nop 111 112 /* Test result */ 113 l.sfeq r3, r4 114 l.bnf _end_ko 115 l.nop 116 81 117 /**********/ 82 118 /* Test 2 */ 83 119 /**********/ 120 l.add r0,r0,r0 /* unset carry */ 84 121 l.movhi r1, hi(0x14011959) /* RA */ 85 122 l.ori r1, r1, lo(0x14011959) … … 106 143 l.nop 107 144 145 l.add r0,r8,r8 /* set carry */ 146 l.movhi r3, hi(0x390832b3) /* RD wait */ 147 l.ori r3, r3, lo(0x390832b3) 148 l.movhi r6, hi(0x00000000) /* SR wait */ 149 l.ori r6, r6, lo(0x00000000) 150 151 l.addc r4, r1, r2 152 153 /* Test flag */ 154 l.mfspr r7, r0, 17 155 l.and r7, r7, r5 156 157 l.sfeq r6, r7 158 l.bnf _end_ko 159 l.nop 160 161 /* Test result */ 162 l.sfeq r3, r4 163 l.bnf _end_ko 164 l.nop 165 108 166 /**********/ 109 167 /* Test 3 */ 110 168 /**********/ 169 l.add r0,r0,r0 /* unset carry */ 111 170 l.movhi r1, hi(0xebfee6a7) /* RA */ 112 171 l.ori r1, r1, lo(0xebfee6a7) … … 133 192 l.nop 134 193 194 l.add r0,r8,r8 /* set carry */ 195 l.movhi r3, hi(0xc6f7cd4f) /* RD wait */ 196 l.ori r3, r3, lo(0xc6f7cd4f) 197 l.movhi r6, hi(0x00000400) /* SR wait */ 198 l.ori r6, r6, lo(0x00000400) 199 200 l.addc r4, r1, r2 201 202 /* Test flag */ 203 l.mfspr r7, r0, 17 204 l.and r7, r7, r5 205 206 l.sfeq r6, r7 207 l.bnf _end_ko 208 l.nop 209 210 /* Test result */ 211 l.sfeq r3, r4 212 l.bnf _end_ko 213 l.nop 214 135 215 /**********/ 136 216 /* Test 4 */ 137 217 /**********/ 218 l.add r0,r0,r0 /* unset carry */ 138 219 l.movhi r1, hi(0xebfee6a7) /* RA */ 139 220 l.ori r1, r1, lo(0xebfee6a7) 140 221 l.movhi r2, hi(0x25071959) /* RB */ 141 222 l.ori r2, r2, lo(0x25071959) 223 l.movhi r3, hi(0x11060000) /* RD wait */ 224 l.ori r3, r3, lo(0x11060000) 225 l.movhi r6, hi(0x00000400) /* SR wait */ 226 l.ori r6, r6, lo(0x00000400) 227 228 l.addc r4, r1, r2 229 230 /* Test flag */ 231 l.mfspr r7, r0, 17 232 l.and r7, r7, r5 233 234 l.sfeq r6, r7 235 l.bnf _end_ko 236 l.nop 237 238 /* Test result */ 239 l.sfeq r3, r4 240 l.bnf _end_ko 241 l.nop 242 243 l.add r0,r8,r8 /* set carry */ 142 244 l.movhi r3, hi(0x11060001) /* RD wait */ 143 245 l.ori r3, r3, lo(0x11060001) … … 159 261 l.bnf _end_ko 160 262 l.nop 161 263 162 264 /**********/ 163 265 /* Test 5 */ 164 266 /**********/ 267 l.add r0,r0,r0 /* unset carry */ 165 268 l.movhi r1, hi(0x14011959) /* RA */ 166 269 l.ori r1, r1, lo(0x14011959) 167 270 l.movhi r2, hi(0xdaf8e6a7) /* RB */ 168 271 l.ori r2, r2, lo(0xdaf8e6a7) 272 l.movhi r3, hi(0xeefa0000) /* RD wait */ 273 l.ori r3, r3, lo(0xeefa0000) 274 l.movhi r6, hi(0x00000000) /* SR wait */ 275 l.ori r6, r6, lo(0x00000000) 276 277 l.addc r4, r1, r2 278 279 /* Test flag */ 280 l.mfspr r7, r0, 17 281 l.and r7, r7, r5 282 283 l.sfeq r6, r7 284 l.bnf _end_ko 285 l.nop 286 287 /* Test result */ 288 l.sfeq r3, r4 289 l.bnf _end_ko 290 l.nop 291 292 l.add r0,r8,r8 /* set carry */ 169 293 l.movhi r3, hi(0xeefa0001) /* RD wait */ 170 294 l.ori r3, r3, lo(0xeefa0001) … … 186 310 l.bnf _end_ko 187 311 l.nop 188 312 189 313 /**********/ 190 314 /* Test 6 */ 191 315 /**********/ 316 l.add r0,r0,r0 /* unset carry */ 192 317 l.movhi r1, hi(0x87654321) /* RA */ 193 318 l.ori r1, r1, lo(0x87654321) … … 214 339 l.nop 215 340 341 l.add r0,r8,r8 /* set carry */ 342 l.movhi r3, hi(0x33333223) /* RD wait */ 343 l.ori r3, r3, lo(0x33333223) 344 l.movhi r6, hi(0x00000c00) /* SR wait */ 345 l.ori r6, r6, lo(0x00000c00) 346 347 l.addc r4, r1, r2 348 349 /* Test flag */ 350 l.mfspr r7, r0, 17 351 l.and r7, r7, r5 352 353 l.sfeq r6, r7 354 l.bnf _end_ko 355 l.nop 356 357 /* Test result */ 358 l.sfeq r3, r4 359 l.bnf _end_ko 360 l.nop 361 216 362 /**********/ 217 363 /* Test 7 */ 218 364 /**********/ 365 l.add r0,r0,r0 /* unset carry */ 219 366 l.movhi r1, hi(0x789abcde) /* RA */ 220 367 l.ori r1, r1, lo(0x789abcde) 221 368 l.movhi r2, hi(0x08765432) /* RB */ 222 369 l.ori r2, r2, lo(0x08765432) 370 l.movhi r3, hi(0x81111110) /* RD wait */ 371 l.ori r3, r3, lo(0x81111110) 372 l.movhi r6, hi(0x00000800) /* SR wait */ 373 l.ori r6, r6, lo(0x00000800) 374 375 l.addc r4, r1, r2 376 377 /* Test flag */ 378 l.mfspr r7, r0, 17 379 l.and r7, r7, r5 380 381 l.sfeq r6, r7 382 l.bnf _end_ko 383 l.nop 384 385 /* Test result */ 386 l.sfeq r3, r4 387 l.bnf _end_ko 388 l.nop 389 390 l.add r0,r8,r8 /* unset carry */ 223 391 l.movhi r3, hi(0x81111111) /* RD wait */ 224 392 l.ori r3, r3, lo(0x81111111) … … 242 410 243 411 /**********/ 412 /* Test 8 */ 413 /**********/ 414 l.add r0,r0,r0 /* unset carry */ 415 l.movhi r1, hi(0xffffffff) /* RA */ 416 l.ori r1, r1, lo(0xffffffff) 417 l.movhi r2, hi(0x00000000) /* RB */ 418 l.ori r2, r2, lo(0x00000000) 419 l.movhi r3, hi(0xffffffff) /* RD wait */ 420 l.ori r3, r3, lo(0xffffffff) 421 l.movhi r6, hi(0x00000000) /* SR wait */ 422 l.ori r6, r6, lo(0x00000000) 423 424 l.addc r4, r1, r2 425 426 /* Test flag */ 427 l.mfspr r7, r0, 17 428 l.and r7, r7, r5 429 430 l.sfeq r6, r7 431 l.bnf _end_ko 432 l.nop 433 434 /* Test result */ 435 l.sfeq r3, r4 436 l.bnf _end_ko 437 l.nop 438 439 l.add r0,r8,r8 /* unset carry */ 440 l.movhi r3, hi(0x00000000) /* RD wait */ 441 l.ori r3, r3, lo(0x00000000) 442 l.movhi r6, hi(0x00000400) /* SR wait */ 443 l.ori r6, r6, lo(0x00000400) 444 445 l.addc r4, r1, r2 446 447 /* Test flag */ 448 l.mfspr r7, r0, 17 449 l.and r7, r7, r5 450 451 l.sfeq r6, r7 452 l.bnf _end_ko 453 l.nop 454 455 /* Test result */ 456 l.sfeq r3, r4 457 l.bnf _end_ko 458 l.nop 459 460 /**********/ 461 /* Test 9 */ 462 /**********/ 463 l.add r0,r0,r0 /* unset carry */ 464 l.movhi r1, hi(0x7fffffff) /* RA */ 465 l.ori r1, r1, lo(0x7fffffff) 466 l.movhi r2, hi(0x00000000) /* RB */ 467 l.ori r2, r2, lo(0x00000000) 468 l.movhi r3, hi(0x7fffffff) /* RD wait */ 469 l.ori r3, r3, lo(0x7fffffff) 470 l.movhi r6, hi(0x00000000) /* SR wait */ 471 l.ori r6, r6, lo(0x00000000) 472 473 l.addc r4, r1, r2 474 475 /* Test flag */ 476 l.mfspr r7, r0, 17 477 l.and r7, r7, r5 478 479 l.sfeq r6, r7 480 l.bnf _end_ko 481 l.nop 482 483 /* Test result */ 484 l.sfeq r3, r4 485 l.bnf _end_ko 486 l.nop 487 488 l.add r0,r8,r8 /* unset carry */ 489 l.movhi r3, hi(0x80000000) /* RD wait */ 490 l.ori r3, r3, lo(0x80000000) 491 l.movhi r6, hi(0x00000800) /* SR wait */ 492 l.ori r6, r6, lo(0x00000800) 493 494 l.addc r4, r1, r2 495 496 /* Test flag */ 497 l.mfspr r7, r0, 17 498 l.and r7, r7, r5 499 500 l.sfeq r6, r7 501 l.bnf _end_ko 502 l.nop 503 504 /* Test result */ 505 l.sfeq r3, r4 506 l.bnf _end_ko 507 l.nop 508 509 /**********/ 244 510 /* End */ 245 511 /**********/ -
trunk/Version
r140 r141 1 0 2 14 0Castor 02 08 20101 0 2 141 Castor 02 08 2010
Note: See TracChangeset
for help on using the changeset viewer.