Main Content

Depuncturer

Reverse puncturing scheme to prepare for decoding

  • Depuncturer block

Libraries:
Wireless HDL Toolbox / Error Detection and Correction

Description

The Depuncturer block replaces punctured symbols with neutral values as directed by an input puncture vector. The block returns erasure bits, which indicate the presence of neutral symbols in the output data stream. The block supports continuous and frame modes of operation. It provides an interface and architecture suitable for HDL code generation and hardware deployment.

Many wireless communication standards implement different code rates by puncturing patterns with a base code rate 1/2. The input to the block is a stream of one sample at a time. You can provide samples represented by hard-decision binary values or soft-decision log-likelihood ratios (LLR). The block returns output samples as 2-by-1 vectors.

The inserted neutral value depends on the data type of the input sample. For details, see the input data port.

Examples

Ports

Input

expand all

Input sample, specified as a scalar. The block inserts a neutral value at punctured locations based on the data type of the input samples.

Input Data TypeInserted Neutral Value
  • boolean

  • fixdt(0,1,0)

0
fixdt(0,WL,0)2(WL-1)
uint8128
uint1632768
  • fixdt(1,WL,0)

  • int8

  • int16

  • single

  • double

0

The block treats the input as hard-decision samples when the input type is Boolean or fixdt(0,1,0). For signed and unsigned numeric types, the block assumes soft-decision samples. The block treats samples as signed integers for single and double data types, but these data types are not supported for HDL code generation.

The input sample must have a word length less than or equal to 16 bits, and a fraction length of 0 bits.

Data Types: int8 | int16 | uint8 | uint16 | Boolean | fixdt(0,1,0) | fixdt(S,WL,0) | single | double

Puncture vector, specified as a column vector of binary values. The length of the puncture vector must be an even number in the range [4, 28]. The length must remain constant. The block removes initial zeros from the provided vector, up to the first 1 (true). After the first 1 (true), the puncture vector cannot contain any [1:0] subvector matching [0 0].

For example, IEEE 802.11 WLAN standard [1] supports puncture rates 2/3, 3/4, and 5/6, with respective vector lengths of 4, 6, and 10. To support these multiple rates, set Puncture vector source to Input port. To support the largest vector size, the vector length must be 10 for all rates. For 2/3 and 3/4 rates, pad the puncVector input with zeros to create a 10-element vector. The puncture vector for rate 3/4 is [1 1 0 1 1 0]'. For a vector length of 10, use [0 0 0 0 1 1 0 1 1 0]' as the input puncVector.

When Operation mode is set to Continuous, the block captures the value of puncVector when both the syncPunc and input valid ports are 1 (true).

When Operation mode is set to Frame, the block captures the value of puncVector when both ctrl.start and ctrl.valid are 1 (true).

Dependencies

To enable this port, set Puncture vector source to Input port.

Data Types: Boolean

Puncture synchronization signal, specified as a Boolean scalar value. This input is a control signal that synchronizes the puncture vector input with the input sample. When both syncPunc and valid are 1 (true), the block aligns the puncture vector to begin puncturing. The block captures the vector from either the puncVector input port or the Puncture vector parameter. The block ignores the puncVector port when syncPunc is 0 (false).

Dependencies

To enable this port, set Operation mode to Continuous. When Operation mode is Frame, the block synchronizes the puncture vector using control signals in the input ctrl bus.

Data Types: Boolean

Control signal that indicates when the sample from data input port is valid. When valid is 1 (true), the block captures the values of the data input port. When valid is 0 (false), the block ignores the input samples.

Dependencies

To enable this port, set Operation mode to Continuous.

Data Types: Boolean

Control signals accompanying the sample stream, specified as a samplecontrol bus. The bus includes the start, end, and valid control signals, which indicate the boundaries of the frame and the validity of the samples.

Dependencies

To enable this port, set Operation mode to Frame.

Data Types: bus

Output

expand all

Output sample, returned as a 2-by-1 column vector. The data type is same as the data type of the input samples.

Data Types: int8 | int16 | uint8 | uint16 | Boolean | fixdt(0,1,0) | fixdt(S,WL,0) | single | double

Control signal that indicates when the sample from the data output port is valid. The block sets the valid port to 1 (true) when there is a valid sample on the output data port.

Dependencies

Tho enable this port, set Operation mode to Continuous.

Data Types: Boolean

Control signals accompanying the sample stream, returned as a samplecontrol bus. The bus includes the start, end, and valid control signals, which indicate the boundaries of the frame and the validity of the samples.

Dependencies

To enable this port, set Operation mode to Frame.

Data Types: bus

Neutral symbol locations, returned as a 2-by-1 column vector corresponding to the output samples. When erasure is 1 (true), the corresponding output data element is a depunctured neutral value.

Data Types: Boolean

Parameters

expand all

End of frame behavior, specified as one of these modes:

  • Continuous – Allow changes to puncVector at any time. To force the block to capture the new puncture vector, set syncPunc to 1(true). This waveform shows ufix4 input samples depunctured in Continuous mode.

    Logic Analyzer waveform that shows depuncture behavior in continuous mode.

  • Frame – You can only change puncVector at the start of a frame, indicated by ctrl.start. This waveform shows ufix4 input samples depunctured in Frame mode.

    Logic Analyzer waveform that shows depuncture behavior in frame mode.

Source of puncture vector, specified as either:

  • Input port – Specify the puncture vector using the puncVector port.

  • Property – Specify the puncture vector using the Puncture vector parameter.

Puncture vector, specified as a column vector of binary values. The length of the puncture vector must be an even number in the range [4, 28]. The default value is the puncture vector for 3/4 code rate of IEEE 802.11 WLAN [1].

The puncture vector cannot contain any [1:0] subvector matching [0 0].

Dependencies

To enable this port, set Puncture vector source to Property.

Algorithms

expand all

The depuncturing algorithm shifts through each [1:0] subvector of the puncture vector. The subvector has three valid patterns: [0 1], [1 0], or [1 1]. Based on the subvector, neutral samples are inserted in place of punctured samples. The erasure output is the inverse of the puncture subvector. The block returns an error when it encounters the invalid subvector [0 0].

Architecture diagram of the depuncturing algorithm.

References

[1] IEEE Std 802.11ac™-2013 IEEE Standard for Information technology — Telecommunications and information exchange between systems — Local and metropolitan area networks — Specific requirements — Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications — Amendment 4: Enhancements for Very High Throughput for Operation in Bands below 6 GHz.

Extended Capabilities

Version History

Introduced in R2018b

See Also

Blocks