Our bitstream generation is successful now we will export our bitstream to NSD here, right, so file
export export higher, they will also be including a bitstream and then will launch an SD.
So let's start with the creation of a new application project again.
We will be utilizing the Hallowell template.
OK, now once we create an application project, we need to look for the drivers that are required for
a Orix IP rate.
So you could really see we have a single IP, which is x 8.00, OK and recommended drivers GPI.
Right?
So we'll start including the first year deferral, which is required for our IP that is x GPI or take
the next one there we will be finding all the hardware related data is X parameters daughter trait.
These are the two main driver and I will go ahead and try to.
I understand the number of EPS which would be useful to initialize are both any right, so we required
again to structure one is a config structure.
Now we'll just be naming this as Tupaea, you can think, OK, and we are also required to have the
instant structure, right, so we'll just be naming this head GPI.
So these are the two mandatory thing now to initialize.
I benefited.
We will.
Just be creating one unique function, we'll just be naming it as in it.
OK, and then we will be adding a logic.
So first, we need to find out the device I.D. OK, and then that device I.D. We need to feed to the
look up config function.
So we'll just copy this will go ahead.
So for us, the config structure data is stored in GPO config, right?
And then we need to specify the device I.D. rate to find out the device that you just need to explore
experimental or take a look for GPO and then you get the device right?
Right.
So this is the device that you need to feed to the lookup config function.
Then you need to utilize the CFG initialize, right?
So we'll just go ahead and we'll call see if she initialize now again, it will require three argument.
First, one is an instance of our IP.
OK, so that is GPIO then config structure, which is named as GPIO config.
OK, last one is the base, etcetera.
So we'll just add or will access the base address from the config structure itself, right?
So GPO config and then they'll be set to three.
This will return.
The status, whether initialization is successful or not, so that will be storing and variable status
right, and then will again be verifying whether we are getting success rate safe status is equal to
SSD success.
OK, if that is the case, we'll just be printing the message that device initialization, it's successful,
right?
The device and it is success.
As we'll just be writing, so here we'll add a new name character.
OK?
And again, they'll go in depth and then if that is not the case or device, then it free rate.
So this is what you need to write to initialize your favorite, right?
So after you call it black platform will just be calling this and this will initialize the driver required
for our favorite rate.
This will initialize appropriate and then we'll proceed for setting up the direction for a boat.
Now, remember, we have to change, right?
So we already know that our first channel will be used a switch and then the second channel will be
used for an A-League, right?
So let it just go away and try to throw, said the Derek.
Right now when we consider this one direction.
So we already know that for setting up the pin a specific pin as an input.
OK.
We need to apply what else we need to apply zero rate.
So this required an instance pointer.
Then we have a China and the direction mutsuki.
So let's just go ahead.
Now, Chinalco will have 32 bit.
That basically means Chinalco support by 32 votes, right?
So here we only have four switches and four really.
So utilising a mosque would be really helpful in ignoring the rest of the rhetoric, so will go ahead
first.
And then here we will be first setting up the direction.
So here we need to specify an instance which is stupid.
Oh OK.
Then we have the China number, so China number is.
So you have Unsane China to the North China?
No, it is China, right?
Or if we just explore what you'd expect from a user is China and India, China, GPI one or two to operate
on.
So we have a multiple China law here, but just be it two because we have included both the chain,
right?
And then.
The last argument is.
The direction must great.
So the second argument is a final number, so we already know that our first China lists, which we're
going to consider it as an input, we need to apply one.
Great.
So we'll just specify an argument has one.
OK.
And to set it as an input, we just need to apply for one, because we have four switches, right?
So we're just by Senator Decimal left, which basically mean for once or we are configuring the AI.
Let's be full Bake Off Channel one as an input port, right, will utilize the same API to set the Layla's
before bit of our second channel as an output pool together.
And to do that, we just need to apply zero.
OK, and here we need to select the channel number, which is two in this case, OK, and this could
be verified for us.
Channel one a switch which should be set as an input port and Channel two is in.
Output to it is connected to an so here we should apply zero rate, and that is what we are doing over
here.
Channel one, which represent our channel where we connect the switch and second where we connected
in LCD.
So we apply zero over here again when a four one over here, right?
So this setup, the direction, once we are completing the process of adding an addiction now, we could
build up our main logic, right?
So what we want to do is we will be sensing the value that we have on a switch and then that value will
be applying to energy.
So to hold the value that we have on a switch, we required to have a utility to read it just named
this as which data initialize it was to right.
So the functions that we have to read, the details x GPIO discrete read and you do see that you read
utility rates.
So we already declared the variable of same time to hold the data here when we go.
We will just be adding such data will be equal.
Stoup OK?
And document that we need to apply is the instance pointer and the channel number eight.
So the instance pointer vs. GPIO and then the chaining number where we have a switches channel one,
right?
So we'll just be specifying Channel one over here, then we need to apply this to an to do that, we
have a discrete write function where we need to pass an instance pointer channel number and Musk, right?
Now here, if you explore, you have an instance point as opposed to argument and the China number and
then finally, our data, right, so we'll go ahead and we will be specifying an instance, which is
GPI.
Oh, then we have a China number where we have an LLC is China number two and then the data.
So the data that we are reading from a switch will be applying the same data, right?
And to verify whether the call is working and to dynamically debug it, what are we going to do is as
we change the value of search, we'll also be displaying the same value on and you are great.
So this will help us to match the value that we are sending one to any lady and the suggested rates
or switch value and will be printing the value in a decimal format.
And we already know the variable that is holding those values, which data, right?
The new value will be read after an interval of one second.
Right.
So this is a complete logic that we need to do only the difference between the previous cases where
we are working on a single channel.
We required to have a multiple instances OK to configure the IP.
Then we need to again set direction.
We'll give it a single IP.
We could use a multiple channel rate only you need to keep track of this channel number correctly rate.
The rest of the thing is exactly what we did in a previous case.
Now we'll go ahead and first try to program an FPGA.
So once programming is successful, will go ahead and will launch on high today.
OK, but before that, we will just be connecting a sticky terminal to the respective comfort where
we have our FPGA right.
We'll also be adding a new line character here.
No, let me just go ahead and try to perform execution of a code on and heart, right?
So if everything goes fine, you are able to see device initialization is successful and the such value
that has been rated zero.
Now I'll try to change the value of the switch one by one.
Right.
So if I just turn on an MSP switch, you'll be getting it because you have no one zero zero zero.
So that basically give it and it now the next switch, if I turn on.
So you get, well, the next one, you get 13 and then, OK, so the next one is basically 14, right?
And then you get 50 right.
So you could see if you could dynamically value the value of a sutures and the same value the status
you could see on an LCD also.
Right.
So this is how you utilize our multi-channel on any side.