PYNQ: PYTHON PRODUCTIVITY

Arduino IOP SPI Configuration

Hi guys,

In the pre-baked base overlay, the SPI frequency seems to be set a 6.25MHz (1/16 divider off the 100MHz CLK). In the python environment, can we manipulate the SPI frequency without having to reconfigure the base overlay with vivado? For example, I will need to generate a 50MHz SCLK for the SPI interface…

Thanks!

The available IP doesn’t support run time clock configuration, otherwise support for this would be included.
The IP accepts an external clock that it then steps down internally. It may be possible to dynamically update the clock, but in the PYNQ base overlay, this clock is the main 100MHz clock used to clock most IP in the design, including the MicroBlaze processors. It probably isn’t a good idea to try and change this.

Cathal

From what I understand, the SPI controller is configured through a divider from the master clock (100MHz). It still would not be a good idea to change the divider ratio itself while keeping the master clock the same thus not impacting the microblaze timing?

The plan was to modify the clock divider setting in the AXI-SPI IP in the base overlay. I have not been able to test this since I have been running into a slew of problems trying to rebuild the base
TCL in Vivado.

Yes, it would not be a good idea to modify the main clock. This may be a very quick way to check if you wanted to test your design at a slower clock speed.
It would be much better to modify the clock divider.
What problems are you having with rebuilding the design?

Cathal

I keep running into “can’t unset ‘period’: no such variable” error

EDIT: This was resolved by putting my glasses on and reading that Glasgow release (PYNQ 2.5) is designed for Vivado 2019.1 release which is what I am working with. Everything runs smoothly now.

1 Like