PYNQ: PYTHON PRODUCTIVITY FOR ZYNQ

How do I connect my own IP to a single pin in the Pynq hardware?

I’ve completed and understand the tutorial that connects the switches, buttons and LEDs to the AXI bus using the interfaces defined in the board files. All good. Makes sense and works.

I’ve also created a simple 30 bit counter that uses the 125 MHz clock on Pin H16 to blink the 4 LEDs. I found the pin assignments in the PynqZ2 user manual and created a constraints file. When I load the overlay, my block runs, but the PS freezes up, presumably because it no longer has a clock.

Next, I created a simple project with only the Zynq PS, ran the connection automation, wired the clock and checked that this worked. Theory confirmed, the PS needs its clock.

Now, when I try to add my own IP block to this project, I get warnings during the Synthesis step and Vivado conveniently sets the clock input for my block to constant zero instead of wiring it to Pin H16.

Can someone point me to resources or instructions on how to connect IP to individual pins on the Z2 board? The component definitions in the board file are all good and I guess I could use one of the Arduino components and ignore the pins I don’t need, but really I would like to simply connect a single pin to my IP.

Thank you

PS: I have my project running on the Arduino Vidor 4000 board (the one with an Intel Cyclone FPGA). I want to move it to Pynq to take advantage of the more capable PS to serve up the collected data, so I’m pretty sure I’m in the right place, I’m just stymied by how to connect to the hardware.

Now, when I try to add my own IP block to this project, I get warnings during the Synthesis step and Vivado conveniently sets the clock input for my block to constant zero instead of wiring it to Pin H16.

I guess what you are looking for, based on what I can understand from this sentence, is how to define this as a constraint in the constraints file?

You can try to get the info you need from the related manual. Or perhaps another good resource is the official xilinx forum. A search there for “constraints file” should provide a number of forum threads that ask similar questions.

Also, please take a look at the current Z2 constraints file to see how it’s done for other connections. It may be enough for you to get the info you need.

I hope you’ll find this useful. Apologies if I misunderstood your question.

There is a video tutorial here that may help:

If you are using a design with PYNQ, you should use one of the four PS to PL clocks to clock your IP, not the H16 pin/clock. You can enable/disable these clocks as needed in the PS configuration settings in Vivado, and configure the clock to the frequency you need.

It is worth mentioning, if you are using the PL standalone with this H18 pin, you need to connect an Ethernet cable to the Ethernet port (even if not using Ethernet). Without a cable present, the Ethernet PHY resets, and the clock from the PHY to the PL is not stable. (This doesn’t affect the clock directly connected from the oscillator to the PS.)

Cathal

OK thanks for this, it did help. I also found this in the Xilinx forums:

https://forums.xilinx.com/t5/Design-Entry/Need-help-connecting-pin-constraints-XDC-file-ports-to-Block/td-p/845186

Here is the key piece of information: Make sure the pin names match the names of the I/O in your design.

What I was missing was this: in the Vivado Block Design, right click to create a port and give it the same name as port in the XDC file. Draw the wires from your IP block to the port. Vivado will now connect things correctly. This is so simple but it was not obvious what to do.

Rgds,

Steve

PS: I used the PS clock instead of the Ethernet PHY.

1 Like

You can also change the names in the XDC to match the names in Vivado :wink:

For some port types, the names will get modified from what you see in the block diagram. For a new design, I like to use the IO planner in Vivado. This shows you the port, and you type in, or select the pin you want and the constraints are auto-generated. If you are confident about you pin names, you can skip this and add constraints in an XDC directly.

Cathal

Thanks again, I had some time to try a couple things last night. I found the best approach for me is to import the constraints file for the Z2 board into my Vivado project and use the pin names from that file. This reduces the chance of mistakes and should be clear if anyone else ever looks at my projects.

I built the classic “blink LED” project (actually, the 4 LEDs connect to the top four bits of a 30 bit counter) so I now understand how to get signals on/off the board. (It’s should be a simple step to choose a header pin instead of an LED.)

1 Like