# getLatency

Latency of FFT calculation

## Description

example

Y = getLatency(hdlfft) returns the number of cycles, Y, that the object takes to calculate the FFT of an input frame. The latency depends on the input vector size and the FFT length.

example

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

example

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

## Examples

collapse all

The latency of the object varies with the FFT length and the vector size. Use the getLatency function to find the latency of a particular configuration. The latency is the number of cycles between the first valid input and the first valid output, assuming that the input is contiguous.

Create a new dsphdl.FFT object and request the latency.

hdlfft = dsphdl.FFT('FFTLength',512);
L512 = getLatency(hdlfft)
L512 = 599

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

L256 = getLatency(hdlfft,256)
L256 = 329
N = hdlfft.FFTLength
N = 512

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

L256v8 = getLatency(hdlfft,256,8)
L256v8 = 93

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

hdlfft.Normalize = true;
L512n = getLatency(hdlfft)
L512n = 599

Request the same output order as the input order. The latency increases because the object must collect the output before reordering.

hdlfft.BitReversedOutput = false;
L512r = getLatency(hdlfft)
L512r = 1078

## Input Arguments

collapse all

FFT System object. See dsphdl.IFFT or dsphdl.FFT.

FFT length, specified as an integer power of 2 from 22 to 216. Use this argument to request the latency of an object similar to hdlfft, but with FFT length N.

Vector size, specified as a power of 2 from 1 to 64. The vector size cannot be greater than the FFT length. Use this argument to request the latency of an object similar to hdlfft, but with V-sample vector input. When you do not specify this argument, the function assumes scalar input.

## Output Arguments

collapse all

Cycles of latency that the object takes to calculate the FFT of 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 R2014a