Fc100 - floating point fast fourier transform, Testbench and matlab programs – Sundance FC100 v.2.3 User Manual

Page 12

Advertising
background image

FC100 - Floating Point Fast Fourier Transform

v2.3

Fast Fourier Transform product manual

October 2005

www.sundance.com

- 12 -

Testbench and Matlab programs


The FFT core package comprises a VHDL testbench and two Matlab programs to
generate data and check results.

fftcore_TB.vhd

: This testbench is designed to work with the FFT core. It reads the

twiddle factors from a file (‘fftcore_twiddle.txt’) and stores them in the twiddle factors
memory bank connected to the core. The input data are also read from a file
(‘fftcore_data_in.txt’) and stored in a memory bank that will be accessed by the core once
started. Upon the transform completion, the results, available in one of the processing
memory banks, are written to a file (‘fftcore_results.txt’).
Please make sure that the file paths in the testbench VHDL file are pointing to the folder
where the files are being stored.


FFT_test.m

: This Matlab program generates data and twiddle factors in the floating

point format expected by the core (see Data format). The FFT core data and the twiddle
factors are saved in an ASCII format respectively in the ‘fftcore_data_in.txt’ and
‘fftcore_twiddle.txt’ files. A third file, ‘fftcore_parmaters.txt’, contains the parameters for
the FFT core simulation.
Please make sure that the file paths in the FFT_test.m Matlab program are pointing to the
same files as the VHDL testbench.


Analyse_FFT_results.m

: This Matlab program reads the input data file

(‘fftcore_data_in.txt’), the output result file (‘fftcore_results.txt’) from the testbench,
calculates the expected results with the fft Matlab function and saves the Signal-to-Noise
Ratio for each FFT/IFFT in a file (fftcore_SNR.txt).
Please make sure that the file paths in the Analyse_FFT_results.m Matlab program are
pointing to the same files as the VHDL testbench.

For the IEEE-754 data format the data input file is coded in an ASCII binary format on
32 bits:

Line1

: Real 0

Line2

: Imag 0

Line3

: Real 1

Line4

: Imag 1

Line5

: Real 2


The data output file has the same format as the data input file.

Advertising
This manual is related to the following products: