|
|
@ -1,29 +1,31 @@
|
|
|
|
ueConfig=struct('NCellID',1,'NULRB',6,'RNTI',64,'CyclicPrefixUL','Normal','NTxAnts',1,'Shortened',0,'Hopping','Off','SeqGroup',0,'CyclicShift',0);
|
|
|
|
ueConfig=struct('NCellID',1,'NULRB',25,'CyclicPrefixUL','Normal','NTxAnts',1,'RNTI',64);
|
|
|
|
puschConfig=struct('NLayers',1,'OrthCover','Off','PRBSet',0,'Shortened',0,'DynCyclicShift',0);
|
|
|
|
puschConfig=struct('NLayers',1,'OrthCover','Off','Shortened',0,'NBundled',0);
|
|
|
|
|
|
|
|
|
|
|
|
addpath('../../build/srslte/lib/phch/test')
|
|
|
|
addpath('/home/ismael/work/srsLTE/debug/srslte/lib/phch/test')
|
|
|
|
|
|
|
|
|
|
|
|
TBs=336;
|
|
|
|
cqilen=[0 20];
|
|
|
|
cqilen=0;
|
|
|
|
mods={'QPSK','16QAM', '64QAM'};
|
|
|
|
rvs=0;
|
|
|
|
rvs=0;
|
|
|
|
mods={'16QAM'};
|
|
|
|
betas=[0 2.0 2.5 5.0, 20.0];
|
|
|
|
betas=5;
|
|
|
|
for p=1:ueConfig.NULRB
|
|
|
|
subf=0;
|
|
|
|
for i=0:26
|
|
|
|
|
|
|
|
|
|
|
|
for i=1:length(TBs)
|
|
|
|
|
|
|
|
for m=1:length(mods)
|
|
|
|
for m=1:length(mods)
|
|
|
|
for r=1:length(rvs)
|
|
|
|
for r=1:length(rvs)
|
|
|
|
for bcqi=1:length(betas)
|
|
|
|
|
|
|
|
for bri=1:length(betas)
|
|
|
|
for bri=1:length(betas)
|
|
|
|
for back=1:length(betas)
|
|
|
|
for back=1:length(betas)
|
|
|
|
for c=1:length(cqilen)
|
|
|
|
for c=1:length(cqilen)
|
|
|
|
for s=1:length(subf)
|
|
|
|
for s=0
|
|
|
|
fprintf('Subf=%d, RV=%d\n', subf(s), rvs(r));
|
|
|
|
ueConfig.NSubframe=s;
|
|
|
|
trblkin=mod(0:TBs(i)-1,2);
|
|
|
|
puschConfig.PRBSet=(0:p-1)';
|
|
|
|
ueConfig.NSubframe=subf(s);
|
|
|
|
|
|
|
|
|
|
|
|
TBs=lteTBS(length(puschConfig.PRBSet),i);
|
|
|
|
|
|
|
|
%TBs=256;
|
|
|
|
|
|
|
|
%trblkin=randi(2,TBs,1)-1;
|
|
|
|
|
|
|
|
trblkin=ones(1,TBs);
|
|
|
|
|
|
|
|
|
|
|
|
puschConfig.Modulation = mods{m};
|
|
|
|
puschConfig.Modulation = mods{m};
|
|
|
|
puschConfig.RV = rvs(r);
|
|
|
|
puschConfig.RV = rvs(r);
|
|
|
|
puschConfig.BetaCQI = betas(bcqi);
|
|
|
|
puschConfig.BetaCQI = 5;
|
|
|
|
puschConfig.BetaRI = betas(bri);
|
|
|
|
puschConfig.BetaRI = betas(bri);
|
|
|
|
puschConfig.BetaACK = betas(back);
|
|
|
|
puschConfig.BetaACK = betas(back);
|
|
|
|
|
|
|
|
|
|
|
@ -38,7 +40,8 @@ for i=1:length(TBs)
|
|
|
|
ack_bit=[];
|
|
|
|
ack_bit=[];
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
if (cqilen(c)>0 || TBs(i)>0)
|
|
|
|
|
|
|
|
|
|
|
|
if (cqilen(c)>0 || TBs>0)
|
|
|
|
[enc, info]=lteULSCH(ueConfig,puschConfig,trblkin,ones(1,cqilen(c)),ri_bit,ack_bit);
|
|
|
|
[enc, info]=lteULSCH(ueConfig,puschConfig,trblkin,ones(1,cqilen(c)),ri_bit,ack_bit);
|
|
|
|
cw_mat=ltePUSCH(ueConfig,puschConfig,enc);
|
|
|
|
cw_mat=ltePUSCH(ueConfig,puschConfig,enc);
|
|
|
|
%[drs, infodrs]=ltePUSCHDRS(ueConfig,puschConfig);
|
|
|
|
%[drs, infodrs]=ltePUSCHDRS(ueConfig,puschConfig);
|
|
|
@ -49,8 +52,6 @@ for i=1:length(TBs)
|
|
|
|
%subframe_mat(drs_idx)=drs;
|
|
|
|
%subframe_mat(drs_idx)=drs;
|
|
|
|
waveform = lteSCFDMAModulate(ueConfig,subframe_mat,0);
|
|
|
|
waveform = lteSCFDMAModulate(ueConfig,subframe_mat,0);
|
|
|
|
|
|
|
|
|
|
|
|
cw_scram=lteULScramble(enc,0,1,64);
|
|
|
|
|
|
|
|
%
|
|
|
|
|
|
|
|
[waveform_lib, subframe_lib, cwlib, bits]=srslte_pusch_encode(ueConfig,puschConfig,trblkin,ones(1,cqilen(c)),ri_bit,ack_bit);
|
|
|
|
[waveform_lib, subframe_lib, cwlib, bits]=srslte_pusch_encode(ueConfig,puschConfig,trblkin,ones(1,cqilen(c)),ri_bit,ack_bit);
|
|
|
|
err=max(abs(waveform-waveform_lib));
|
|
|
|
err=max(abs(waveform-waveform_lib));
|
|
|
|
if (err > 10^-5)
|
|
|
|
if (err > 10^-5)
|
|
|
|