Learning floating-point to fixed-point operations in DSP with afreez-simulation of floating-point operations on fixed points and common strategies

Source: Internet
Author: User

4. Number of points to simulate floating-point operations and common strategies

I believe that you have understood the general situation of converting a floating point to a fixed point operation. In fact, the principle is very simple. If it is applied to actual projects, various problems may occur. In my experience, there are several common strategies:

--------------------------------------------------------

Statement:
This article is original. You are welcome to reprint it. Please keep the following information for reprinting.
Author: Afreez Beijing - Zhongguancun
Contact info: Afreez.gan@gmail.com (Welcome to discuss with the author)
Initial Release Date: 2007-02-08

Initial Release on: Http://blog.csdn.net/ganxingming/

Without my consent, I shall not use words for commercial or profit purposes. Otherwise, the author has the right to pursue relevant responsibilities!
---------------------------------------------------------

 

1)Division to multiplication or shift

We know that, regardless of the hardware platform transformation, Division operations require much more clock cycles than multiplication operations and addition and subtraction shift operations, especially in embedded applications, "efficiency" is particularly important. Based on my experience, a large part of Division operations in the project can be converted into multiplication and shift operations, which greatly improves the efficiency.

 

2)Table store

Some arithmetic expressions may involve a lot of headaches in mathematical formulas, especially on the embedded hardware platform. This is a headache because the hardware-related software platform provides limited functions, some do not have many mathematical formulas such as "common" operators. If this type of operation rarely appears in a project and the number of its values is small, you can consider analyzing various situations, make various possible results into a static table (which can be understood as an array), and then use a simple conditional judgment statement to solve this type of problem.

 

3)Level Expansion

The problem background is the same as above. For some mathematical formulas, if the value range is not easy to handle, you can use the series expansion method.

 

4)Simultaneous variation of molecular denominator

For some Division operations, to ensure accuracy, if the molecular expansion range is not large enough, you can reduce the denominator or achieve the expected results. For specific examples, refer to my other article.Article" Solved a problem 2 Daily problems , Fixed Point Operation Problems ".

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.