...
Table of Contents
Introduction
This page gives an overview of AXI-Gpio driver which is available as part of the Xilinx Vivado and SDK distribution.
Table of Contents
Table of Contents
Introduction
The Xilinx® LogiCORE™ IP AXI General Purpose Input/Output (GPIO) core provides a general purpose input/output interface to the AXI interface.
This 32-bit soft Intellectual Property (IP) core is designed to interface with the AXI4-Lite interface.The AXI GPIO design provides a general purpose
input/output interface to an AXI4-Lite interface. The AXI GPIO can be configured as either a single or a dual-channel device.
The width of each channel is independently configurable.
For more information, please refer AXI_GPIO_Doc the official documentation and resource utilization.
Driver Sources
The source code for the driver is included with the Vitis Unified Software Platform installation, as well as being available in the Xilinx Github repository.
Driver name | path in vitis | Path in GitHub |
---|---|---|
gpio | <Vitis Install Directory>/data/embedded/XilinxProcessorIPLib/drivers/gpio | https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpio |
Info |
---|
Note: To view the sources for a particular release, use the rel-version tag in github. For example, for the 2020.1 release, the proper version of the code is: https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpio |
The driver source code is organized into different folders.
Below diagramThe table below shows the
iicpsgpio driver source organization
Axi-Gpio
|
-- Doc -
.
Directory | Description |
---|---|
src | Driver source files, make and cmakelists file |
examples | Example applications that show how to use the driver features |
doc | Provides the API and data structure details |
- Examples - Reference application to show how to use the driver APIs and calling sequence
|
- Source - Driver source files
data | Driver .tcl, .yaml and .mdd file |
Note: AMD Xilinx embeddedsw build flow has been changed from 2023.2 release to adapt to the new system device tree based flow. For further information, refer to the wiki link Porting embeddedsw components to system device tree (SDT) based flow
The .yaml(in data folder) and CMakeLists.txt(in src folder) files are needed for the System Device Tree based flow. The Driver .tcl and .mdd files are for the older build flow which will be deprecated in future.
Driver Implementation
For a full list of features supported by this IP, please refer AXI_GPIO_Doc
Features :
Controller Features Supported:
• Supports the AXI4-Lite interface specification• Supports configurable single or dual GPIO channel(s)
• Supports configurable channel width for GPIO pins from 1 to 32 bits
• Supports dynamic programming of each GPIO bit as input or output
• Supports individual configuration of each channel
• Supports independent reset values for each bit of all registers
• Supports optional interrupt request generation
Driver Supported Features:
All Controller Features supported.
Known issues and Limitations
- None.
Example Applications
ReferLinks to Examples
Examples Path:
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpio/examples
ChangeLog
2017.1Summary:
- gpio: Added xil_printf statement in examples.
- gpio: Updated makefile.
- gpio: Added readme.txt file to generate doxygen for examples.
- 3b03b14 gpio: Added xil_printf statement in examples.
- 37a2c78 gpio: Updated makefile
- 3903b61gpio: Added readme.txt file to generate doxygen for examples.
- None
- None
- None
2018.1
- None
2018.2
- None
2018.3
- None
2019.1
- Summary:
- gpio: Updated Make file for consistency
- gpio: Updated driver make file for IAR compiler.
- gpio: Updated copy right & change history.
- Commits:
2019.2
- None
2020.1
- None
2020.2
- Summary
- gpio: Update Makefile for parallel make execution
- Makefile: Remove realpath command
- Commits
Test Name | Example source | Description |
---|---|---|
xgpio_example.c | This example provides the usage of blinking leds on hardware. | |
xgpio_intr_tapp_example.c | This example shows the usage of the driver in interrupt mode. It uses the interrupt capability of the GPIO to detect button events and set the output LED based on the input. | |
xgpio_low_level_example.c | This example provides the usage of low level operations. | |
xgpio_tapp_example.c | This example provides the usage of API's for reading/writing to the individual pins.. |
Example Application Usage
GPIO examples
We can observed output on hardware board
ex: blinking leds in polled and interrupt mode
Example Design Architecture
NA
ChangeLog
2023.2
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2023.2/doc/ChangeLog#L30
2023.1
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2023.1/doc/ChangeLog#L2102
2022.2
None
2022.1
None
2021.2
None
2021.1
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2021.1/doc/ChangeLog#L430
2020.2
https://github.com/Xilinx/embeddedsw/blob/release-2020.2/doc/ChangeLog#L204
2020.1
https://github.com/Xilinx/embeddedsw/blob/release-2020.1/doc/ChangeLog#L44
2019.2
https://github.com/Xilinx/embeddedsw/blob/release-2019.2/doc/ChangeLog#L28
2019.1
https://github.com/Xilinx/embeddedsw/blob/
xilinx_v2021/ChangeLog#L4332018.3
None