📄 test_mmrc.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: test_mMRC.m.rca $
% Tag $Name: $
% $Revision: 1.4 $
% $Date: Tue Oct 31 14:07:41 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-- Matlab files used by this file
% mMRC
%-- End of list
function status = test_mMRC
addpath('../');
addpath('../../../../../../../SP/CM/matlab');
ModuleName = 'MRC';
disp(['Testing' ModuleName ' ... ']);
%-- General Settings
Q = 15;
%-- Test vectors, 1st col input, 2nd col Ctrl, 3rd ref
%nota: Ctrl is not used yet here.
%2ants=>2 inputs
TV = { ...
'IF2bRX_RND_RND_RND_0.lod' 'IF2bRXCtrl_RND_RND_RND_0.lod' 'IF2aRX_RND_RND_RND.lod';
'IF2bRX_RND_RND_RND_1.lod' 'IF2bRXCtrl_RND_RND_RND_1.lod' '';
};
%-- Load some variables
if exist('testTV_MRCVariables.mat')==2
load testTV_MRCVariables.mat
else
error('testTV_MRCVariables.mat not present')
end
%-- Loop over the TV
for i=1:nantenna:size(TV,1)
%-- Load stimuli
In1= mGetBin(['../../vector/in/TCRND' int2str(nantenna) '/' TV{i,1} ],'int16','1R1I','b');
In2= mGetBin(['../../vector/in/TCRND' int2str(nantenna) '/' TV{i+1,1} ],'int16','1R1I','b');
Ref = mGetBin(['../../vector/ref/TCRND' int2str(nantenna) '/' TV{i,3}],'int16','1R1I','b');
%-- Adjust Data
In1=double(In1);
In1=reshape(In1,1,size(In1,1));
In2=double(In2);
In2=reshape(In2,1,size(In2,1));
In=[In1; In2];
Ref=double(Ref);
Ref=reshape(Ref,1,size(Ref,1));
%-- Call function:
[mOut_fixed RSSIComb CINRComb FreqOffComb TimeOffComb]= ...
mMRC(nantenna,DataSize,In,RSSI.',CINR.',FreqOff.',TimeOff.');
%-- Compare
diff = (mOut_fixed-double(Ref) );
result = any( abs(diff)>1);
if any(result)
disp(['Error: Matlab function failed for ' TV{i,1} ]);
else
disp(['OK: Matlab function succeeded for ' TV{i,1} ' , not more than 1 units of difference' ]);
end
end
if any([result ])
disp(['Error: Matlab function ' ModuleName ' failed.' ]);
status = -1 ;
else
disp(['OK: Matlab function ' ModuleName ' succeeded.' ]);
status = 1;
end
rmpath('../');
rmpath('../../../../../../../SP/CM/matlab');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -