7e7bbb3a |
1 | puts "========" |
2 | puts "OCC25514" |
3 | puts "========" |
4 | puts "" |
5 | ######################################################################################### |
6 | # TKernel, OSD_Timer - do not accumulate error in timer within queries in running state |
7 | ######################################################################################### |
8 | |
9 | # Set number of cycle iteration |
10 | set IterationCount 10000 |
11 | set iCounter 1 |
12 | |
13 | # Set rank of timer's value |
14 | set TimeRank 2 |
15 | |
16 | # Start timers |
17 | dchrono bug_info_1 reset |
18 | dchrono bug_info_2 reset |
19 | dchrono bug_info_1 start |
20 | dchrono bug_info_2 start |
21 | |
22 | # Operation cycle (show only one timer state) |
23 | while {$iCounter != $IterationCount} { |
24 | dchrono bug_info_1 show |
25 | set iCounter [expr {$iCounter + 1}] |
26 | } |
27 | |
28 | # Stop timers |
29 | dchrono bug_info_1 stop |
30 | dchrono bug_info_2 stop |
31 | |
32 | # Get timers value |
33 | set Timer_1 [dchrono bug_info_1 show] |
34 | set Timer_2 [dchrono bug_info_2 show] |
35 | |
36 | # Modify timers value for comparison |
37 | set TimerValue_1 [lindex $Timer_1 6] |
38 | set TimerValue_1 [string range $TimerValue_1 0 [expr {[string first "." $TimerValue_1] + $TimeRank}]] |
39 | set TimerValue_2 [lindex $Timer_2 6] |
40 | set TimerValue_2 [string range $TimerValue_2 0 [expr {[string first "." $TimerValue_2] + $TimeRank}]] |
41 | |
42 | # Comparison of timer's values |
43 | puts "Compare: [lindex $Timer_1 6] vs [lindex $Timer_2 6]" |
44 | if {$TimerValue_1 != $TimerValue_2} { |
45 | puts "ERROR: OCC25514 is reproduced." |
46 | } else { |
47 | puts "OK" |
48 | } |