- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am new to Intel Altera.
I am trying to list the resource utilization for the nested functions.
Lets consider the following example:
int foo(int a) {
...
}
//Kernel function
void my_kernel_function( // Input and output matrices
__global int *axi,
// Widths of matrices.
int A_width)
{
int a;
a = foo(axi[0]);
....
}
When I generate the report after running the aoc compiler, I am not a getting detailed report containing utilization from "foo" function but, only from my_kernel function. I believe this is because of compiler inlining the functions.
How can make changes in the program to adapt and find the necessary resources for the same?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May I have the full design code and I would like to compile at my side for further investigate?
Also, may I know the information as below:
- OS version
- OpenCL SDK edition and version
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
- OS Version - CentOS Linux release 7.7.1908 (core)
- OpenCL SDK edition and version - Intel(R) FPGA SDK for OpenCL(TM). version 18.1.2 Build 277 Pro Edition
- The target board is pac_s10_dc
My code is a test code not a real project more like a helloworld program for testing nested functions. I have attached the source code as a zip along with this post.
You can run the cl file after unzipping it with the following compiler options:
aoc -rtl -report -v -board=pac_s10_dc -fp-relaxed -fpc test_nesed_functions.cl
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What "report" are you looking at? The HTML report includes detailed line-by-line and block-by-block area utilization. There is no function call on FPGAs and all functions are inlined/flattened without exception; a function call does not represent anything meaningful in an FPGA kernel after synthesis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For the foo function with an empty body, the compiler will optimize it away and could not find the utilization for the foo function.
For the foo function without an empty body, the compiler will inline the function.
However, you should still see the area usage for that function in the reports. It will first point to the call in my_kernel_function and then foo function.
Thanks

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page