PYNQ: PYTHON PRODUCTIVITY FOR ZYNQ

Question about the use case of overlay in PYNQ

Hi,

I have a basic question related to the use case of overlay in PYNQ.

Provided that the application is implemented by SW in the PS and HW in the PL. The input data of the application is stored in the DRAM in advance. The SW is to control and configure the HW accelerator in the PL. However, the HW accelerator is divided by 3 sub-HW tasks in terms of serial execution in time i.e. sub HW A–>sub HW B–> sub HW C. All the communication among sub HW task A, B and C are through the DRAM which performance is enough.

In the context, from the perspective of overlay in PYNQ, can use implement the HW by changing the contents of the PL on the fly like the following code ? Does the reloading new overlay not corrupt or ruin the status and SW code in the PS ? Are there any thing should be careful if loading overlay on the fly without impacting the PS ?

Sample code in the .py to run on PYNQ

#load the first HW overlap sub task to process in PL. output data is stored in the DRAM
overlay = Overlay(’/home/xilinx/sub_HW_1.bit’)

#load the second HW overlap sub task to process in PL. output data is stored in the DRAM
overlay = Overlay(’/home/xilinx/sub_HW_2.bit’)

#load the third HW overlap sub task to process in PL. output data is stored in the DRAM
overlay = Overlay(’/home/xilinx/sub_HW_3.bit’)

.Thanks

If I understand your question correctly, yes, you can reload the PL with different designs, and retain data in memory.
You need to be careful you don’t reload a design while an AXI transaction is in progress. This can lock an AXI bus. (E.g. if you have a video stream running that is reading/writing to a framebuffer)
You should make sure the PL design is “stopped” before loading the new design.

Cathal

reload the PL with a different design is only through partial bit stream, is it?

Hi,

The original question I asked was regarding the case of full bit stream for simplicity instead of partial bit stream.

FYI

Thanks

All the best,
Nan-Sheng

No, you can (re)load a full bitstream at any time.

Cathal