gusucode.com > wlan工具箱matlab源码程序 > wlan/wlan/+wlan/+internal/vhtSIGBEncodeInterleaveMap.m
function dataPerUser = vhtSIGBEncodeInterleaveMap(bitsPerUser,chanBW) %vhtSIGBEncodeInterleaveMap Encode, interleave and map VHT SIG-B bits % % Note: This is an internal undocumented function and its API and/or % functionality may change in subsequent releases. % % SYM = vhtSIGBEncodeInterleaveMap(BITS,CHANBW) performs BCC encoding, % segment parsing, interleaving and constellation mapping according to % Sections 18.3.5.6, 22.3.10.7, 22.3.10.8 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 for a user. % % CHANBW is a string specifying the channel bandwidth. % Copyright 2016 The MathWorks, Inc. %#codegen % Repeat bits, with padding, for different CBW switch chanBW case {'CBW20','CBW2'} repVHTSIGBBits = bitsPerUser; % 26 chanBWMHz = 20; numCBPI = 52; % Table 22-6, coded bits per interleaver block case {'CBW40','CBW4'} repVHTSIGBBits = [bitsPerUser; bitsPerUser]; % 54 chanBWMHz = 40; numCBPI = 108; case {'CBW80','CBW8'} repVHTSIGBBits = [repmat(bitsPerUser, 4, 1); 0]; % 117 chanBWMHz = 80; numCBPI = 234; otherwise % {'CBW80+80', 'CBW160', 'CBW16'} repVHTSIGBBits = repmat([repmat(bitsPerUser, 4, 1); 0], 2, 1); % 234 chanBWMHz = 160; numCBPI = 234; end % BCC encoding encOut = wlan.internal.wlanBCCEncode(repVHTSIGBBits,'1/2'); % Single symbol processing for segment deparser & interleaver if any(strcmp(chanBW, {'CBW160','CBW16'})) % Two individual 80 MHz blocks interleaveOut = zeros(size(encOut)); interleaveOut(1:end/2) = wlan.internal.wlanBCCInterleave(encOut(1:2:end), ... 'VHT', numCBPI, 1, chanBWMHz, 1); interleaveOut(end/2+1:end) = wlan.internal.wlanBCCInterleave(encOut(2:2:end), ... 'VHT', numCBPI, 1, chanBWMHz, 1); else interleaveOut = wlan.internal.wlanBCCInterleave(encOut, ... 'VHT', numCBPI, 1, chanBWMHz, 1); end % Constellation mapping & segment deparser dataPerUser = wlan.internal.wlanConstellationMapper(interleaveOut,1); end