Now what we are going to do is we will be modifying this, says that we have it or to learn more deliberate
to just delete this, disable OK and then enable over here, right?
So this will.
And be used to enable an hour to reload more great.
And what this do is as soon as our time arejust just was zero, it will automatically load our timer
back to the value that you have specified, right?
So as soon as our timer reaches to zero, it will automatically reload the value timer down onto the
register the counter register of a timer, right?
So to confirm that, OK, so we'll just be increasing this delay a bit because this is printing the
value at very faster rates will add one more zero.
Over here, OK?
And then we'll try to analyze how this code work, right?
So only modification that we did over here is the enable all to reload mode API rate.
This will also be changing to 500 millisecond rate.
So let me just again rebuild our application project, OK, so that we have our new e.l.f.
Five.
OK, so what does Bliss finish, just select a diva configuration and click on relaunch, right?
So this will show us a message that diva configuration is already active, so you just need to.
Click OK to start the new configuration, right?
You can see our pointer is over here and right, this creative is all really connected to a car, but
we just need to clear up unsought and then click on resume button right now if you observe the count
value, right?
So it started at here one five zero zero.
One, six, six, four, three, seven, and then it goes down.
Right, and then we get the timer expired five seconds you and after that, if you try to bring the
value, it is not zero, right?
So this suggests that we then enable or to reload movie evil, to reload our counter to the value that
usable great.
So we just modify this algorithm.
This is not giving much insight right to try to modify this algorithm so that we will do correctly.
Understand all too little more.
Rachel, what are we going to do here is?
OK, so let me just remove.
OK, so we are not interested in printing the value after our timer expired, right?
Now, as soon as our timer expired, what we want to do is we will be let assume first stop the timer
forcefully right over here, right?
And then we.
Bring the statement that timer expired and then we again start our timer operation, right?
So due to a presence of a while one, we'll get what will happen as soon as we complete.
This statement will again be waiting for the timer to expire.
OK, then we get the reveal.
Five second rate again.
Again.
We will be stopping our timer, printing the statement and again restarting our time worried.
And in between, we will also be printing.
The value, in fact, will just be printing this at an interval of 500 millisecond rate.
So this will be keeping as a district.
So let us use this code to understand a lot of your credit.
So here what we are doing is while we are waiting for time to explode after an interval of 500 millisecond,
we are printing the current value of our counter and that is what we are sending on to a consumer.
Then as we complete reading four or five, second, we are printing the timer expired and daily of five
second that you write.
And then we have added this random delivery here.
So then just stop the time because we know that when we enable in order to learn more, this will automatically
initialize our counter back to the value that user has specified and then to start afresh execution
of our timer.
We are first stopping the timer and then we are starting our timer back, right?
So what this should do is we should be continuously getting a counter rally for a five second and then
we should be getting the status as timer by delay of five second at you again.
We should start getting the value of our count right and then we should be getting the delay of five
seconds after we elapsed the time of five second rate.
So this is an expected behavior from this rate.
So let us first build our entire project.
By placing control.
So once Bill is finished, let us observe whether we get an expected behavior, right?
So we select our legal configuration and click on view and so this will automatically programmer FPGA
and start operations in so far debug session, right?
We have already connected our white is still to account for two of three dead, one one five key border.
We just need to click on resume, but right.
So here you could see we are getting the counter values and then as it reaches to zero.
OK, so we are expecting to get a delay of five second at you.
And after that again, the counter value should be displayed.
But we are not getting unexpected logic.
So what I'll do is I'll just reset my system, monkey, OK, and go back and then try to modify a logic
of, OK, great.
So this basically mean it is not expected.
It is not giving us unexpected behavior, and provable reasons could be multiple right now.
Let me just try to verify whether this returns are true or false as our timer expired, right?
So this returns.
True.
As soon as our timer expired and when we enable or to load more, whether this also refresh or.
Remove the previous status of our time.
So that is what we want to verify because here we are writing a logic depending on in time timer expired
function.
So if I this function do not reset its value, we won't be getting a chaotic behavior.
Actually, just call this function, try to bring the value of it in both the cases when our time is
running low key.
So to bring the value, the process is very simple.
So do brain death.
OK, and then the status will just be.
Adding to this state and let me just bring the value in the decimal format, add a new line character
and call this function over here.
There's just required and TMR, which is an instant structure, right?
So this will be continuously printing the status of this function.
The value that has been written by this function, right?
And we already know that when timer is running, it will be returning a value of zero.
That is what we're going to observe over here.
And as our timer expired.
OK, again, we will be printing her value off this.
OK, so this help us to know whether then we.
Reset, who when we are to restore the value of.
So this helps us to know when we updated the value of a counter registered by enabling an hour to learn
more.
They did it also reset the status of this accessible timer because if that is not happening, then our
logic won't be working.
Rachel, go ahead and try to build an entire project again.
OK, so once Bailey's finish, we will first be clearing up our serial terminal and then we will again
be relaunching our debug session right now, closely observe the value of the status written by the
IS expired function, right?
So click on resume so you can see status as zero because our timer is running.
That is correct rate.
And then here are timer expire, right?
So here we are expecting that as our timer is reloaded with the value that users specified, the studio
should also be reset data back to zero.
But this is not happening, right?
So this is something which is causing a problem in our case when we are utilizing an auto reload more
rate.
So the quick solution will be how you reset.
This timer is expired, written by the rate.
So this basically will lead to an interrupted anti-union interrupt.
So there must be some function that could be used to clear up this to dissolve and rate.
So we go ahead and then find out the function, whether we have any function to clear up and interrupt
students.
OK, so we do have the function to clear and interrupt status, right?
Because when timer is expired, this.
Will be setting up an interrupt right hand.
So this clearly indicate that as our timer expired, it triggers and into.
OK, so now our agenda will be to clear up and interrupt studios so that we able to reset the the value
that timer is expired function returns to a so late.
Just call this function in our main goal.
OK, so here we go ahead and we'll just be adding a clear interest to does this again, just required
a single instance, which is her instance structure, right?
So that this modification let it just build up our code.
And once built, this finish will go back to a way to clear terminal first will be clearing up our console.
So now we will be clicking on a resume button.
Okay, so Steve does is zero for first few attrition.
Then it expired and you could see the denigration of engineering job status.
Now our function is behaving correctly.
Right to the status of the value that has been written by the timer is expired.
Function is now been correctly resetting, right?
So this basically suggests that with an auto reload mode, we need to follow this logic right now.
What we're going to do is we will just be giving a final test to our program.
OK, so issue time of stop the install start.
OK, and then here we will just be adding a timer expired.
OK.
And now this is not required, right, because we verified that now we are getting the correct status
right to will be printing the count value and then.
We will be stopping our timer as soon as we complete the delay of five second.
Then we start our timer back, right?
But before we start our timer, the good idea will be to first clear the interest rate, so we'll stop
our timer clear up to interrupt studios.
So this will allow us to again utilize our time, right?
And so this should be printed before we start the new operation of our time.
Right.
So this completes our call.
OK, so what we are doing is we are waiting for a timer to expire.
OK, so as soon as our timer expired, we are stopping a timer.
We are clearing up and interrupts Judas, and then we are printing that.
We are able to achieve a delay of five seconds and again starting the fresh instance off our time,
right?
So with this modification?
Let it just build our project.
Once our babies finish will just be going ahead and clearing up our right this minute, right?
Go ahead and relaunch the debug session, right?
We just need to click on this resume button, right?
So first, we will be getting a series of values off a counter at a regular interval of five hundred
milliseconds.
Then you could see a delay of five seconds at you, OK?
And with an auto reload mode, again, we will start operating again.
Some counter values delay of five seconds, you write again, some counter values, delay of five second
that you rated.
Now you understand clearly what our to reload would mean today.
So this will automatically reload our registers to the value that user have specified.