Skip to content
Snippets Groups Projects
Commit 89c92950 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Add summary of FIR coef order.

parent 77a11411
No related branches found
No related tags found
1 merge request!1Clarified flipped order of FIR coefficients in PFB.
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
% 0 -1023 1023 2047 3071 4095 --> + --> -1023 % 0 -1023 1023 2047 3071 4095 --> + --> -1023
% . . . . . % . . . . .
% . . . . . % . . . . .
% -2 2 . . . -2 % -2 2 . . . --> + --> -2
% -1 1 . . . -1 % -1 1 . . . --> + --> -1
% 1023 0 0 1024 2048 3072 --> + --> 0 % 1023 0 0 1024 2048 3072 --> + --> 0
% d h h h h d % d h h h h d
% %
...@@ -124,15 +124,30 @@ ...@@ -124,15 +124,30 @@
% and the older samples are multiplied by the subsequent coefficients, % and the older samples are multiplied by the subsequent coefficients,
% because it is a convolution. Therefore the FIR coefficients need to be % because it is a convolution. Therefore the FIR coefficients need to be
% flipped up/down per column, to allow doing the filter as a d .* h vector % flipped up/down per column, to allow doing the filter as a d .* h vector
% multiply in pfir.m. The FFT operates on blocks of data with same index and % multiply in pfir.m. The FIR filter sums the rows for the N_taps = 16 to
% time range as the WG. The data output of the FIR filter fits this input % yield the input for the FFT. The FFT operates on blocks of data with same
% range of the FFT. Therefore no data flipping is needed. % index and time range as the WG. The data output of the FIR filter fits
% this input range of the FFT. Therefore no data flipping is needed.
%
% In summary:
% * The WG data and FFT input data is processed in blocks with the newest
% sample at the bottom and the oldest sample at the top. In the FIR filter
% the newest block is at the left and the oldest at the rigth. Therefor
% the FIR filter coefficients also have to be ordered from bottom left to
% top right.
% * The column size is determined by N_fft of the FFT. The FFT is calculated
% each time a block is shifted in. For a critically sampled PFB the block
% size is N_blk = N_fft, so then it also looks like the blocks only shift
% from left to right. Using N_blk < N_fft would yield an oversampled PFB
% with oversampling factor R_os = N_fft/N_blk. Then the blocks shift from
% top to bottom in each column and from left to right.
% %
% In the tb_verify_pfb_response.vhd the input stimuli is a block of N_fft = % In the tb_verify_pfb_response.vhd the input stimuli is a block of N_fft =
% 1024 ones followed by N_taps-1 blocks with zeros. In time the oldest data % 1024 ones followed by N_taps-1 blocks with zeros. In time the oldest data
% will appear first in the simulator Wave Window, so therefore the % will appear first in the simulator Wave Window, so therefore the
% fil_re_scope signal in the tb_verify_pfb_response.vhd will show the FIR % fil_re_scope signal in the tb_verify_pfb_response.vhd will show the FIR
% coefficients h[] in order 1023:0, 2047:1024, ..., so flipped per block. % coefficients h[0:16383] in order h[1023:0], h[2047:1024], ...,
% h[16383:15360], so flipped per block.
% %
clear all; clear all;
close all; close all;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment