MATLAB vs FFT IP core ALTERA Fixed-Point Representation:

5 次查看(过去 30 天)
I am working with an Altera FFT IP core and MATLAB to process FFT results. I have noticed a discrepancy in the fixed-point representation of the real part of the FFT results between the two systems. For example, the real part results from the Altera FFT IP core are 4608 and -512, while the corresponding results from MATLAB are 4.6080 and -0.5120
  • How does the fixed-point representation in MATLAB differ from that of the Altera FFT IP core?
  • How can I convert the results from the MATLAB to match fixed-point FFT IP core Altera format?
  • Are there any specific functions or tools in MATLAB that facilitate the matching of fixed-point formats between MATLAB and FPGA implementations?
Thank you!

回答(1 个)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2024-7-8
编辑:UDAYA PEDDIRAJU 2024-7-8
Hi Nikolaos,
The difference in fixed-point representation is causing the mismatch between your Altera FFT IP core and MATLAB results. The Altera core uses a specific format with defined word size and scaling, while MATLAB likely uses its default fixed-point representation.
To address this:
Matching Fixed-Point Format:
  • Check Altera Documentation: The Altera documentation should detail the core's fixed-point format, including word size (number of bits) and scaling (binary point location).
  • MATLAB Fixed-Point Toolbox (if available):If you have the Fixed-Point Toolbox, you can create a custom data type in MATLAB that matches the Altera core's format. Use "fi" function specifying the word size and scaling based on the Altera documentation.
  • Once you have the matching data type, you can scale your MATLAB results using the "fi*" multiplication and "/" division functions to convert them to the Altera core's format.
Manual Scaling:
  • Identify Binary Point: Again, refer to the Altera documentation to find the location of the binary point in the core's fixed-point representation.
  • Manual Shift: In your MATLAB results, you can manually shift the decimal point to match the Altera core's binary point location. However, this approach might introduce rounding errors and is less precise than using the Fixed-Point Toolbox.
I hope these suggestions helps to figure out the issue!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by