Variable frequency controlled in python(pynq) for custom AXI IP

Hello,

I am working on a zynq based project on pynq z2, where I have a AXI stream IP (say, an adder - single master, single slave) with fifo’s on either ends.

The goal is to run the IP block at variable frequency by muxing the clocks generated from PLL.

Question:

How to send the data for the select lines of the mux from pynq, so that I can control the frequency of the IP from pynq as the data keeps streaming in at PS frequency. Any idea in this regard would be great.

Block Design:

Pynq Image Version: v2.7
Board: Pynq z2
Vivado version: 2020.2

Thanks in advance.

1 Like

Hi,

There are a few ways you can do this.

  1. Use PS GPIO and control them with the GPIO class PYNQ_Workshop/1_ps_gpio.ipynb at master · Xilinx/PYNQ_Workshop · GitHub
  2. Use an AXI GPIO PYNQ_Workshop/2_axi_gpio.ipynb at master · Xilinx/PYNQ_Workshop · GitHub
  3. Instead of using a clocking wizard you can enable another clock output from the PS and control it from pynq using the pynq.ps.Clock object

https://pynq-testing.readthedocs.io/en/master/pynq_package/pynq.ps.html#pynq.ps.Clocks

An example here | notebook.community

Mario

2 Likes

Thanks for the response @marioruiz