📄 synth_filter.m
字号:
% AccelDSP 8.1.1 build 690 Production, compiled Apr 26 2006
%
% THIS IS UNPUBLISHED, LICENSED SOFTWARE THAT IS THE CONFIDENTIAL
% AND PROPRIETARY PROPERTY OF XILINX OR ITS LICENSORS
%
% Copyright(c) Xilinx, Inc., 2000-2006, All Rights Reserved.
% Reproduction or reuse, in any form, without the explicit written
% consent of Xilinx, Inc., is strictly prohibited.
function [FilterOut,valid] = synth_filter(FilterIn, coeff_in, start_load)
persistent coeff count loadc tap_delay
if isempty(coeff)
coeff = zeros(1,32);
count = 1;
loadc = 0;
tap_delay = zeros(1,length(coeff));
end
if start_load == 1
coeff(count) = coeff_in;
count = count + 1;
loadc = 1;
valid = 0;
elseif (loadc == 1) & (count < 32)
coeff(count) = coeff_in;
count = count + 1;
valid = 0;
elseif (loadc == 1) & (count == 32)
coeff(count) = coeff_in;
tap_delay = zeros(1,length(coeff));
count = 1;
loadc = 0;
valid = 1
else
valid = 1;
end
% Perform sum of products
FilterOut = tap_delay * coeff(end:-1:1)';
% Shift tap delay line
tap_delay = [tap_delay(2:length(coeff)) FilterIn];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -