Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThat's correct, by default the function you accelerate will become blocking when called as to not break sequential code. There are pragmas you can add to the function to instruct the compiler to generate a non-blocking wrapper which you would then either implement polling or use an interrupt to let your application know when the accelerated function is complete.
What C2H does is generate a wrapper file that gets linked in, instead of the actual C code. This wrapper file optionally flushes the data cache, it writes the parameters of the function to the hardware accelerator, and by default polls the accelerator waiting for it to complete. Once the polling is done the wrapper exits and you continue running the application on the CPU.