So I would assume the nation is successful, so we proceed to its export and hardware file, so we go
to file export export hardware, and this will be including a bitstream right to ventilate included
shrimp.
And then we'll be selecting the theme direct where we have the virus isolate.
So click next and click Finish.
So once we successfully export an hardware platform, look to the directory.
We will be launching an SDK so we go to tools and launch where it is 80.
Now here, as discussed, will be to choosing the same territory where we have created the new vital
project, right?
So we'll go ahead and click on this browse button and then we are onto a project, right?
So we'll just be selecting the same folder and then launching our white society.
So first step is to create a platform project, right, so we go to create platform project.
We'll just be naming this as well, China.
Right.
So click next and then we'll look for the platform.
So we selected a new platform from ICSI.
Click on Browse Button.
We go to the directory where we have our excessive weight, right?
So it is in the folder project fi.
So it will just be selecting an extensive file.
Click Open and then we'll just be clicking on.
And so once platform is ready, we are allowed to create new application rates that will be selecting
the platform.
Now here you could see this viewed as out of date, so a good idea will be to build up our project first
so that out of date status will be gone.
So once that is gone, we are right now ready to create a new application project to select the platform
project, right click and then you have new application project.
Right?
So we'll click next.
And this is the platform that we have, right?
So this is the platform that we have generated in and we will do and I didn't do.
I just click next and we'll just be naming this as dual.
I underscore, I step right click next and we'll be choosing standalone.
And the Hallowell template, so Hallowell template, given access to the API that could be used to use
and you are great.
So once our application project is ready, we go to a school step where we have all the C files, right?
So we go to an to or see which consists of our mean code, which will be executed on an FPGA.
So we'll be going ahead and start hiding the code that allows us to use such API to pay for it and use
both the channel of GPA, right?
Now, if you go to the SBIR flight, OK, so this highlight all the important drivers that we required
OK to correctly use to both go so far as GPIO, we have a TBI right.
There will be including that as a first driver.
So harsh include fluky.
And then we have our next shortage, right?
So we just need to add a prefix to the driver, which is highlighted in that broad support package,
right?
So if you observe the board support package, highlight the driver for our say or zero instance as GPIO,
we will just be adding a Prefixes X and this creates a driver for us.
So this is all those links.
Recognize the driver for different.
The next important thing that we required, which consist of all the hardware related information,
is the X parameter dot h of this two files that are enough to correctly build up the application for
any of that.
So once we are ready with this, we will be exploring GPI.
Now we already know that this consists of two structure, right?
So we required one fixed structure as well as an instance structure.
So we'll be creating a pointer for in config structure.
We'll just be naming this as GPIO config, right?
The next one that we require is an instance structure, so we'll just be adding it over here and we
named it as GPI, right?
Then we will be including an independent GPI init function.
OK.
To initialize our periphery now, if you calculated the number of instances of GPI that we have utilized,
so we only have a single GPI instance, right?
So we just need to create a single instance and config structure.
Remember this fact in mind.
So as we proceed further and add multiple instances of an IP, so there, for each instance of an IP,
you need to declare an independent config, an instance structure.
So here we only have a single IP, so we'll just be declaring single config an instance structure,
right?
So once this is done, we go ahead and will select GPIO config and this to be equal to.
Now the lookup config is something which will be.
Returning the conflict structure for a straight.
So we go to the GPO driver.
And copy look upon.
Delighted over here.
And this just required and device I.D. as the argument rate and device ID could be found out from experimental
daughter, which will be looking forward to pill.
And here we have our device I.D. So this device I.D. will be adding who are here?
And this basically indeed the config structure for us.
So once we have our phone fixed up to ready.
We use The BFG initially, right, so we go ahead.
We copy CFG initials.
And this requires No.
Three argument, right?
So it's just structure, config structure, and they'll be set free.
So we'll be adding it.
We're here and this is again written the status of an initialization.
So we'll just be adding.
Cheetahs will be close to the initial phase.
This requires three things eight.
The instant sector.
Conflict structure.
And the Basic Trust, which could be invoked from a conflict structure, it's such a GPIO fake.
OK, and then you have this operator.
And then we'll just be utilizing be soldiers.
So this complete the process of initialization of our personnel now will just be verifying whether the
initialization is successful or not.
So we just need to make sure that the studios value is equals to excess to success.
And if that is the case, we will just be adding.
GPA, you.
He nicked sexist health.
Nicole just mentioned Dubai, and it's right.
So this completes the process of initialization now we just need to correctly said the direction for
the change and then we are ready to work around with the data, right?
So we will be calling the autopilot function in our main application to go ahead and copy GPI.
We need to wait here.
So we need platform allow us to utilize you without any initialization.
So this will automatically do an initialization for us.
Now we already know that the first channel is where we have our switches, right?
So we need to set that pins as an input port, OK?
And the Channel two is where we have our leads so that all 16 pins should be set as an output.
Great.
So we go to an GPI outage and then we utilize said data detection rate to this required first instance,
then the channel number.
And finally, the number of bits that you want to set.
Great.
So we go ahead.
We use this API.
OK.
Here they instance.
Structure is how you write.
Then the chain and the specification of force channel, we are specifying.
So here we want to set the 16 bit OK as an input because we have a 16s, which is available on the book,
right?
So we just need to add if, if!
Right?
So it's indicate that we are specifying number in and hexadecimal format.
So for hexadecimal digit is equivalent to 16 bit rate.
So this will automatically set Channel one OK as an input.
Bowling alleys b 16 bit out of the 32 bit that this function support will be set as an input rate.
Similarly, we need to set the second channel LSP 16 bit as an output rate, so we'll just be copying
dysfunction again.
Then we will be choosing the channel number to be two.
OK, and this we want to set as an output to set an output.
We just need to apply the right.
So this will dissect Channel one as input.
OK, so that we will be reading the data from this switches and this will state channel to add output
so we could send the data that we need from the switches to NLE.
Right now, what we are going to do is add an interval of one second will be reading the status of switches,
OK, and the value that we get from the switches will be sending on any right.
So this will be our application.
So while one.
Well, first declared one variable, which will be storing the switch evaluates the utility is what
discrete read returns rate.
So if you just explodes UPI, whatever.
So we have a discrete read which basically read the data from an input.
Put this written you thirty two.
So we need to declare you 32, and we'll just be naming this as data read Let it just initialize it
to a zero.
So we proceed with data read.
And we'll be updating it with a value that we get from this, which is right there to do that, you'll
just be calling a discreet read.
OK, here we are required to buy a sentence in structure, right?
So sentence and texture.
They specify the next days you just need to specify the chain ratio for the China list China.
Right?
So once that is done now, we are ready to send the leader that we have on and on to an immediate end.
So to do that, we have discrete write function.
OK.
So we'll be calling this function.
This requires first an instance structure.
Then the China number, right?
So for fortunately, we are having Channel two look OK and the last one represent the data, right?
The data will be the data that we read from a switch get, which is inside it, and we need to repeat
this algorithm after an interval of one second.
So we will be utilizing the sleep function that we have, which indeed that highly.
In second, right?
So depending on the number that you specify as an argument, that will be the delay generated in second
to since here we specify when so this will generate a delay of one second rate.
So this complete our application.
What we did is we perform an initialization.
OK, since we have only a single IP present, we only required to declare a single instance structure
and single config structure.
The initialization process is exactly similar to what we did in the previous case, so we need to first
use look up config where we pass device 80, then the AFGE initialize where we will be adding the conflict
structure, instant structure and the basic rate.
Then we are checking the value of a status, whether it is equal to existing success or not.
If that is the case, we are printing GPI and it is successful else.
We are just printing GPI when it failed and in the mean application, first thing that we are doing
is we are setting up correct detection.
And once that is done, we are ready to play with the data, right?
So we declare you 32 because that is the value that has been written by discrete read function, right?
And this required just an instant structure and channel number, right?
Then we are writing the value that we have and then later added on to an elderly.
So that is on Channel two and this we are doing at an interval of one tick, right?
So let's just go ahead and try to build our entire project.
It will just be clicking on Control B. So this will build up our entire project.
So once, but it is successful.
Now we are ready to perform execution of our code on to an FPGA, right?
So we go ahead.
We select an application project rate right click and then we have a debug as a launch hardware, right?
So this will switch our window to debug perspective.
And then we have a white serial terminated.
Along with that, it will also automatically program our FPGA right.
So once programming is successful and you are in a design debug perspective, you go to a white this
terminal.
Here we will be connecting to serial terminal.
So this helps us to analyze the messages that we are getting OK as we execute our application.
So click on this plus button.
Select.
Com six and then nine six zero zero rate, the discount will be wearing depending on the comfort that
you have.
We'll give you connected your FPGA, right?
So once that is done, then we are ready to click on this resume button to will just be clicking on
resume button.
So here you could really absorb that GPI, you and it is successful.
And now I, as I change the status of the switch, you could absorb that LCD.
So I also your anymore, right?