conv_coding.m

来自「在MIMO系统中」· M 代码 · 共 26 行

M
26
字号
function output_bit = conv_coding(input_bit,reset)
% convolution coding for IEEE802.11a
% Refer to Figure114 on page17 of IEEE802.11a.
% Input:    input_bit is the input bit stream.
% Output:   output_bit is the output bit stream with double length of input_bit.
% Copy right T-Square Design. All rights reserved.
% Confidential, do not give this program to anyone outside the T2 IEEE802.11a group.
% Current responsible engineer: Simon Qiu
% When this file is modified, inform Simon Qiu, Andy Lu.
% History
%   2002-07-06  Created by Simon Qiu.

global Code_State;

if reset == 1
    Code_State = zeros(1,6);
else
    DataLength = length(input_bit);
    output_bit = zeros(1,DataLength*2);
    DelayLine = [Code_State,input_bit];
    idx = [1:DataLength];
    output_bit(1:2:end) = bitget(DelayLine(idx+6) + DelayLine(idx+4) + DelayLine(idx+3) + DelayLine(idx+1) + DelayLine(idx+0),1);
    output_bit(2:2:end) = bitget(DelayLine(idx+6) + DelayLine(idx+5) + DelayLine(idx+4) + DelayLine(idx+3) + DelayLine(idx+0),1);
    Code_State = DelayLine(DataLength+1:DataLength+6);
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?