AXI_GPIO Expanding EMIO

Create Vivado Project

Since this project requires controlling multiple LEDs on the PL side through the PS side's EMIO, and the ZYNQ IP core we created has a maximum of 64 EMIO pins, which is insufficient for our needs, we will achieve this by adding two AXI_GPIO IPs to the existing project:

Click "+", search for "axi_gpio":

image-20250725141656180

image-20250725141736529

Double-click to configure: We need to configure 87 LEDs, so we need to add two IP cores. For the first IP core, select both channels and set the GPIO width to the maximum value of 32. For the second IP core, select only one channel and set the GPIO width to 23.

image-20250725141852037image-20250725141916428

image-20250725141916428

After configuration is complete, click "Run Connection Automation" for automatic wiring:

image-20250724121039121

In the pop-up window, check all the boxes:

image-20250724121126684

Constrain the GPIO pins according to the schematic:

image-20250725142514995

image-20250725142556600

Finally, export the hardware project .xsa file following the previous steps.

Create Vitis Project

Since the .xsa file has been updated, it needs to be updated in the Vitis project: select the exported .xsa file, and after a successful update, right-click on "Mind-Z7020" and select Build.

image-20250725142828772

Similarly, in Vitis, click File-->new-->Appiacation Project:

image-20250811174106532

Select a blank .c file:

image-20250725143118466

After the application project is created, create a new .c file: right-click on src->New->File:

image-20250725143145846

 

Compile and Debug

After the project is successfully compiled, connect the development board's JTAG to the computer using a Type-C USB cable.