Azzera filtri
Azzera filtri

MATLAB vs FFT IP core ALTERA Fixed-Point Representation:

29 visualizzazioni (ultimi 30 giorni)
Nikolaos M.
Nikolaos M. il 3 Lug 2024 alle 11:05
Modificato: UDAYA PEDDIRAJU il 8 Lug 2024 alle 9:28
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!

Risposte (1)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU il 8 Lug 2024 alle 7:31
Modificato: UDAYA PEDDIRAJU il 8 Lug 2024 alle 9:28
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