VHDL-Code-8-Point-FFT DOCX

Title VHDL-Code-8-Point-FFT
Author Arush Bhatia
Pages 5
File Size 23.5 KB
File Type DOCX
Total Downloads 46
Total Views 293

Summary

VHDL code for 8 point FFT algorithm A Fast Fourier Transform(FFT) is an efficient algorithm for calculating the discrete Fourier transform of a set of data. A DFT basically decomposes a set of data in time domain into different frequency components. DFT is defined by the following equation: A FFT al...


Description

VHDL code for 8 point FFT algorithm A Fast Fourier Transform(FFT) is an efficient algorithm for calculating the discrete Fourier transform of a set of data. A DFT basically decomposes a set of data in time domain into different frequency components. DFT is defined by the following equation: A FFT algorithm uses some interesting properties of the above formula to simply the calculations. You can read more about these FFT algorithms here. Many students have been asking doubts regarding vhdl implementation of FFT, so I decided to write a sample code. I have selected 8 point decimation in time(DIT) FFT algorithm for this purpose. In short I have wrote the code for this flow diagram of FFT. This is just a sample code, which means it is not synthesisable. I have used real data type for the inputs and outputs and all calculations are done using the math_real library. The inputs can be complex numbers too. To define the basic arithmetic operations between two complex numbers I have defined some new functions which are available in the package named fft_pkg. The component named, butterfly , contains the basic butterfly calculations for FFT as shown in this flow diagram. I wont be going any deep into the theory behind FFT here. Please visit the link given above or Google for in depth theory. There are 4 vhdl codes in the design,including the testbench code, and are given below. The package file - fft_pkg.vhd: library IEEE; use IEEE.std_logic_1164.all; use IEEE.MATH_REAL.ALL; package fft_pkg is type complex is record r : real; i : real; end record; type comp_array is array (0 to 7) of complex; type comp_array2 is array (0 to 3) of complex; function add (n1,n2 : complex) return complex; function sub (n1,n2 : complex) return complex; function mult (n1,n2 : complex) return complex; end fft_pkg;...


Similar Free PDFs