Jump to content

Source Code imported via Vitis from Vivado project, which version should I be using?

Recommended Posts

I've just working with my Arty Z7 20 board and am trying to bring it up with a FreeRTOS image with a console that I wrote so that I can exercise the various devices (LED's, switches, I2C, SPI etc...) that are on the board.

I've used Vivado to create a bitstream that has axi_gpio_0,  axi_gpio_1, axiuartlite_0 all connected and I've generated the bitstream file and have been able to get started working on the s/w project in Vitis. BTW, I'm using all 2023.2 versions of the Xilinx tools.

I had the uart working just fine at first so I am confident that the bitstream is correct. (I did some changes and blew up the project files).

I've created a new project from Vivado to just exercise the LED's and a push button that are connected to axi_gpio_0. It's been a dismal failure. I have a series of questions that will I hope, lead me to understanding the tools a bit better with this topic to help me see what "version" of s/w and level (I speak of PS vs PL and the X designations in the imported code).

When I speak of "version" here I am using the Xilinx tools 2023.2 but when I generate the s/w using Vitis (I'm using classic, there is an issue with the new Vitis and FreeRTOS on the digilent Arty Z7 board, it doesn't appear to be supported). So when I create my s/w I have a look at the imported project code  under: /design_1_wrapper/ps7_cortexa9_0/freertos10_xilinx_ps7_cortexa9_0/bsp/ps7_cortexa9_0/libsrc/gpiops_v3_12/

There is also: /design_1_wrapper/ps7_cortexa9_0/freertos10_xilinx_ps7_cortexa9_0/bsp/ps7_cortexa9_0/libsrc/gpio_v4_10

So I'm looking at the gpiops_v3_12 and gpio_v4_10 which is confusing me. Is one the Processing System which is referred to as PS and the one with labelled "gpio_v4_10" the PL layer? Which should I be using? When I go looking for example code for turning on and off LED's I find code examples that use both types and I'm not sure what I should be doing to proceed here.

Any guidance would be greatly appreciated. Even a reference to some literature that will set me straight about this would be of great help.


Link to comment
Share on other sites

Hi @bloggins666

The xgpiops driver is used to control multiplexed input/output (MIO) GPIO pins in the Zynq Processing System (PS). These MIO pins are physically distinct from FPGA pins and are separate physical IOs on the chip. The xgpio driver is used to control an AXI GPIO peripheral. If you're using the board files to add an AXI GPIO to a block design, then that will control LEDs connected to FPGA pins on the programmable logic (PL) side of the chip. It's also possible to enable EMIO (extended MIO) pins that allow the hard GPIO controller in the Zynq PS to control pieces of the FPGA design, and then tie the EMIOs to FPGA IOs in the block design, so that LEDs that would normally be controlled by AXI GPIOs can be controlled by the PS GPIO controller. Probably clear as mud. All that is to say that, since you have axi_gpio controllers, use the xgpio (not xgpiops) drivers.



Link to comment
Share on other sites

Thanks for your reply and I've amended my code accordingly. Now I have dead address space (as I write to the GPIO registers the s/w goes off into the weeds so I need to track that down), but I am making (slow) progress.

I did post a question to Ms. Knitter about the lack of FreeRTOS support in the latest Vitis tool. I use the "classic" parameter so that I get the older Vitis SDK. I'm partial to the eclipse based IDE's and I despise the M$oft Vs Code based IDE's. Personal opinion, not trolling.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...