资源简介
基于FPGA的FFT的描述语言。有详细说明每一个模块,和那个时序图。
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %{tool}
% file : fft1536_tb.m
%
% Description : The following Matlab testbench excercises the Altera FFT Model fft512_model.m
% generated by Altera‘s FFT Megacore and outputs results to text files.
%
% 2001-2007 Altera Corporation All Rights Reserved
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all; close all;
% Read input complex vector and output complex vector from source text files
fidr = fopen(‘real_input.txt‘‘r‘);
fidi = fopen(‘imag_input.txt‘‘r‘);
reali=fscanf(fidr‘%d‘);
imagi=fscanf(fidi‘%d‘);
fclose(fidi);
fclose(fidr);
fidor = fopen(‘real_output_ver.txt‘ ‘r‘);
fidoi = fopen(‘imag_output_ver.txt‘ ‘r‘);
realo = fscanf(fidor‘%d‘);
imago = fscanf(fidoi‘%d‘);
fclose(fidor);
fclose(fidoi);
lengthr = min(length(reali) length(realo));
lengthi = min(length(imagi) length(imago));
figure(1)
subplot(211)
plot(reali(1:lengthr));
title(‘input vector‘);
subplot(212)
plot(imagi(1:lengthi));
figure(2)
subplot(211)
plot(realo(1:lengthr));
title(‘output vector‘);
subplot(212)
plot(imago(1:lengthi));
diffr= (reali(1:lengthr)-realo(1:lengthr));
diffi= (imagi(1:lengthi)-imago(1:lengthi));
figure(3)
subplot(211)
plot(diffr);
title(‘diff_real‘);
subplot(212)
plot(diffi);
title(‘diff_imag‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 917 2007-12-10 15:54 ifft_fft_unitygain91\BFP_unitygain.qpf
文件 2382 2013-05-08 11:06 ifft_fft_unitygain91\BFP_unitygain.qsf
文件 521 2009-12-10 13:39 ifft_fft_unitygain91\BFP_unitygain.tcl
文件 5176 2009-12-10 13:08 ifft_fft_unitygain91\BFP_unitygain.v
文件 48617 2013-02-19 09:41 ifft_fft_unitygain91\BFP_unitygain_assignment_defaults.qdf
文件 8376 2007-12-19 10:22 ifft_fft_unitygain91\BFP_unitygain_tb.v
文件 9615 2009-12-10 15:25 ifft_fft_unitygain91\fft91.v
文件 4492 2007-12-19 10:50 ifft_fft_unitygain91\Scaler.v
文件 1743 2007-12-10 15:14 ifft_fft_unitygain91\unity_gain_tb.m
文件 4968 2007-12-19 11:11 ifft_fft_unitygain91\wave.do
目录 0 2013-05-08 11:06 ifft_fft_unitygain91\db
目录 0 2013-02-19 11:06 ifft_fft_unitygain91
----------- --------- ---------- ----- ----
86807 12
- 上一篇:IT信息系统项目监理实施细则样本
- 下一篇:极限学习机改进算法
评论
共有 条评论