gusucode.com > wlan工具箱matlab源码程序 > wlan/wlan/+wlan/+internal/vhtSIGAEncodeInterleaveMap.m

    function sym = vhtSIGAEncodeInterleaveMap(bits,phRot)
%vhtSIGAEncodeInterleaveMap Encode, interleave and map VHT SIG-A bits
%
%   Note: This is an internal undocumented function and its API and/or
%   functionality may change in subsequent releases.
%
%   SYM = vhtSIGAEncodeInterleaveMap(BITS,PHROT) performs BCC encoding,
%   interleaving and constellation mapping according to Sections 18.3.5.6,
%   18.3.5.7 and 18.3.5.8.
%
%   SYM is a Nsd-by-Nsym matrix of complex numbers representing the
%   encoded, interleaved and mapped bits.
%
%   BITS is a column vector of bits to encode.
%
%   PHROT is a scalar or row vector with Nsym elements of the phase
%   rotation to apply to each symbol during constellation mapping. If only
%   one phase rotation is provided all symbols are rotated by the same
%   amount.

%   Copyright 2016 The MathWorks, Inc.

%#codegen

% Encode according to Section 18.3.5.6
encodedSIG = wlan.internal.wlanBCCEncode(bits,'1/2');

% Interleaving according to Section 18.3.5.7
numSym = 2;
numBPSCS = 1;
numCBPS = 48;
interleaveFormat = 'NON_HT';
interleavedData = zeros(numCBPS,numSym);
for i = 1:numSym
    interleavedData(:,i) = wlan.internal.wlanBCCInterleave( ...
        encodedSIG((i-1)*numCBPS+(1:numCBPS).',:),interleaveFormat,numCBPS,numBPSCS);
end

% BSPK constellation mapping according to Section 18.3.5.8 with phase
% rotation
sym = wlan.internal.wlanConstellationMapper(interleavedData,numBPSCS,phRot);

end