1
00:00:00,180 --> 00:00:07,200
Now will try to utilize the 64 bit global timer that we have in a zinc processing system to perform

2
00:00:07,200 --> 00:00:12,000
the profiling of with the implication that we did utilizing any time or so.

3
00:00:12,270 --> 00:00:17,760
Since this is an internal resource of raising processing system, we do not need to enable or disable

4
00:00:17,760 --> 00:00:18,390
anything, right?

5
00:00:18,660 --> 00:00:25,500
So the fundamental thing processing system block design that we are utilizing from the beginning could

6
00:00:25,500 --> 00:00:26,340
be utilized.

7
00:00:26,490 --> 00:00:29,310
OK to you, the 64 bit global timer.

8
00:00:29,310 --> 00:00:34,770
So this is the block design that we have created utilizing the script, and we just proceed to generate

9
00:00:34,770 --> 00:00:38,610
and still output and create a system out of it, right?

10
00:00:38,640 --> 00:00:44,400
So we'll directly discuss application code that we tried to perform or profiling with the 64 bit time,

11
00:00:44,420 --> 00:00:44,700
right?

12
00:00:44,940 --> 00:00:50,300
The first, the important driver file that you need to include is the extreme I'm the square elder decorator.

13
00:00:50,310 --> 00:00:57,300
This consist of all the APIs, as well as each state that could be used to work around within 64 bit.

14
00:00:57,300 --> 00:00:59,580
Global Times if you just go in the driver.

15
00:00:59,650 --> 00:00:59,970
OK.

16
00:01:00,950 --> 00:01:06,500
So Extreme underscore a lot of weight and access to the 64 bit global counter.

17
00:01:06,530 --> 00:01:06,860
OK.

18
00:01:07,160 --> 00:01:13,490
That is what we're going to utilize, and this counter increases by one degree to brussaux clocks.

19
00:01:13,760 --> 00:01:20,840
This basically means 64 bit of global counter operate at half off dosing frequency, right?

20
00:01:21,230 --> 00:01:24,440
And the mode of operation is up great.

21
00:01:24,480 --> 00:01:25,940
So it increases by.

22
00:01:26,190 --> 00:01:26,440
Great.

23
00:01:26,440 --> 00:01:30,920
So this basically signifies that this will be operating in a moderate.

24
00:01:31,520 --> 00:01:36,820
The leader that is it is extreme, which is basically an unsafe 64bit, right?

25
00:01:37,310 --> 00:01:40,160
And then you have a series of macros, right?

26
00:01:40,160 --> 00:01:41,900
So you have a count per second.

27
00:01:41,900 --> 00:01:49,610
So how you calculate the count per second is you have the access to the CPU clock frequency.

28
00:01:49,610 --> 00:01:52,050
I knew just you eight divided by two, right?

29
00:01:52,100 --> 00:01:57,650
So that that basically mean that global timer is always clocked at top of the CPU frequency rate.

30
00:01:57,650 --> 00:02:04,520
Only thing that we need to understand is how you calculate the nanosecond a microsecond out of a great.

31
00:02:05,670 --> 00:02:08,940
And then you have a gate and sit down function.

32
00:02:08,970 --> 00:02:09,240
Right?

33
00:02:09,480 --> 00:02:15,000
So if you just understand first how we will be calculating the delay, so we know that the frequency

34
00:02:15,000 --> 00:02:19,170
at which are 64 bit global timer operators see fewer frequency by.

35
00:02:19,410 --> 00:02:19,680
Right.

36
00:02:19,680 --> 00:02:24,960
So if you take an inverse of it, that is true by CPU frequency that would basically give us a period

37
00:02:24,960 --> 00:02:25,800
in second rate.

38
00:02:26,080 --> 00:02:30,510
So once we have a period in second to get the period in nanosecond, we just need to multiply by the

39
00:02:30,510 --> 00:02:31,740
fact that often this tonight.

40
00:02:32,040 --> 00:02:37,110
And to get the period in microsecond, we just need to multiply by the factor of 10 to six.

41
00:02:37,140 --> 00:02:41,640
This is how you convert the value from second to nanosecond and microsecond rate.

42
00:02:41,880 --> 00:02:44,640
And this is an algorithm that we are going to implement, right?

43
00:02:44,640 --> 00:02:45,960
So let's go through a quick.

44
00:02:46,890 --> 00:02:52,830
So we declare the next time this is the leader that we need when we are working with the 64 bit global

45
00:02:53,100 --> 00:02:56,110
counter right to, we declared start and end ready, but.

46
00:02:56,430 --> 00:03:00,140
So this is the same application that we provide utilizing NASA timer.

47
00:03:00,180 --> 00:03:04,580
So just before our application, we are capturing the value that we have for us.

48
00:03:05,100 --> 00:03:06,510
Global counter OK.

49
00:03:06,690 --> 00:03:08,010
So that can be done like this.

50
00:03:08,010 --> 00:03:10,560
So it's getting right.

51
00:03:10,710 --> 00:03:13,440
And this just required the.

52
00:03:14,420 --> 00:03:20,930
A pointer to the same variable rate, so this will automatically store the value of a counter in that

53
00:03:20,930 --> 00:03:21,400
variable.

54
00:03:21,440 --> 00:03:24,350
So here we just need to use ampersand and start rate.

55
00:03:24,350 --> 00:03:31,070
So this will automatically store the value of a counter in the variable star at the start of an application

56
00:03:31,070 --> 00:03:34,040
that will allow enough time for our application to execute.

57
00:03:34,310 --> 00:03:35,900
Then we are again submitting the time right.

58
00:03:35,900 --> 00:03:38,610
So again we call getting ampersand and energy right.

59
00:03:38,610 --> 00:03:44,900
So now we have the access to the starting and ending counter value that we have.

60
00:03:46,120 --> 00:03:53,050
As we execute our application, right, so we now know that the counter value before the start of an

61
00:03:53,050 --> 00:03:58,750
application and we also know the value of a counter after we complete an execution of an application

62
00:03:58,750 --> 00:03:58,990
rate.

63
00:03:59,200 --> 00:04:04,740
So we know that in the previous case, when we are utilizing the same zeal in debt profile, we are

64
00:04:04,750 --> 00:04:07,060
getting around two point forty six rating out there.

65
00:04:07,330 --> 00:04:14,020
The timer resolution that we are utilizing is 32 bit, right, but here now we are working at only 64

66
00:04:14,020 --> 00:04:14,990
bit account.

67
00:04:15,340 --> 00:04:21,160
So we are expecting a slightly good accuracy as compared to our 32 bit account rate.

68
00:04:21,490 --> 00:04:24,820
So we first proceed and then we print.

69
00:04:26,180 --> 00:04:27,890
The number of ticks, Rachel.

70
00:04:28,130 --> 00:04:32,240
Number of clock ticks will be simply equal to now, we know that this count, they're operating a lot

71
00:04:32,250 --> 00:04:34,610
more, so we just need to calculate.

72
00:04:34,750 --> 00:04:39,040
OK, so N.G. will have an higher value as compared to start rate.

73
00:04:39,060 --> 00:04:45,560
So we'll be subtracting energy minus start rate and to bring the long, long unsigned value, which

74
00:04:45,560 --> 00:04:53,390
is basically a new 64 bit value we need to use if Wal-Mart specifies L, which basically is equal to

75
00:04:53,390 --> 00:04:54,600
long, long unsigned rate.

76
00:04:54,650 --> 00:05:01,040
So here we are utilizing since zero and this is for Max specify OK.

77
00:05:01,070 --> 00:05:08,000
And then we are printing the value of an minus start right now to calculate the value in a nanosecond.

78
00:05:08,270 --> 00:05:11,810
We know that we need to multiply by the factor of industry.

79
00:05:11,810 --> 00:05:12,050
Nine.

80
00:05:12,050 --> 00:05:16,290
Rachel, If you just analyze an expression, OK, so it will be two.

81
00:05:17,030 --> 00:05:21,430
OK, then turn this to nine and we need to divide by CPU frequency rate.

82
00:05:21,440 --> 00:05:23,120
So this is what we are doing over here.

83
00:05:23,360 --> 00:05:26,740
So and minus Daji Cross.

84
00:05:26,780 --> 00:05:27,140
OK.

85
00:05:27,410 --> 00:05:34,940
So this is basically to do this tonight, and then we are dividing by the clock frequency that we have

86
00:05:34,940 --> 00:05:36,800
for, I think, grassing system, right?

87
00:05:36,800 --> 00:05:39,320
So this is how you calculate the delay nanosecond.

88
00:05:39,650 --> 00:05:42,560
And to calculate the delay in microsecond rate.

89
00:05:43,730 --> 00:05:46,250
We are again performing and minus strategy.

90
00:05:46,290 --> 00:05:52,910
OK, and then we are multiplying to integrate this to six OK, divide by the zinc and frequency rate.

91
00:05:54,050 --> 00:05:57,190
Now remember that we are dividing by some number.

92
00:05:57,560 --> 00:06:00,110
So we are expecting the value to be floating point, right?

93
00:06:00,110 --> 00:06:05,530
So that for that reason, we are utilizing person to up in both cases.

94
00:06:05,750 --> 00:06:09,980
So this is how you perform the profiling using 64 bit global timer.

95
00:06:09,980 --> 00:06:15,530
So let me just compare whether we are getting the same value or a bit more accurate value as compared

96
00:06:15,530 --> 00:06:17,080
to our previous rate.

97
00:06:17,090 --> 00:06:19,940
So first, we proceed to build our application project.

98
00:06:21,050 --> 00:06:26,370
So ones are successful, we proceed and debug as we launch on it.

99
00:06:28,000 --> 00:06:29,810
So let's click on resume to.

100
00:06:31,090 --> 00:06:35,170
So you could see the number of clock ticks that we are consuming is that only fifty seven.

101
00:06:35,590 --> 00:06:40,390
And that basically mean the time elapsed in nanoseconds to fly seven zero.

102
00:06:40,540 --> 00:06:40,900
OK.

103
00:06:40,960 --> 00:06:45,640
And time elapsed in microseconds around 2.5 separate.

104
00:06:45,640 --> 00:06:52,150
So this is a bit more as compared to what we are getting in a previous case when we are utilizing site

105
00:06:52,150 --> 00:06:52,750
that for it.

106
00:06:52,980 --> 00:06:57,310
And this is expected because now we are working with that 64 bit timer, right?

107
00:06:57,310 --> 00:07:00,670
And in the previous case, we are working only with that 32 bit timer.

108
00:07:00,670 --> 00:07:07,300
Right now, you understand the process of how you utilise the 64 bit of global counter that you have

109
00:07:07,300 --> 00:07:09,880
in a zinc glass existing to perform a profiling, right?
