?? mzonestart.m
字號:
%
% FPUL Zone Start of IEEE 802.16-2005 (WiMAX, OFDMA only)
% Input:
% CellId -- Cell ID
% FrameNr -- Frame number
% NFFT -- FFT - 512 or 1024
% NFFTUsed -- Number of FFT carrier
% NSubCh -- Number of SubChannel
% NSlotVec -- Number of Slot vector
% PermBase -- Permutation Base
% SlotUIUC -- UIUC per SubChannel
% SubgroupCodeOffset -- Ranging Code Sub Group Offset
% NMLORangCodes -- M+N+L+O+R number of RAnging Code
% Output:
% PNCodeLUT -- PN Code LUT
% TileLocationLUT -- Tile Location LUT
% PilotPhyLoc -- Pilot Physical Location
% DataPhyLoc -- Data Physical Location
% RangingCode -- Ranging Code
% SubChannelLUT -- SubChannel LUT
% Remark:
%
% Matlab 7 Release 14 SP2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Property of Freescale
% Freescale Confidential Proprietary
% Freescale Copyright (C) 2006 All rights reserved
% ----------------------------------------------------------------------------
% $RCSfile: mZoneStart.m.rca $
% $Revision: 1.5 $
% $Date: Tue Oct 31 12:00:11 2006 $
% Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-- Matlab files used by this file
% mRangingCode
% mPRBS
%-- End of list
function [PNCodeLUT,TileLocationLUT,PilotPhyLoc,DataPhyLoc,RangingCode,SubChannelLUT]= ...
mZoneStart(CellId,FrameNr,NFFT,NFFTUsed,NSubCh,NSlotVec,...
PermBase,SlotUIUC,SubgroupCodeOffset,NMLORangCodes)
FPULNTILE = 6;
NCARRIERPERTILE = 4 * 2;
% TilePerm1024 size of 35
TilePerm1024 = [11,19,12,32,33,9,30,7,4,2,13,8,17,23,27,5,...
15,34,22,14,21,1,0,24,3,26,29,31,20,25,16,10,6,28,18];
% TilePerm512 size of 17
TilePerm512 = [11,15,10,2,12,9,8,14,16,4,0,5,13,3,6,7,1];
PNCodeLUT = mPRBS(CellId,FrameNr,NFFTUsed);
%select Input Permutation sequence for given FFT size
switch(NFFT)
case 1024
TilePerm = TilePerm1024;
case 512
TilePerm = TilePerm512;
end
% generate table TilePermLUT which contains the tile permutation for entire symbol
for SubCh=0:(NSubCh-1)
for Tile=0:(FPULNTILE-1)
TilePermLUT(SubCh+1,Tile+1) = NSubCh*Tile + mod((TilePerm(mod((Tile+SubCh),NSubCh)+1) + PermBase),NSubCh);
end
end
% SubChannel rotation
for SlotVec=1:NSlotVec
SubChEnum = 0;
for SubCh=1:NSubCh
% SubChannel rotation only if UIUC != 0,12,13,0xfe
if ((SlotUIUC(SlotVec,SubCh) == 0) | ...
(SlotUIUC(SlotVec,SubCh) == 12) | ...
(SlotUIUC(SlotVec,SubCh) == 13) | ...
(SlotUIUC(SlotVec,SubCh) == 254))
ChannelTable(SubCh) = SubCh-1;
SubChannelLUT(SlotVec,SubCh) = SubCh-1;
else
SubChEnum = SubChEnum + 1;
ChannelRef(SubChEnum) = SubCh-1;
end
end
for SubChEnumI=1:SubChEnum
NewSubChNum = mod(((SubChEnumI-1)+13*(SlotVec-1)),SubChEnum)+1;
IdxInv = ChannelRef(SubChEnumI)+1;
ChannelTable(IdxInv) = ChannelRef(NewSubChNum);
SubChannelLUT(SlotVec,ChannelRef(NewSubChNum)+1) = IdxInv - 1;
end
for SubCh=1:NSubCh
SubChRot = ChannelTable(SubCh)+1;
for Tile=1:FPULNTILE
TileLocationLUT(SlotVec,SubCh,Tile) = NCARRIERPERTILE * TilePermLUT(SubChRot,Tile);
end
end
end
% Generate Pilot/Data Physical location vector
for SlotVec=1:NSlotVec
for SubCh=1:NSubCh
PilotIndex = 1;
DataIndex = 1;
% First symbol
for Tile=1:FPULNTILE
PilotPhyLoc(SlotVec,SubCh,PilotIndex) = TileLocationLUT(SlotVec,SubCh,Tile);
PilotIndex = PilotIndex + 1;
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 2;
DataIndex = DataIndex + 1;
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 4;
DataIndex = DataIndex + 1;
PilotPhyLoc(SlotVec,SubCh,PilotIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 6;
PilotIndex = PilotIndex + 1;
end
% Second symbol
for Tile=1:FPULNTILE
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + NFFTUsed*2;
DataIndex = DataIndex + 1;
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 2 + NFFTUsed*2;
DataIndex = DataIndex + 1;
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 4 + NFFTUsed*2;
DataIndex = DataIndex + 1;
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 6 + NFFTUsed*2;
DataIndex = DataIndex + 1;
end
% Third symbol
for Tile=1:FPULNTILE
PilotPhyLoc(SlotVec,SubCh,PilotIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + NFFTUsed*4;
PilotIndex = PilotIndex + 1;
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 2 + NFFTUsed*4;
DataIndex = DataIndex + 1;
DataPhyLoc(SlotVec,SubCh,DataIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 4 + NFFTUsed*4;
DataIndex = DataIndex + 1;
PilotPhyLoc(SlotVec,SubCh,PilotIndex) = TileLocationLUT(SlotVec,SubCh,Tile) + 6 + NFFTUsed*4;
PilotIndex = PilotIndex + 1;
end
end
end
RangingCode = mRangingCode(PermBase,SubgroupCodeOffset,NMLORangCodes);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -