Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
654 Discussions

Learning to use Fixed-point Arithmetic in Intel FPGAs with OpenCL

JRome28
Novice
800 Views

Hi. I am not sure if this forum is the appropriate for this issue but I have not found the correct one.

 

Reading the "Intel FPGA SDK for OpenCL Pro Edition: Best Practices Guide", at page 100 we can find section "4.3.1. Floating-Point versus Fixed-Point Representations".

 

In that section we can learn the recommendation to change floating-point operations to fixed-point operations, in order to save resources and energy in FPGA designs. However, there is no example to learn to do this optimisations if you are a beginner in FPGAs as I am.

 

Does anyone know a good tutorial /paper/ documentation / examples about to learn how to convert kernels written with floats into kernels based in fixed-point arithmetic? I have found very short and theoretical information about this issue and I want to learn to implement this optimisations in my codes.

 

Thanks in advance.

0 Kudos
2 Replies
AnilErinch_A_Intel
681 Views
Hi There are multiple steps which can be used to covert from floating point to fixed point. The things to note is whether your specific application is keen about the resolutions. As precision can be compromised when converting from floating point to fixed point data type. Intel FPGA SDK compiler supports OpenCL version 1.0 the following strategies can be used to convert from floating point to fixed Please refer to section "6.2 Conversions and Type Casting" in the OpenCL specification from available documentation to be downloaded from the khronos group website https://www.khronos.org/registry/OpenCL/specs/opencl-1.0.pdf Regarding limiting size of fixed point data to the required bit field widths , please make use of bit masking effectively as per the requirements of the program. An example for the same is given in the page 101 of the same document you mentioned. Hope this helps , Thanks and Regards Anil
JRome28
Novice
681 Views

Thank you very much for your answer.

 

I will take a look to the link you provided me and to figure out the best way to convert my application from floating point to fixed point data type.

0 Kudos
Reply