📄 test_eqzf.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: test_EqZF.m.rca $
% Tag $Name: $
% $Revision: 1.2 $
% $Date: Mon Oct 30 15:25:52 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-- Matlab files used by this file
%-- End of list
function status = test_EqZF
addpath('../');
addpath('../../../../../../../SP/CM/matlab');
ModuleName = 'EqZF';
disp(['Testing MEX' ModuleName ' ... ']);
%-- General Settings
Q = 15;
%-- Test vectors, 1st col input, 2nd col Ctrl, 3rd ref
TV = { ...
'IF2cRX_RND_RND_RND_RND.lod' 'IF2cRXCtrl_RND_RND_RND_RND.lod' 'IF2bRX_RND_RND_RND_RND.lod';
};
%-- Loop over the TV
for i=1:size(TV,1)
%-- Load stimuli
In= mGetBin(['../../vector/in/TCRND/' TV{i,1} ],'int16','1R1I','b');
ChanEst = mGetBin(['../../vector/in/TCRND/' TV{i,2} ],'int32','1R1I','b');
Ref = mGetBin(['../../vector/ref/TCRND/' TV{i,3}],'int16','1R1I','b');
%-- Adjust Data
In=double(In);
ChanEst=double(ChanEst);
%-- Call function:
Out = EqZF(In,ChanEst);
Out_fixed = round(Out.*2^Q);
%-- Compare
diff = any(Out_fixed-double(Ref) );
result = ( abs(diff)>4);
if any(result)
disp(['Error: MEX function failed for ' TV{i,1} ]);
else
disp(['OK: MEX function succeeded for ' TV{i,1} ' , not more than 4 units of difference' ]);
end
end
if any([result ])
disp(['Error: MEX function ' ModuleName ' failed.' ]);
status = -1 ;
else
disp(['OK: MEX function ' ModuleName ' succeeded.' ]);
status = 1;
end
rmpath('../');
rmpath('../../../../../../../SP/CM/matlab');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -