mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
865 B
Matlab
34 lines
865 B
Matlab
10 years ago
|
ueConfig=struct('NCellID',1,'CyclicPrefixUL','Normal','NTxAnts',1);
|
||
|
puschConfig=struct('NLayers',1,'OrthCover','Off','PRBSet',0,'Modulation','QPSK','RV',0,'Shortened',0);
|
||
|
|
||
|
addpath('../../debug/lte/phy/lib/phch/test')
|
||
|
|
||
|
TBs=104;
|
||
|
error=zeros(size(TBs));
|
||
|
for i=1:length(error)
|
||
|
trblkin=randi(2,TBs(i),1)-1;
|
||
|
%trblkin=ones(104,1);
|
||
|
%trblkin=[1, 0];
|
||
|
|
||
|
puschConfig.BetaCQI = 2.0;
|
||
|
puschConfig.BetaRI = 2.0;
|
||
|
puschConfig.BetaACK = 2.0;
|
||
|
|
||
|
[mat, info]=lteULSCH(ueConfig,puschConfig,trblkin,[],[],[1],[]);
|
||
|
mat(mat==-2)=2;
|
||
|
[lib]=liblte_ulsch_encode(ueConfig,puschConfig,trblkin,[],[],[1]);
|
||
|
error(i)=sum(abs(double(mat)-double(lib)));
|
||
|
if (length(TBs) == 1)
|
||
|
disp(error(i))
|
||
|
end
|
||
|
end
|
||
|
|
||
|
if (length(TBs) == 1)
|
||
|
%disp(info)
|
||
|
n=1:length(mat);
|
||
|
plot(abs(double(mat)-double(lib)))
|
||
|
else
|
||
|
plot(error)
|
||
|
disp(sum(error))
|
||
|
end
|