UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Newbie steli
Newbie
6,373 Views
Registered: ‎08-12-2015

how to use more GPIOs in Zybo design using Vivado?

Hi,

I'm a new user of Xilinx Vivado and Zybo. I followed the tutorial in the link below:

http://www.dbrss.org/zybo/tutorial1.html

and the it works well.

 

How can I add GPIO for input port, such as adding ports for switches to controll the leds?

 

I've tried adding an IP (AXI GPIO), but I don't know the adress for the ports.

for the original led ports, we've got:
#define GPIO_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID /* GPIO device that LEDs are connected to */

how can I configure it for another GPIO device?

 

thanks a lot!

 

 

Tags (2)
0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
6,353 Views
Registered: ‎08-02-2011

Re: how to use more GPIOs in Zybo design using Vivado?

When you add and connect another AXI GPIO, you should get more entries in xparameters.h for an additional device_id and its addresses, etc.

You might have to re-generate BSP sources by right-clicking the BSP and select "Regenerate BSP Sources" in SDK.
www.xilinx.com
0 Kudos
Moderator
Moderator
6,258 Views
Registered: ‎07-31-2012

Re: how to use more GPIOs in Zybo design using Vivado?

Hi,

 

You can find the address of the existing AXI GPIO IP in xparameter.h which should be under BSP folder of your SDK project source tree. Search the AXI GPIO IP baseaddress in the file or if you have the hardware design find it under address editor tab.

 

As bwiec mentioned in above post, if you need to add another AXI GPIO do it at hardware design and export to sdk this will update your system.xml/.hdf file. Later re-generate the BSP which will update xparameter.h file and there you can find address of newly added GPIO.

 

Refer to the video which will help you with LEDs applciation https://www.youtube.com/watch?v=8i8GLF-Md3U.

You can do similar for dip switches as well.

 

Regards

Praveen

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos