While the algorithm mentioned above is simply stated, the most difficult part of the data conversion is finding the position of the most significant bit. A typecast from U32 to SGL is much cheaper (in terms of CPU resources) than a conversion from FXP to SGL. For example single-precision floating-point data can be stored as an unsigned 32 bit word (U32) on the FPGA and then typecast into a SGL precision floating-point value by the host application. LabVIEW FPGA does not natively support floating-point data types, but an understanding of IEEE Std 754-2008 standard (for floating point binary representation) will enable us to encode floating-point data types as unsigned integers. The conversion from fixed-point to floating point may certainly be done by the windows or real-time host application, but depending on available computing resources it can be advantageous to perform that conversion down on the FPGA. In many applications it is necessary to convert fixed-point data to a floating-point representation for processing or streaming operations. The fixed-point data type used by LabVIEW FPGA is a useful feature especially when working with NI C Series modules. The following applies to the LabVIEW 2011 FPGA Module and earlier. Beginning with the LabVIEW 2012 FPGA Module, you can perform fixed-point to floating point conversions using the To Single Precision Float function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |