|FFT and testbench in VHDL|
|Extract this archive and copy the files to a directory. Then open FftRtl_1024.vhd.
This is the top module of FFT. In/Out pins are defined in Entity. As to its specification, please see this site (sorry, written in Japanese)
There are 14 files. The FFT itself consists of the following nine files. There are block diagrams --> FftRtl_1024, AdrsGen, RamCtrl, butterfly (sorry, including Japanese comments)
Other five files are "environmental files" to inject test signals to FFT itself.
The top module of environmental files is tb_fft.vhd, which is called "testbench". It connects FFT and signal generators (clks.vhd, datas.vhd, up_out.vhd). Clks.vhd, that emulates a crystal generator, supplies a clock to FFT. Datas.vhd, that emulates a A/D converter, injects serial data to FFT. Up_out.vhd, that emulates a microcontroller, sends signals like "Capture Start", "FFT Start", etc.
In "test mode", up_out.vhd reads "FixedIn.txt" and use it as input data of FFT. And note that FixedIn.txt is exactly the same as the one used in the previous class "Switch the C source to fixed point".
And trigonometric functions in the previous class was following.
Please open TriRom.vhd. You can see the same one in VHDL.