2015-10-05 04:57:40 -07:00
|
|
|
clear
|
2016-02-29 09:44:38 -08:00
|
|
|
enbConfig=struct('NCellID',0,'CyclicPrefix','Normal','CellRefP',1);
|
|
|
|
pdschConfig=struct('Modulation','64QAM','RV',1,'TxScheme','Port0','NTurboDecIts',10);
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2015-10-05 04:57:40 -07:00
|
|
|
addpath('../../build/srslte/lib/phch/test')
|
2015-01-29 16:15:09 -08:00
|
|
|
|
2016-03-13 15:08:53 -07:00
|
|
|
TBs=18336;
|
2016-02-29 09:44:38 -08:00
|
|
|
i=1;
|
|
|
|
e_bits=3450*6;
|
2016-03-13 15:08:53 -07:00
|
|
|
error=zeros(size(TBs));
|
|
|
|
for i=1:length(TBs)
|
|
|
|
trblkin=randi(2,TBs(i),1)-1;
|
2015-01-29 16:15:09 -08:00
|
|
|
|
|
|
|
[mat, info]=lteDLSCH(enbConfig,pdschConfig,e_bits,trblkin);
|
2015-03-19 09:09:38 -07:00
|
|
|
lib=srslte_dlsch_encode(enbConfig,pdschConfig,e_bits,trblkin);
|
2015-01-29 16:15:09 -08:00
|
|
|
error(i)=mean(abs(double(mat)-double(lib)));
|
2016-02-29 09:44:38 -08:00
|
|
|
|
2016-03-13 15:08:53 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
if (length(TBs) == 1)
|
|
|
|
disp(info)
|
|
|
|
disp(error)
|
|
|
|
n=1:length(mat);
|
|
|
|
plot(abs(double(mat)-double(lib)))
|
|
|
|
else
|
|
|
|
plot(error)
|
|
|
|
end
|