|
|
|
@ -4,16 +4,16 @@ prachConfig=struct('Format',0,'SeqIdx',0,'PreambleIdx',0,'CyclicShiftIdx',0,'Hig
|
|
|
|
|
|
|
|
|
|
addpath('../../debug/lte/phy/lib/phch/test')
|
|
|
|
|
|
|
|
|
|
NULRB=[6 15 25 50 100];
|
|
|
|
|
NULRB=[15 25 50 100];
|
|
|
|
|
|
|
|
|
|
% FreqIdx, FreqOffset and TimeOffset need to be tested
|
|
|
|
|
|
|
|
|
|
for n_rb=1:length(NULRB)
|
|
|
|
|
for format=0:3
|
|
|
|
|
for seqIdx=0:837
|
|
|
|
|
fprintf('format %d, seqIdx: %d\n',format,seqIdx);
|
|
|
|
|
for preambleIdx=0:63
|
|
|
|
|
for CyclicShift=0:15
|
|
|
|
|
for format=1:3;
|
|
|
|
|
for seqIdx=0:17:837
|
|
|
|
|
fprintf('RB: %d, format %d, seqIdx: %d\n',NULRB(n_rb),format,seqIdx);
|
|
|
|
|
for preambleIdx=0:23:63
|
|
|
|
|
for CyclicShift=0:6:15
|
|
|
|
|
%for hs=0:1
|
|
|
|
|
hs=0;
|
|
|
|
|
ueConfig.NULRB=NULRB(n_rb);
|
|
|
|
@ -22,16 +22,17 @@ for n_rb=1:length(NULRB)
|
|
|
|
|
prachConfig.PreambleIdx=preambleIdx;
|
|
|
|
|
prachConfig.CyclicShiftIdx=CyclicShift;
|
|
|
|
|
prachConfig.HighSpeed=hs;
|
|
|
|
|
prachConfig.FreqIdx=5;
|
|
|
|
|
prachConfig.FreqOffest=5;
|
|
|
|
|
lib=liblte_prach(ueConfig,prachConfig);
|
|
|
|
|
|
|
|
|
|
[mat, info]=ltePRACH(ueConfig,prachConfig);
|
|
|
|
|
|
|
|
|
|
lib=liblte_prach(ueConfig,prachConfig);
|
|
|
|
|
err=mean(abs(mat(:)-lib(:)));
|
|
|
|
|
err=mean(abs(mat(:)-lib(1:length(mat))));
|
|
|
|
|
if (err > 10^-3)
|
|
|
|
|
disp(err)
|
|
|
|
|
error('Error!');
|
|
|
|
|
end
|
|
|
|
|
% end
|
|
|
|
|
%end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|