6. Datatype Best Practices
After you optimize the algorithm bottlenecks of your design, you can fine-tune some datatypes in your component by using arbitrary precision datatypes to shrink data widths, which reduces FPGA area utilization. The Intel® HLS Compiler Standard Edition provides debug functionality so that you can easily detect overflows in arbitrary precision datatypes.
Tutorials Demonstrating Datatype Best Practices
The Intel® HLS Compiler Standard Edition comes with a number of tutorials that give you working examples to review and run so that you can see good coding practices as well as demonstrating important concepts.
|You can find these tutorials in the following location on your Intel® Quartus® Prime system:
|Demonstrates the effect of using ac_int datatype instead of int datatype.
|Demonstrates the use of the ac_fixed constructor where you can get a better QoR by using minor variations in coding style.
|Demonstrates the operators available for the ac_int class.
|Demonstrates the usage of the DEBUG_AC_INT_WARNING and DEBUG_AC_INT_ERROR keywords to help detect overflow during emulation runtime.
|Demonstrates the effect of using single precision literals and functions instead of double precision literals and functions.
|Demonstrates how integer promotion rules can influence the behavior of a C or C++ program.