mirror of https://github.com/pvnis/srsRAN_4G.git
MAC test working
parent
1b2c474f25
commit
7e94f82ab6
@ -0,0 +1,18 @@
|
||||
function [ out ] = read_uchar( filename, count )
|
||||
%READ_COMPLEX Summary of this function goes here
|
||||
% Detailed explanation goes here
|
||||
|
||||
[tidin msg]=fopen(filename,'r');
|
||||
if (tidin==-1)
|
||||
fprintf('error opening %s: %s\n',filename, msg);
|
||||
out=[];
|
||||
return
|
||||
end
|
||||
|
||||
if (nargin==1)
|
||||
count=inf;
|
||||
end
|
||||
|
||||
out=fread(tidin,count,'uint8');
|
||||
end
|
||||
|
@ -1,18 +1,21 @@
|
||||
ueConfig=struct('NCellID',1,'NULRB',25,'NSubframe',8,'RNTI',77,'CyclicPrefixUL','Normal','NTxAnts',1,'Shortened',0);
|
||||
puschConfig=struct('NTurboDecIts',5,'NLayers',1,'OrthCover','Off','PRBSet',22,'Modulation','16QAM','RV',0);
|
||||
ueConfig=struct('NCellID',1,'NULRB',25,'NSubframe',8,'RNTI',85,'CyclicPrefixUL','Normal','NTxAnts',1,'Shortened',0);
|
||||
puschConfig=struct('NTurboDecIts',5,'NLayers',1,'OrthCover','Off','PRBSet',[23 24]','Modulation','16QAM','RV',0);
|
||||
|
||||
TBS=336;
|
||||
TBS=696;
|
||||
cfo=0;
|
||||
t0=68;
|
||||
x=[rx(t0:end); zeros(t0-1,1)];
|
||||
%t0=1;
|
||||
%x=[rx(t0:end); zeros(t0-1,1)];
|
||||
|
||||
x=rx;
|
||||
|
||||
subframe_rx=lteSCFDMADemodulate(ueConfig,x.*exp(-1i*2*pi*cfo/15000*transpose(1:length(x))/512));
|
||||
idx=ltePUSCHIndices(ueConfig,puschConfig);
|
||||
pusch_rx=subframe_rx(idx);
|
||||
dmrs_rx=subframe_rx(ltePUSCHDRSIndices(ueConfig,puschConfig));
|
||||
[hest, noiseest] = lteULChannelEstimate(ueConfig,puschConfig,subframe_rx);
|
||||
ce=hest(idx);
|
||||
[cws,symbols] = ltePUSCHDecode(ueConfig,puschConfig,pusch_rx,ce,noiseest);
|
||||
[trblkout,blkcrc,stateout] = lteULSCHDecode(ueConfig,puschConfig,TBS,cws);
|
||||
disp(blkcrc)
|
||||
scatter(real(symbols),imag(symbols))
|
||||
%plot(angle(hest(:,1)))
|
||||
%plot(angle(hest))
|
Loading…
Reference in New Issue