?? mrepslotmap.m
字號:
function [SlotVecs] = mRepSlotMap(In,SlotVecs,ZoneD,BurstD)
% Downlink repetition and slot mapping for OFDMA of IEEE 802.16 (WiMAX)
%
% [SlotVecs] = mRepSlotMap(In,SlotVecs,ZoneD,BurstD)
%
% This module performes the segmentation of the encoded, interleaved and
% modulation mapped data of one burst (In) into slots. For QPSK, the slots
% are repeated according to the repetition factor R. Then, the slots are
% mapped/added to the slot vectors of the zone (SlotVecs).
%
% In : burst input matrix (complex)
% one column per slot, 48 elements per slot
% SlotVecs: input/output matrix that is the IF to FP (complex)
% one column per slot vector, 48*ZoneD.NumSubch rows
% ZoneD : zone descriptor
% BurstD : burst descriptor
%
% Matlab 7 Release 14 SP2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2005 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: mRepSlotMap.m.rca $
% $Revision: 1.2 $
% $Date: Wed Nov 8 09:17:22 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[m,n]=size(In);
[r,c]=size(SlotVecs);
if m~=48
error('Error: Slots must contain 48 elements.');
end
if (BurstD.IUC==254) %distinguish between MAP and "normal" bursts
%allocated slots
Ns = BurstD.Duration;
%check MAP burst dimension
if (Ns>(ZoneD.NumSym*ZoneD.NumSubch-BurstD.SymOff)/ZoneD.Type-BurstD.SubchOff)
error('Error: MAP burst does not fit into zone.');
end
else
%allocated slots
Ns = BurstD.NumSym*BurstD.NumSubch/ZoneD.Type;
%check burst dimension
if mod(BurstD.NumSym,ZoneD.Type)
error('Error: Number of OFDMA symbols does not match zone type.');
end
if ((BurstD.NumSym+BurstD.SymOff)>ZoneD.NumSym)
error('Error: OFDMA symbol dimension exceeds zone limit.');
end
if ((BurstD.NumSubch+BurstD.SubchOff)>ZoneD.NumSubch)
error('Error: Subchannel dimension exceeds zone limit.');
end
end
if ((n*BurstD.R)~=Ns)
error('Error: Number of provided slots and repetition factor are not in line with burst size.');
end
%check zone dimension
if ((ZoneD.NumSym/ZoneD.Type)~=c)
error('Error: Number of provided slot vectors does not match zone dimension.');
end
if ((ZoneD.NumSubch*48)~=r)
error('Error: Slot vector length does not match zone dimension.');
end
%repetition
temp=In;
for k=1:(BurstD.R-1),
temp=[temp;In];
end
%form burst according to burst dimension
if (BurstD.IUC==254) %distinguish between MAP and "normal" bursts
%MAP burst
temp=reshape(temp,48,Ns); %one slot per column
subch=BurstD.SubchOff;
timeslot=BurstD.SymOff/ZoneD.Type;
for k=1:Ns,
SlotVecs(subch*48+1:(subch+1)*48,timeslot+1) = temp(:,k);
subch=subch+1;
if subch>=ZoneD.NumSubch
subch=0;
timeslot=timeslot+1;
end
end
else
%normal burst
temp=reshape(temp,BurstD.NumSubch*48,BurstD.NumSym/ZoneD.Type);
[x,y]=size(temp);
%map burst in to zone
RangeCarrier = BurstD.SubchOff*48+1 : BurstD.SubchOff*48+x ;
RangeSlotVec = BurstD.SymOff/ZoneD.Type+1 : BurstD.SymOff/ZoneD.Type+y ;
SlotVecs(RangeCarrier,RangeSlotVec) = temp;
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -