tms320f28035 Study record Five

Source: Internet
Author: User

Use of Iqmath Lib

Reference manual "Iqmath_quickstart.pdf" version V1.6.0

Storage path:C:\ti\controlSUITE\libs\math\IQmath\v160\doc

1.tms320f28035 is a TI Company launched a fixed-point DSP chip, the hardware itself does not support floating-point arithmetic, in use The floating-point arithmetic used in C programming is done at the software level, not tms320f28035 with floating-point arithmetic capability. Using C language programming to implement floating-point arithmetic on software will increase the amount of code and program running time. Iqmath is a method of calculating the characteristics of floating-point data processing with fixed-point arithmetic, and Iqmath also has rich function library.


The advantage is that the processing speed is fast and the code volume is low. The disadvantage is that there may be errors when the decimal floating-point number is converted into binary.

The 4.IQ format is composed of an integer part (I), a decimal part (Q), and a symbol bit. So i+q=31 bit. When the Q value is determined, the accuracy of the IQ data for all participating operations is consistent, and the dynamic range of the data is determined. The specific Q value corresponds to the accuracy and data range can be looked up in the table.

Simple induction of 5.IQmath applications:

1)q -value calibration: Select a Q value according to the required error and data range .

2) The floating-point number is converted to the IQ data format.

3) convert IQ data to floating point numbers.

6.iqmath.lib for fixed-point chips. The iqmath_f32.lib is used for floating-point chips.

some recommendations for 7.CMD file configuration:

The output section "iqmathtables", contains some functions that have been burned to the bootrom area, so must be set to " NOLOAD"type, check the table in the bootrom area without having to load other areas.

The output section "Iqmathtablesram" contains functions that can be loaded when needed, and some chips also burn these functions to the bootrom area, looking directly at the table.

8. Configuring the IQmath.lib library file in the project

1). and join C file in a similar way, just know the path and add it

2). need to be C the file contains #include "IQmathLib.h"

3). Configuration . CMD file.

9.IQmath Usage Notes

1. in IQmathLib.h , modify the Q format as needed , ranging from Q1 to Q30 ( P30)

<= global_q <= 1

//

#ifndef global_q

#define GLOBAL_Q 24

#endif

IQmathLib.h default is Q24 format .

The value range and accuracy of the Q format are described in the page of the manual

the process of using iqmath

1) All data that participates in the operation must be converted to the Q format, e.g.

#define PI 3.1415926535898

_iq input = _iq (PI); convert PI to Q format

2) after conversion to Q format, all data participate in the calculation, must use the IQ library function to calculate

3) convert Q format to floating point

Float _iqtof (_iq A)

11.

tms320f28035 Study record Five

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.