Let us try to implement a circular shifter, right, so it consists of a six foot site that will be
a size of input data as well as an output shifter atlas deep machine.
So adding this speed machine greatly simplifies the entire operation.
OK, so whenever you have a complex expression, see that you try to incorporate the state machine,
and that usually reduces the effort that we spend to design our control, Patrick.
So let us just try to understand an entire flow of our system, right?
So first thing that you'll be doing it, so we will be accepting the new input from the user, right?
So that will be added to which user want to shift right here.
One more thing that we'll be doing is, along with the data, will also be taking the shift conditions
as an input from a user vessel.
So here we design our shift register predominantly to shift in a right position as we progress further.
OK, and as you saw your assignment, you will be developing a system that could chip in both the dedication
to the right as well as well.
So first, we'll just be going through a basic skeleton, so that will give us an idea of how you build
the shifter.
And then in an assignment, you could tackle a complex shift, right?
So the first need is loading.
So here we will be doing two things.
First, the data, the input data that you want to shift and the number of the position that you want
to share.
So these are the two inputs that we will be taking from a user.
So if you analyze a visual code right to be represent represented six fitting right in the direction
as input.
Again, to type a standard underscore logic underscore vector and the site is six.
Great.
So this will be an input data.
And if you analyze the result of shifting operation so that we'll again have the same size that is five
down to zero and the direction will only be an hour.
Along with this, the second data that we are expecting from a user is the number of position that we
are going to shift, right?
So we will allow the maximum seven shift to be specified at an instance.
OK.
Hence, we declared the shift size to be two down to Z.
Right.
So this is capable of handling a maximum seven back position right now.
You could actually increase the ship audition space as per your requirement.
So as soon as we have as soon as we exactly know the data input, which we want to shift and the big
positions which we want to ship, right, we proceed and check whether this system is able to perform
the required shift.
OK.
So we have a counter variable that keep a track of number of shift positions that that keeps the track
of the number of shift position we currently.
Perform on any good detail, right?
So if our count is not equal to the number of coalition that you have requested, in that case, we
will be again performing a shifting operation, right?
So we will be waiting here again before my shift, OK?
As soon as the count becomes equal to number of shift position, OK, in that case, we look to achieve
the user's specific shift position, right?
So once that is done, we will be jumping into a new stage.
So here what we're going to do is we will be verifying whether we have new data that users want to perform
a shift, right?
So if we do not have any new data, so our system will be simply in an ideal waiting in this specific
stage, right?
So we will clearly see if we do not have a new leader, we will be simply waiting over here as we will
be simply jumping back to our speed one which will allow us to load the new input data, right?
So this is the simple machine that we have for our system.
OK, and if you analyze the rest of the code, so we have a clock which is synchronized in signal.
We also have a pin, which could be used to specify that the user have a new data on right.
So if you do not have a new data, it will be simply zero if you have a valid new data.
It will be equal to what?
OK.
So these are the series of proofs that are present in our system.
So be to present our input data.
Why replace who now could data after shift operation shift represent the number of bitcoin?
You should use a want to shift.
OK.
Here we predominantly are developing the right shift.
OK, so as we progress further the silent assignment there, you will be understanding how we could
build a system that is capable of handling both right as well as left or right.
So we proceed with an architecture.
Now first, we declared a counter variable rate, so this will be keeping a track of a number of position
we have shifted right now.
We know that the maximum shift that we could have is seven rate, so this variable should be capable
of handling at least seven who use the value of seven.
So we will be declaring declaring a count variable, which will be of integer type, and it should be
capable of handling a maximum seven.
OK, so we declare the range to be from zero to eight and we also initialize to a zero rate.
So all the shifting operation will be performed on a temporary data and then at the end we will be connecting
the temporary data.
So we declare a signal and temp, which is which will serve as a temporary register for us and that
again have a size of six.
So which is exactly equivalent to the size that we have for right now whenever you have a state machine?
OK.
The good idea instead of looking that instead of working on zero or one is to create our own.
I.
That could be used to hold the value of steel.
Right.
So RF isn't going to stop it.
So how you declare a user defined Dieter Typekit, you start with the type.
OK, so this will be working at this date.
So we need this Typekit steel tape and is OK.
Then you need to add apprentices and then you specify the data that you want to have for this database.
So we want to have a three step.
So we would have a law shift and the new data.
These are the three states which are pattern right now.
Depending on the velocity we'll get, different encoding style could be utilized to encode our state.
It could be a binary encoding green coding one, hot and cooling and so on and so forth.
Now, as soon as we declared our fate.
Right.
So the next step is to declare a signal that is working on this day.
So we start with the Signal Studio, the variable that we'll be working on this state Typekit.
And we initialize this to a lawsuit which will represent our first when we start out of the.