Main Content

getLatency

Latency of channelizer calculation

Description

example

Y = getLatency(channelizer) returns the number of cycles, Y, that the object takes to channelize an input frame. The latency depends on the input vector size and the FFT length. The channelizer filter coefficients does not affect the latency.

example

Y = getLatency(channelizer,N) returns the number of cycles that an object would take to channelize an input frame, if it had FFT length N, and scalar input. This function does not change the properties of the channelizer.

example

Y = getLatency(channelizer,N,V) returns the number of cycles that an object would take to channelize an input frame, if it had FFT length N, and vector input of size V. This function does not change the properties of channelizer.

example

Y = getLatency(channelizer,N,V,isInputType) returns the number of cycles that an object would take to channelize an input frame, if it had FFT length N, vector input of size V, and isInputType that indicates the complexity of the input when the filter coefficients of channelizer are complex. This function does not change the properties of channelizer.

Examples

collapse all

The latency of the dsphdl.Channelizer object varies with the FFT length, filter structure, vector size, and input type. Use the getLatency function to find the latency of a particular configuration. The latency is measured as the number of cycles between the first valid input and the first valid output, assuming that the input is contiguous. The number of filter coefficients does not affect the latency. Setting the output size equal to the input size reduces the latency because the samples are not saved and reordered.

Create a dsphdl.Channelizer object with filter structure set to direct form transposed and request the latency.

channelize = dsphdl.Channelizer(NumFrequencyBands=512, ...
    FilterStructure='Direct form transposed');
L512 = getLatency(channelize)
L512 = 1118

Request hypothetical latency information about a similar object with a different number of frequency bands (FFT length). The properties of the original object do not change.

L256 = getLatency(channelize,256)
L256 = 592
N = channelize.NumFrequencyBands
N = 512

Request hypothetical latency information of a similar object that accepts eight-sample vector input.

L256v8 = getLatency(channelize,256,8)
L256v8 = 132

Enable scaling at each stage of the FFT. The latency does not change.

channelize.Normalize = true;
L512n = getLatency(channelize)
L512n = 1118

Request the same output size and order as the input data. The latency decreases because the object does not need to store and reorder the data before output. The default input size is scalar.

channelize.OutputSize = 'Same as input size';
L512r = getLatency(channelize)
L512r = 1084

Check the latency of a vector input implementation where the input and output are the same size. Specify the current value of the FFT length and a vector size of 8 samples. The latency decreases because the object computes results in parallel when the input is a vector.

L512rv8 = getLatency(channelize,channelize.NumFrequencyBands,8)
L512rv8 = 218

Check the latency of a vector input implementation where the input type is complex. Specify the current value of the FFT length and a vector size of 16 samples.

L512rv16i = getLatency(channelize,channelize.NumFrequencyBands,16,true)
L512rv16i = 152

Input Arguments

collapse all

Channelizer System object that you created and configured. See dsphdl.Channelizer.

Number of frequency bands (FFT length), specified as an integer power of 2 from 22 to 216.

Vector size, specified as a power of 2 from 1 to 64. The vector size cannot be greater than the FFT length. When you do not specify this argument, the function assumes scalar input.

Indicator of input data whether it is complex or not.

Output Arguments

collapse all

Cycles of latency that the object takes to channelize an input frame, returned as an integer. The latency is the number of cycles between the first valid input and the first valid output, assuming the input is contiguous. Each call to the object simulates one cycle.

Version History

Introduced in R2017a