Forum Discussion
Altera_Forum
Honored Contributor
11 years agoHow to handle multiple .aocx files
Hi,
I am actually implementing a design on an FPGA consisting of 9 kernels and it turns out that all 9 kernels cannot fit the FPGA. So I need to divide them into two different groups and call one group at a time. My question is how can I tell the device to change from the first group to the other? My guess is that I just need two different programs but I am not quite sure how I have to do in practice (since it is not clear to me with which function the FPGA is actually programmed and so how to program the device with a different bitstream). Thanks in advance.3 Replies
- Altera_Forum
Honored Contributor
As long as you create one cl_program object per aocx binary file, all within the same context, then whenever you enqueue a kernel from those cl_program objects the OpenCL runtime will automatically reconfigure the FPGA if needed. You can do this all within the same program, and in fact the same thread.
- Altera_Forum
Honored Contributor
the swapper test from the custom_platform_toolkit exercises reprogram-on-the-fly support.
- Altera_Forum
Honored Contributor
You will understand however that you cannot use channels / pipes between kernels of the first group and the second group. You will need to have them communicate over the global memory, which is persistent between kernel enqueues and thus FPGA reconfiguration.