cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor
Visitor
191 Views
Registered: ‎09-18-2019

GPIOs Not Working on Z7-20 Implementation

Jump to solution

My setup is on Vivado 2019.1 using the Zybo Z7-20 board.

The project uses some custom IPs and several AXI GPIOs. One of the custom IPs uses a block memory generator for block ram. When the block ram is at 64K (16 addr bits), it functions correctly. I tried expanding the size of the ram to 1M (20 addr bits), and my simulation of the custom IPs is successful in writing the stop address and cycling through the ram to the stop address. Notably, the simulation does not include the GPIOs. 

image.png

 

In implementation, it fails. It appears that the GPIOs are not being written to correctly in this new configuration so that when I try to read them back, I only get the default values. As is shown below, a clock period value dictated by a GPIO does not get updated despite a previous command setting the frequency.

image.png

The C code didn't require modifications and successfully runs until it tries to iterate through the ram. It appears to be stuck constantly reading the same address as the terminal output showed, unlike the output of the simulation. I cannot tell if this is due to write failures to the GPIOs or a different implementation failure.

Why would changing the block ram size affect the ability of the GPIOs to be written to, and how can it be fixed?

Below is a screenshot of part of the setup. As it shows, some of the GPIOs have abnormally sized inputs/outputs (i.e. not 16 or 32 bit).image.png

Any ideas on what is causing this/how to fix it?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
101 Views
Registered: ‎09-18-2019

Re: GPIOs Not Working on Z7-20 Implementation

Jump to solution

Resolved: The xparameters.h header file that is auto generated as part of the board support package in SDK initializes definitions for the GPIOs. It turns out that it automatically generates these in alphabetical order rather than numerical order. This causes definitions to be made in the order GPIO 0, GPIO 1, GPIO 10, GPIO 2, ... rather than GPIO 0, GPIO 1, GPIO 2, ... GPIO 10. After changing these definitions in the xparameters.h file, the project works as expected.

Is there a way to get the board support package to generate them in numerical order automatically?

View solution in original post

1 Reply
Highlighted
Visitor
Visitor
102 Views
Registered: ‎09-18-2019

Re: GPIOs Not Working on Z7-20 Implementation

Jump to solution

Resolved: The xparameters.h header file that is auto generated as part of the board support package in SDK initializes definitions for the GPIOs. It turns out that it automatically generates these in alphabetical order rather than numerical order. This causes definitions to be made in the order GPIO 0, GPIO 1, GPIO 10, GPIO 2, ... rather than GPIO 0, GPIO 1, GPIO 2, ... GPIO 10. After changing these definitions in the xparameters.h file, the project works as expected.

Is there a way to get the board support package to generate them in numerical order automatically?

View solution in original post