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!