Doubts regarding recursive function call

Dear PYNQ Community Members,

I would really appreciate your help in the following matter.
I am trying to run a kernel, on the PYNQ board, that is recursively called (more than 20 times!) by the test bench and I’m unsure about the underlying protocols and the synthesis-related part.
I have previously run a non-recursive kernel on the same PYNQ board successively but I am unsure about the modifications required to run a recursive kernel.
Will the process and protocols be the same for the recursive kernel?

Kindly advise.
Thank you.


Can you explain more about what you are doing or trying to do?
Do you mean the code for your hardware kernel is recursive? Generally you can’t synthesize recursive code unless it is statically determinable at compile time.
Rather than recursive, I’d think about this as deeply nested. If it is nested, you would call it in the same way as any other kernel.


Thank you for your reply!
I was trying to implement graph partitioning and send the various partitions of the graph to the hardware kernel code for further processing. Due to this, I was unsure about how I could call it.

Did you try to synthesize it yet?

Can you post a (simplified) example of your code? This is more an FPGA issue rather than PYNQ, so you may want to try search/post on Xilinx forums.


Yes, I did synthesize it.
I am trying to implement PageRank and my kernel is for matrix multiplication.
Since PageRank is an iterative graph algorithm and that I am trying to implement graph partitioning, I repeatedly call my kernel (matrix multiplication) from the test bench.

Okay, I will post it on the Xilinx forum too.
Thank you for your help.