OpenCores
URL https://opencores.org/ocsvn/dblclockfft/dblclockfft/trunk

Subversion Repositories dblclockfft

[/] [dblclockfft/] [trunk/] [bench/] [cpp/] [fft_tb.m] - Blame information for rev 26

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 dgisselq
% Read the file
2
fid = fopen('fft_tb.dbl','r');
3
raw = fread(fid, [2 inf], 'double');
4
fclose(fid);
5
 
6
% Convert the raw doubles into complex values
7
datc = raw(1,:)+j*raw(2,:);
8
% Reshape the matrix into one line per FFT
9
% Assume an FFT length of 2048
10
ftlen = 2048;
11 26 dgisselq
% ftlen = 128;
12
ndat = reshape(datc, ftlen*2, length(datc)/(ftlen*2));
13 14 dgisselq
 
14 26 dgisselq
truth  = ndat((ftlen+1):(2*ftlen), :);
15
output = ndat(1:ftlen,:);
16
 
17 14 dgisselq
% Create a time axis, for use in plotting if desired
18
tm = 0:(ftlen-1);
19
 
20
% Now, the data from the test is ready for inspection
21
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.