Jump to content
  • 0

arty7 / pynq-z1 LED MIO


Trillian

Question

Hi,

I'm having exactly the same problem that this person had: http://www.zedboard.org/content/zedboard-pins-banks-and-mio

Quote

Zedboard pins banks and MIO

Hi!
I am trying to learn how to use the LEds and switches in the Zedboard.
I have been following this article form Adam Taylor:
https://forums.xilinx.com/t5/Xcell-Daily-Blog/Driving-the-Zynq-SoC-s-GPI...
 
My doubts come when assigning the proper number to the peripherals, LED and switches. I have seen in the .xdc that for example for the LEDs, they are on Bank 33. I have defined the constraints for all of them.  
So, for LED0, the pin is T22, Bank 33. From that data, how can I know the MIO I must set in the .c code?
Adams blog says: "Define the output pin we want to toggle. In this case it is pin 8 within the bank of 10, MIO 47"
And defines the pin:
#define ledpin 47
But I don't know where does it come from. I don't know to translate it into my project.
Can somebody help me? Thanks in advance for your help
This is the line I use for LEd0 in my constraints file:
set_property PACKAGE_PIN T22 [get_ports {LD0}] # "LD0"
How can I access it form my C code to change the state through the function XGpioPs_WritePin ?

I'm trying to find the MIO Pin Numbers for the LEDs on the PYNQ-Z1 / ArtyZ7 board.

The solution for the above user seemed to be checking out some table in the HW Guide.

My board doesnt even seem to have a HW guide.

Ich checked the following resopurces:

https://reference.digilentinc.com/reference/programmable-logic/arty-z7/start

https://reference.digilentinc.com/_media/reference/programmable-logic/pynq-z1/pynq-rm.pdf

So where can I find the complete MIO?

thanks!

T

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @Trillian,

Here is the master XDC file for the Arty-Z7-20 which is very similar to the PYNQ-Z1. The XDC file has the pins for the buttons , LED's and switches along with other components that can be connected in the PL and that are not directly connected to the PS.  On page 5-6 of the reference manual here is a list of the relevant mio/emio pins. What LED are you looking to interact with? You can also use the Arty-Z7-20 board files if you are using Vivado/SDK instead of Juniper Notebook. If you are using Juniper Notebook then I would suggest to reach out to support here

cheers,

Jon

Link to comment
Share on other sites

Hi Jon,

thank you very much for your answer. I'm aware of the Documents you mentioned and unfortunately I cant find the information I'm looking for there.

At the moment I'm programming the PYNQ "vanilla" without the "python layer", so just with VIVADO and SDK. I am already using the board files (I tried the Arty as well as the PYNQ Board file).

17 hours ago, jpeyron said:

The XDC file has the pins for the buttons , LED's and switches along with other components that can be connected in the PL and that are not directly connected to the PS.

Maybe you could have a quick look at the Microzed Chroicles Part 9 and Part 10 or maybe you're familiar with the

AVNET Silicia Zynq Workshop for Beginners, there I'd refere to Page 17:

Quote

To flash an LED we first of all need to work out where the LEDs are on the ZedBoard, and to what they are connected. The ZedBoard Hardware User’s Guide (available from the http://zedboard.org website) tellsus that there are eight user LEDs, labelled  LD0 to LD7, but these are all connected to the PL (Programmable Logic) side of the Zynq device, and we have not yet configured that part of the device to do anything. Instead we shall use “LD9” for our exercise, and this is connected to pin 7 (PS_MIO7) of the 54 MIO pin s which are accessible on the “PS” (Processing System) side of the Zynq device.

I've been facing the same problem in severakl GPIO tutroials. It seems like people connect the Peripherals like LED/Switches/Buttons (you aksed which LED, I'm referring to the user LEDs above the Buttons but the RGB LEDS would also be fine, its just about the basic technique) via a GPIO IP Block in Vivado with the ZYNQ PS or alternatively connecting them through EMIO directly to the ZYNQ PS without the GPIO IP.

Then in the following steps after exporting the hdf to Vivado and building a BSP one should be able to access (read/write) these Pheripherals from within the PS. In order to do this one goes through Software Configuration and Initzialisation of an GpioPS instance accoring to the specific Pin those Peripherals are connected to. Which seems to be a MIO Number.

But I cant figure out where one gets these informations from. In every tutorial people just say "On the ZedBoard the LED Pin Number is 7" or "On the Microzed the Pin Number is XY".

See, what I'm really trying to accomplish here is learning how to send signals from the PS to the PL.

If I can set my LED HIGH or LOW I can for example also send ENABLE signals to my custom IP Blocks from PS. But I can't seem to figure out how this works.

 

Thanks a lot for your time and help,

T

Link to comment
Share on other sites

Hi @Trillian,

Here is a forum thread that discusses using the mio led for the Zybo. The process should be similar for the PYNQ-Z1. Here is an older tutorial that uses the leds,switches and buttons using the axi_gpio ip core for the zybo that should be easy to alter for use with the PYNQ-Z1. The user led and rgb led pin information is in the arty-z7-20 xdc. You can also find the pin information looking at the arty-z7-20 schematic here.

## RGB LEDs
#set_property -dict { PACKAGE_PIN L15    IOSTANDARD LVCMOS33 } [get_ports { led4_b }]; #IO_L22N_T3_AD7P_35 Sch=LED4_B
#set_property -dict { PACKAGE_PIN G17    IOSTANDARD LVCMOS33 } [get_ports { led4_g }]; #IO_L16P_T2_35 Sch=LED4_G
#set_property -dict { PACKAGE_PIN N15    IOSTANDARD  LVCMOS33 } [get_ports { led4_r }]; #IO_L21P_T3_DQS_AD14P_35 Sch=LED4_R
#set_property -dict { PACKAGE_PIN G14    IOSTANDARD LVCMOS33 } [get_ports { led5_b }]; #IO_0_35 Sch=LED5_B
#set_property -dict { PACKAGE_PIN L14    IOSTANDARD LVCMOS33 } [get_ports { led5_g }]; #IO_L22P_T3_AD7P_35 Sch=LED5_G
#set_property -dict { PACKAGE_PIN M15    IOSTANDARD LVCMOS33 } [get_ports { led5_r }]; #IO_L23N_T3_35 Sch=LED5_R

## LEDs
#set_property -dict { PACKAGE_PIN R14    IOSTANDARD LVCMOS33 } [get_ports { led[0] }]; #IO_L6N_T0_VREF_34 Sch=LED0
#set_property -dict { PACKAGE_PIN P14    IOSTANDARD LVCMOS33 } [get_ports { led[1] }]; #IO_L6P_T0_34 Sch=LED1
#set_property -dict { PACKAGE_PIN N16    IOSTANDARD LVCMOS33 } [get_ports { led[2] }]; #IO_L21N_T3_DQS_AD14N_35 Sch=LED2
#set_property -dict { PACKAGE_PIN M14    IOSTANDARD LVCMOS33 } [get_ports { led[3] }]; #IO_L23P_T3_35 Sch=LED3

 

thank you,

Jon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...