Permute input symbols using shift registers with GPU
The GPU ConvolutionalInterleaver object permutes the symbols in the input signal using a graphics processing unit (GPU). Internally, this class uses a set of shift registers.
Note: To use this object, you must install a Parallel Computing Toolbox™ license and have access to an appropriate GPU. For more about GPUs, see GPU Computing in the Parallel Computing Toolbox documentation.
A GPU-based System object™ accepts typical MATLAB® arrays or objects that you create using the gpuArray class as an input to the step method. GPU-based System objects support input signals with double- or single-precision data types. The output signal inherits its datatype from the input signal.
If the input signal is a MATLAB array, then the output signal is also a MATLAB array. In this case, the System object handles data transfer between the CPU and GPU.
If the input signal is a gpuArray, then the output signal is also a gpuArray. In this case, the data remains on the GPU. Therefore, when the object is given a gpuArray, calculations take place entirely on the GPU and no data transfer occurs. Invoking the step method with gpuArray arguments provides increased performance by reducing simulation time. For more information, see Establish Arrays on a GPU in the Parallel Computing Toolbox documentation.
To convolutionally interleave binary data:
H = comm.gpu.ConvolutionalInterleaver creates a GPU-based convolutional interleaver System object, H. This object permutes the symbols in the input signal using a set of shift registers.
H = comm.gpu.ConvolutionalInterleaver(Name,Value) creates a GPU-based convolutional interleaver System object, H, with the specified property Name set to the specified Value. You can specify additional name-value pair arguments in any order as (Name1,Value1,...,NameN,ValueN).
H = comm.gpu.ConvolutionalInterleaver(M,B,IC) creates a GPU-based convolutional interleaver System object H, with the NumRegisters property set to M, the RegisterLengthStep property set to B, and the InitialConditions property set to IC. M, B, and IC are value-only arguments. To specify a value-only argument, you must also specify all preceding value-only arguments.
Number of internal shift registers
Specify the number of internal shift registers as a scalar, positive integer. The default is 6.
Number of additional symbols that fit in each successive shift register
Specify the number of additional symbols that fit in each successive shift register as a positive, scalar integer. The default is 2. The first register holds zero symbols.
Initial conditions of shift registers
Specify the values that are initially stored in each shift register as a numeric scalar or vector. You do not need to specify a value for the first shift register, which has zero delay. The default is 0. The value of the first element of this property is unimportant because the first shift register has zero delay. If you set this property to a scalar, then all shift registers, except the first one, store the same specified value. If you set it to a column vector with length equal to the value of the NumRegisters property, then the i-th shift register stores the i-th element of the specified vector.
|clone||Create convolutional interleaver object with same property values|
|getNumInputs||Number of expected inputs to step method|
|getNumOutputs||Number of outputs from step method|
|isLocked||Locked status for input attributes and nontunable properties|
|release||Allow property value and input characteristics changes|
|reset||Reset states of the convolutional interleaver object|
|step||Permute input symbols using shift registers|
Interleave and deinterleave random data. Then, compare the original sequence, interleaved sequence and restored sequence.
Create a GPU-based Convolutional Interleaver with three internal shift registers capable of fitting two additional symbols. The initial value stored in each shift register is [-1 -2 -3].
hInt = comm.gpu.ConvolutionalInterleaver('NumRegisters', 3, ... 'RegisterLengthStep', 2, ... 'InitialConditions', [-1 -2 -3]');
Create a GPU-based Convolutional Deinterleaver with three internal shift registers capable of fitting two additional symbols. The initial value stored in each shift register is [-1 -2 -3].
hDeInt = comm.gpu.ConvolutionalDeinterleaver('NumRegisters', 3, ... 'RegisterLengthStep', 2, ... 'InitialConditions', [-1 -2 -3]');
Copy numeric data to the GPU.
data = gpuArray((0:20)');
Run the simulation by using the step method to process data.
intrlvData = step(hInt, data); deintrlvData = step(hDeInt, intrlvData);
Compare the original sequence, interleaved sequence and restored sequence.
[data, intrlvData, deintrlvData]
This object implements the algorithm, inputs, and outputs described on the Convolutional Interleaver block reference page. The object properties correspond to the block parameters.