Confusion regarding Stratix 10 OpenCL compilation report
I have compiled an OpenCL-with-RTL design for both the s10gx reference board and the pac_s10_dc board on the devcloud darby nodes. The design works fine, but the compilation report has left me confused about what resources it's using.
I had previously compiled a similar design for arria10 boards, and I was maintaining a spreadsheet listing Fmax and resource usage for various design configurations. I did this easily, without having to use the reports.html GUI, by going into the reports subdirectory in the build directory and parsing a line of text I pulled out via a find/grep command:
find . -name "quartus_data.js" | xargs grep -i "quartusfitresourceusagesummary"
This returned a line that contained Fmax and kernel resource usage information (among other info). In particular, I could verify that the Fmax and kernel resource usage listed there matched what I saw on the report.html GUI.
The Stratix 10 compiles do not appear to have that same quartus_data.js file, nor any file with that same string, so I went looking around for some other file I could parse for my answers. The most promising of those is acl_quartus_report.txt. For one of my builds, it looks like this:
ALUTs: 170781
Registers: 383,070
Logic utilization: 175,003 / 933,120 ( 19 % )
I/O pins: 653 / 912 ( 72 % )
DSP blocks: 45 / 5,760 ( < 1 % )
Memory bits: 5,288,728 / 240,046,080 ( 2 % )
RAM blocks: 811 / 11,721 ( 7 % )
Actual clock freq: 261
Kernel fmax: 261.09
pll_1x_setting: 261
pll_2x_setting: 522
1x clock fmax: 261.09
2x clock fmax: 10000
Highest non-global fanout: 4662
However, the report.html GUI for that same compile lists the following kernel resource stats:
Kernel System:
ALUTs FFs RAMs MLABs DSPs
42545 84118 509 966 84
Those stats are totally different from each other, and it's not as if one's uniformly larger than the other. What's going on? Is there a text file I can parse easily that will give me the correct resource usage stats?
Thank you!
Yes, the numbers in "acl_quartus_report.txt" is the entire chip usage. I just did a comparison between the HTML report on Arria 10 and Stratix 10 and I think I now see what you mean. On Arria 10 reports, after place and routing, a new section is added to the summary tab of the report named " Quartus Fit Resource Utilization Summary" which has the post-place-and-route resource usage of the kernel alone. However, this does not exist in the report for Stratix 10.
Looking through the compilation files, it seems these numbers are extracted from the biggest "*.fit.rpt". There is a table called "Fitter Resource Utilization by Entity" in the file and the entity called "freeze_wrapper_inst" seems to refer to the whole dynamic partition that includes the OpenCL kernel instance and its interfaces to the BSP. The same table also exists in the compilation folder for Stratix 10, it is just that it is located in "build/output_files/". I believe the same entity in that report also refers to the dynamic partition of the design and its area usage should represent the post-place-and-route area usage of the kernel, which is what you are looking for.