⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fft_small_model.m

📁 FFT 32k use VHDL MATLAB
💻 M
字号:
% function [y, exp_out] = fft_small_model(x,N,INVERSE)         %                                                                                             %   calculates the complex block-floating point FFT/IFFT of length N of a                     %   complex input vector x                                                                    %                                                                                             %   Inputs:   x          : Input complex vector of length B*N, where B is                     %                          the number of blocks over which the length-N FFT is to             %                          be applied. If the length of the vector is not                     %                          an integral multiple of N, zeros are                               %                          appended to the input sequence appropriately.                      %             N          : Transform Length                                                   %             INVERSE    : FFT direction                                                      %                          0 => FFT                                                           %                          1 => IFFT                                                          %                                                                                             %   Outputs   y          : The transform-domain complex vector output                         %             exp_out    : Block exponent value                                               %                                                                                             %   Copyright (C) 1988-2004 Altera Corporation                                                function [y, exp_out] = fft_small(x,N,INVERSE)         addpath 'C:/software/altera/MegaCore/fft-v2.1.3/lib//ip_toolbench/../';% Parameterization Space    THROUGHPUT=4;ARCH=0;DATA_PREC=16;TWIDDLE_PREC=16;input_vector_length = length(x);                                                              number_of_blocks = ceil(input_vector_length/N);                                               % Zero-stuff last block if necessary                                                          x = [x, zeros(1,number_of_blocks * N - input_vector_length)];                                 y=[];                                                                                         exp_out=[];                                                                                   for i=1:number_of_blocks                                                                          rin = real(x((i-1)*N + 1: i*N));                                                              iin = imag(x((i-1)*N + 1: i*N));                                                              [roc,ioc,eoc] = sfftmodel(rin,iin,N,THROUGHPUT,ARCH,DATA_PREC,TWIDDLE_PREC,INVERSE);          y = [y, roc+j*ioc];                                                                           exp_out = [exp_out, eoc];                                                                 end                                                                                           

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -