📄 mapultx.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: MapULTx.m.rca $
% $Revision: 1.4 $
% $Date: Tue Oct 31 11:25:31 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%***************************************************************************
% 802.16-2004 OFDMA PHY - MapULTx Uplink Tx
%
% Description: Maps Rx data from physical carrier positions to logical
% positions
%
% Input:
% Nused: number of used subchannels
% Nsubcarriers: number of subcarriers in one slot (normally 48)
% dataOVec: matrix of data carrier locations in the middle symbol
% of every slot (one row for each subchannel)
% dataPVec: matrix of data carrier locations in the first and
% third symbol of every slot (one row for each
% subchannel)
% rotationOffVec: rotation offset at which data carriers are
% mapped
% k: slot vector number (to rotate subchannel numbers every slot
% vector)
% d_v_freq_inp: vector of UP freq. domain symbols, each row
% represents a single slot, all subchannels concatenated.
%
% Output:
% d_m_map: Matrix of UP freq. domain samples
% mapped to the physical subcarriers, for all
% subchannels. Pilots values are interleaved
% Each row is an OFDMA symbol
%
% Functions:
% N/A
%
% Data Files:
% N/A
%
%***************************************************************************
%-- Matlab files used by this file
%-- End of list
function d_m_map = MapULTx(Nused, Nsubcarriers, Nfft, pilotLocVec, dataOVec, dataPVec, rotationOffVec, k, d_v_freq_slot, pilot_vector);
d_m_map = zeros(3,408);
%**************************************************************************
% Insert Pilots
%**************************************************************************
% initialize mapping of logical subchannels to physical subchannels
scAccess = 1:Nused;
if k > 1
% Calculate subchannel offset based on slot vector number
SCoffset = mod(13*(k-1),Nused)+1;
% Rotate subchannels numbers vector from 2nd slot on
scAccess = [scAccess(SCoffset:end),scAccess(1:SCoffset-1)];
end
%**************************************************************************
% Insert Data and Pilots
%**************************************************************************
for sIndex = 1:Nused
realSC = scAccess(sIndex); % subchannel number are read in a different order
% due to subchannel rotation
% retrieve subchannel specific information, according to
% subchannel rotation
dataO = dataOVec(realSC,:);
dataP = dataPVec(realSC,:);
pilot = pilotLocVec(realSC,:);
rotationOffset = rotationOffVec(realSC);
% Insert Data and Pilot values
newWord = d_v_freq_slot(1+Nsubcarriers*(sIndex-1):Nsubcarriers*sIndex); % select the subch.
pilot_value = pilot_vector(sIndex);
d_m_map(1,pilot) = pilot_value;
d_m_map(3,pilot) = pilot_value;
d_m_map(1,dataP) = newWord(1:12);
d_m_map(2,dataO) = newWord(13:36);
d_m_map(3,dataP) = newWord(37:48);
% Extract Data locations
if (rotationOffset>0)
offCorr = Nsubcarriers - rotationOffset + 2;
% roll-back the rotation of the data carriers as they are
% read from the tiles
newWord = [newWord(offCorr:end),newWord(1:offCorr-1)];
DataLoc = [DataLoc(offCorr:end),DataLoc(1:offCorr-1)];
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -