1
00:00:00,060 --> 00:00:06,220
Now what we are going to do is we will be modifying this, says that we have it or to learn more deliberate

2
00:00:06,220 --> 00:00:11,480
to just delete this, disable OK and then enable over here, right?

3
00:00:12,240 --> 00:00:12,900
So this will.

4
00:00:13,980 --> 00:00:17,060
And be used to enable an hour to reload more great.

5
00:00:17,330 --> 00:00:23,900
And what this do is as soon as our time arejust just was zero, it will automatically load our timer

6
00:00:23,900 --> 00:00:26,540
back to the value that you have specified, right?

7
00:00:26,750 --> 00:00:35,240
So as soon as our timer reaches to zero, it will automatically reload the value timer down onto the

8
00:00:35,360 --> 00:00:38,030
register the counter register of a timer, right?

9
00:00:38,390 --> 00:00:44,030
So to confirm that, OK, so we'll just be increasing this delay a bit because this is printing the

10
00:00:44,030 --> 00:00:47,420
value at very faster rates will add one more zero.

11
00:00:47,450 --> 00:00:49,310
Over here, OK?

12
00:00:49,490 --> 00:00:53,110
And then we'll try to analyze how this code work, right?

13
00:00:53,120 --> 00:01:00,350
So only modification that we did over here is the enable all to reload mode API rate.

14
00:01:01,370 --> 00:01:05,630
This will also be changing to 500 millisecond rate.

15
00:01:05,870 --> 00:01:11,750
So let me just again rebuild our application project, OK, so that we have our new e.l.f.

16
00:01:11,770 --> 00:01:12,050
Five.

17
00:01:13,700 --> 00:01:19,160
OK, so what does Bliss finish, just select a diva configuration and click on relaunch, right?

18
00:01:19,490 --> 00:01:24,320
So this will show us a message that diva configuration is already active, so you just need to.

19
00:01:25,780 --> 00:01:28,220
Click OK to start the new configuration, right?

20
00:01:28,240 --> 00:01:35,410
You can see our pointer is over here and right, this creative is all really connected to a car, but

21
00:01:35,410 --> 00:01:40,570
we just need to clear up unsought and then click on resume button right now if you observe the count

22
00:01:40,570 --> 00:01:41,320
value, right?

23
00:01:41,320 --> 00:01:46,900
So it started at here one five zero zero.

24
00:01:47,830 --> 00:01:51,340
One, six, six, four, three, seven, and then it goes down.

25
00:01:51,370 --> 00:01:57,790
Right, and then we get the timer expired five seconds you and after that, if you try to bring the

26
00:01:57,790 --> 00:01:59,160
value, it is not zero, right?

27
00:01:59,180 --> 00:02:06,400
So this suggests that we then enable or to reload movie evil, to reload our counter to the value that

28
00:02:06,400 --> 00:02:07,240
usable great.

29
00:02:07,240 --> 00:02:09,070
So we just modify this algorithm.

30
00:02:09,070 --> 00:02:16,210
This is not giving much insight right to try to modify this algorithm so that we will do correctly.

31
00:02:18,340 --> 00:02:19,870
Understand all too little more.

32
00:02:19,920 --> 00:02:22,490
Rachel, what are we going to do here is?

33
00:02:22,510 --> 00:02:24,070
OK, so let me just remove.

34
00:02:26,950 --> 00:02:31,880
OK, so we are not interested in printing the value after our timer expired, right?

35
00:02:33,550 --> 00:02:40,030
Now, as soon as our timer expired, what we want to do is we will be let assume first stop the timer

36
00:02:40,030 --> 00:02:42,910
forcefully right over here, right?

37
00:02:42,910 --> 00:02:43,840
And then we.

38
00:02:44,910 --> 00:02:50,220
Bring the statement that timer expired and then we again start our timer operation, right?

39
00:02:51,030 --> 00:02:55,620
So due to a presence of a while one, we'll get what will happen as soon as we complete.

40
00:02:55,620 --> 00:02:58,860
This statement will again be waiting for the timer to expire.

41
00:02:58,940 --> 00:03:02,130
OK, then we get the reveal.

42
00:03:02,130 --> 00:03:03,630
Five second rate again.

43
00:03:03,630 --> 00:03:03,990
Again.

44
00:03:05,040 --> 00:03:11,000
We will be stopping our timer, printing the statement and again restarting our time worried.

45
00:03:11,220 --> 00:03:13,170
And in between, we will also be printing.

46
00:03:13,170 --> 00:03:18,180
The value, in fact, will just be printing this at an interval of 500 millisecond rate.

47
00:03:18,190 --> 00:03:19,960
So this will be keeping as a district.

48
00:03:19,980 --> 00:03:23,360
So let us use this code to understand a lot of your credit.

49
00:03:23,400 --> 00:03:30,270
So here what we are doing is while we are waiting for time to explode after an interval of 500 millisecond,

50
00:03:31,050 --> 00:03:36,120
we are printing the current value of our counter and that is what we are sending on to a consumer.

51
00:03:37,050 --> 00:03:44,910
Then as we complete reading four or five, second, we are printing the timer expired and daily of five

52
00:03:44,910 --> 00:03:45,930
second that you write.

53
00:03:46,620 --> 00:03:49,900
And then we have added this random delivery here.

54
00:03:49,920 --> 00:03:55,920
So then just stop the time because we know that when we enable in order to learn more, this will automatically

55
00:03:56,460 --> 00:04:04,860
initialize our counter back to the value that user has specified and then to start afresh execution

56
00:04:04,860 --> 00:04:05,610
of our timer.

57
00:04:05,640 --> 00:04:11,040
We are first stopping the timer and then we are starting our timer back, right?

58
00:04:11,040 --> 00:04:18,570
So what this should do is we should be continuously getting a counter rally for a five second and then

59
00:04:18,570 --> 00:04:23,220
we should be getting the status as timer by delay of five second at you again.

60
00:04:23,250 --> 00:04:29,670
We should start getting the value of our count right and then we should be getting the delay of five

61
00:04:29,670 --> 00:04:32,290
seconds after we elapsed the time of five second rate.

62
00:04:32,310 --> 00:04:35,130
So this is an expected behavior from this rate.

63
00:04:35,670 --> 00:04:37,800
So let us first build our entire project.

64
00:04:39,120 --> 00:04:40,190
By placing control.

65
00:04:40,860 --> 00:04:45,600
So once Bill is finished, let us observe whether we get an expected behavior, right?

66
00:04:46,080 --> 00:04:51,920
So we select our legal configuration and click on view and so this will automatically programmer FPGA

67
00:04:51,930 --> 00:04:55,800
and start operations in so far debug session, right?

68
00:04:56,900 --> 00:05:02,450
We have already connected our white is still to account for two of three dead, one one five key border.

69
00:05:02,690 --> 00:05:04,730
We just need to click on resume, but right.

70
00:05:05,210 --> 00:05:10,430
So here you could see we are getting the counter values and then as it reaches to zero.

71
00:05:10,500 --> 00:05:13,400
OK, so we are expecting to get a delay of five second at you.

72
00:05:13,670 --> 00:05:16,460
And after that again, the counter value should be displayed.

73
00:05:16,460 --> 00:05:18,860
But we are not getting unexpected logic.

74
00:05:19,070 --> 00:05:26,600
So what I'll do is I'll just reset my system, monkey, OK, and go back and then try to modify a logic

75
00:05:26,600 --> 00:05:27,080
of, OK, great.

76
00:05:27,080 --> 00:05:29,180
So this basically mean it is not expected.

77
00:05:29,450 --> 00:05:35,560
It is not giving us unexpected behavior, and provable reasons could be multiple right now.

78
00:05:35,570 --> 00:05:44,570
Let me just try to verify whether this returns are true or false as our timer expired, right?

79
00:05:44,870 --> 00:05:45,890
So this returns.

80
00:05:47,030 --> 00:05:47,270
True.

81
00:05:47,450 --> 00:05:55,400
As soon as our timer expired and when we enable or to load more, whether this also refresh or.

82
00:05:56,420 --> 00:06:00,350
Remove the previous status of our time.

83
00:06:00,750 --> 00:06:07,070
So that is what we want to verify because here we are writing a logic depending on in time timer expired

84
00:06:07,070 --> 00:06:07,550
function.

85
00:06:07,580 --> 00:06:14,570
So if I this function do not reset its value, we won't be getting a chaotic behavior.

86
00:06:14,570 --> 00:06:20,060
Actually, just call this function, try to bring the value of it in both the cases when our time is

87
00:06:20,060 --> 00:06:20,870
running low key.

88
00:06:21,110 --> 00:06:23,330
So to bring the value, the process is very simple.

89
00:06:23,360 --> 00:06:24,810
So do brain death.

90
00:06:25,700 --> 00:06:29,780
OK, and then the status will just be.

91
00:06:30,880 --> 00:06:37,270
Adding to this state and let me just bring the value in the decimal format, add a new line character

92
00:06:37,510 --> 00:06:39,470
and call this function over here.

93
00:06:39,490 --> 00:06:43,210
There's just required and TMR, which is an instant structure, right?

94
00:06:43,220 --> 00:06:46,300
So this will be continuously printing the status of this function.

95
00:06:46,540 --> 00:06:48,700
The value that has been written by this function, right?

96
00:06:48,700 --> 00:06:53,140
And we already know that when timer is running, it will be returning a value of zero.

97
00:06:53,410 --> 00:06:55,150
That is what we're going to observe over here.

98
00:06:55,450 --> 00:06:57,130
And as our timer expired.

99
00:06:58,290 --> 00:07:02,730
OK, again, we will be printing her value off this.

100
00:07:03,950 --> 00:07:07,220
OK, so this help us to know whether then we.

101
00:07:08,220 --> 00:07:11,700
Reset, who when we are to restore the value of.

102
00:07:13,010 --> 00:07:18,140
So this helps us to know when we updated the value of a counter registered by enabling an hour to learn

103
00:07:18,140 --> 00:07:18,410
more.

104
00:07:18,690 --> 00:07:25,610
They did it also reset the status of this accessible timer because if that is not happening, then our

105
00:07:25,610 --> 00:07:26,780
logic won't be working.

106
00:07:26,810 --> 00:07:31,280
Rachel, go ahead and try to build an entire project again.

107
00:07:32,740 --> 00:07:40,180
OK, so once Bailey's finish, we will first be clearing up our serial terminal and then we will again

108
00:07:40,180 --> 00:07:49,890
be relaunching our debug session right now, closely observe the value of the status written by the

109
00:07:49,900 --> 00:07:51,430
IS expired function, right?

110
00:07:51,430 --> 00:07:55,910
So click on resume so you can see status as zero because our timer is running.

111
00:07:55,930 --> 00:07:56,950
That is correct rate.

112
00:07:57,580 --> 00:08:00,070
And then here are timer expire, right?

113
00:08:00,400 --> 00:08:07,720
So here we are expecting that as our timer is reloaded with the value that users specified, the studio

114
00:08:07,720 --> 00:08:09,820
should also be reset data back to zero.

115
00:08:09,820 --> 00:08:11,290
But this is not happening, right?

116
00:08:11,890 --> 00:08:17,770
So this is something which is causing a problem in our case when we are utilizing an auto reload more

117
00:08:17,770 --> 00:08:18,010
rate.

118
00:08:18,010 --> 00:08:20,920
So the quick solution will be how you reset.

119
00:08:20,920 --> 00:08:25,510
This timer is expired, written by the rate.

120
00:08:25,510 --> 00:08:29,150
So this basically will lead to an interrupted anti-union interrupt.

121
00:08:29,500 --> 00:08:34,900
So there must be some function that could be used to clear up this to dissolve and rate.

122
00:08:34,900 --> 00:08:42,370
So we go ahead and then find out the function, whether we have any function to clear up and interrupt

123
00:08:42,370 --> 00:08:42,860
students.

124
00:08:42,890 --> 00:08:47,040
OK, so we do have the function to clear and interrupt status, right?

125
00:08:47,050 --> 00:08:49,630
Because when timer is expired, this.

126
00:08:50,900 --> 00:08:53,570
Will be setting up an interrupt right hand.

127
00:08:54,110 --> 00:08:58,730
So this clearly indicate that as our timer expired, it triggers and into.

128
00:08:58,790 --> 00:09:07,010
OK, so now our agenda will be to clear up and interrupt studios so that we able to reset the the value

129
00:09:07,010 --> 00:09:10,660
that timer is expired function returns to a so late.

130
00:09:10,670 --> 00:09:13,010
Just call this function in our main goal.

131
00:09:13,280 --> 00:09:20,090
OK, so here we go ahead and we'll just be adding a clear interest to does this again, just required

132
00:09:20,090 --> 00:09:22,570
a single instance, which is her instance structure, right?

133
00:09:22,580 --> 00:09:24,950
So that this modification let it just build up our code.

134
00:09:25,130 --> 00:09:30,950
And once built, this finish will go back to a way to clear terminal first will be clearing up our console.

135
00:09:31,070 --> 00:09:34,400
So now we will be clicking on a resume button.

136
00:09:34,760 --> 00:09:38,030
Okay, so Steve does is zero for first few attrition.

137
00:09:38,030 --> 00:09:41,570
Then it expired and you could see the denigration of engineering job status.

138
00:09:42,140 --> 00:09:44,570
Now our function is behaving correctly.

139
00:09:44,570 --> 00:09:49,700
Right to the status of the value that has been written by the timer is expired.

140
00:09:49,700 --> 00:09:51,980
Function is now been correctly resetting, right?

141
00:09:52,340 --> 00:09:58,160
So this basically suggests that with an auto reload mode, we need to follow this logic right now.

142
00:09:58,160 --> 00:10:03,230
What we're going to do is we will just be giving a final test to our program.

143
00:10:03,390 --> 00:10:08,200
OK, so issue time of stop the install start.

144
00:10:08,630 --> 00:10:12,950
OK, and then here we will just be adding a timer expired.

145
00:10:14,460 --> 00:10:14,850
OK.

146
00:10:15,300 --> 00:10:21,490
And now this is not required, right, because we verified that now we are getting the correct status

147
00:10:21,510 --> 00:10:25,230
right to will be printing the count value and then.

148
00:10:26,290 --> 00:10:31,870
We will be stopping our timer as soon as we complete the delay of five second.

149
00:10:32,140 --> 00:10:34,270
Then we start our timer back, right?

150
00:10:34,870 --> 00:10:42,700
But before we start our timer, the good idea will be to first clear the interest rate, so we'll stop

151
00:10:42,700 --> 00:10:45,910
our timer clear up to interrupt studios.

152
00:10:45,910 --> 00:10:49,570
So this will allow us to again utilize our time, right?

153
00:10:49,570 --> 00:10:54,630
And so this should be printed before we start the new operation of our time.

154
00:10:54,700 --> 00:10:54,990
Right.

155
00:10:55,000 --> 00:10:56,290
So this completes our call.

156
00:10:56,890 --> 00:11:01,150
OK, so what we are doing is we are waiting for a timer to expire.

157
00:11:01,210 --> 00:11:04,110
OK, so as soon as our timer expired, we are stopping a timer.

158
00:11:04,120 --> 00:11:07,870
We are clearing up and interrupts Judas, and then we are printing that.

159
00:11:07,870 --> 00:11:12,460
We are able to achieve a delay of five seconds and again starting the fresh instance off our time,

160
00:11:12,520 --> 00:11:12,760
right?

161
00:11:12,760 --> 00:11:13,930
So with this modification?

162
00:11:14,230 --> 00:11:15,700
Let it just build our project.

163
00:11:15,700 --> 00:11:20,890
Once our babies finish will just be going ahead and clearing up our right this minute, right?

164
00:11:21,190 --> 00:11:24,790
Go ahead and relaunch the debug session, right?

165
00:11:24,810 --> 00:11:27,040
We just need to click on this resume button, right?

166
00:11:27,370 --> 00:11:32,230
So first, we will be getting a series of values off a counter at a regular interval of five hundred

167
00:11:32,230 --> 00:11:32,830
milliseconds.

168
00:11:33,100 --> 00:11:36,060
Then you could see a delay of five seconds at you, OK?

169
00:11:36,070 --> 00:11:39,310
And with an auto reload mode, again, we will start operating again.

170
00:11:39,340 --> 00:11:44,320
Some counter values delay of five seconds, you write again, some counter values, delay of five second

171
00:11:44,320 --> 00:11:45,030
that you rated.

172
00:11:45,490 --> 00:11:49,120
Now you understand clearly what our to reload would mean today.

173
00:11:49,130 --> 00:11:55,600
So this will automatically reload our registers to the value that user have specified.
