Y = getLatency(hdliir)
returns the latency, Y, between the first valid input sample and
the first valid output sample, assuming contiguous input samples. The latency depends on
the Structure property of the object.
Y = getLatency(hdliir,V)
returns the latency, Y, for an input vector of
V elements. Use this syntax when the
Structure property is 'Pipelined feedback
form'. Other filter structures do not support vector input.
The latency of the dsphdl.BiquadFilter object varies with the filter structure and 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.BiquadFilter object and request the latency. The default filter structure is direct form II.
filtdf2=dsphdl.BiquadFilter
filtdf2 =
dsphdl.BiquadFilter with properties:
Structure: 'Direct form II'
Numerator: [1 2 1]
Denominator: [1 0.1000 0.2000]
ScaleValues: 1
Use get to show all properties
getLatency(filtdf2)
ans =
12
Create an object with a different filter structure and compare the latency.
Request hypothetical latency information about a similar object with vector input data. You can only use vector input data with the 'Pipelined feedback form' filter structure.
getLatency(filtpff,8)
ans =
55
Create an object with a serial filter structure and compare the latency.
filts = dsphdl.BiquadFilter(Structure='Direct form I fully serial');
getLatency(filts)
hdliir — HDL-optimized filter System object™ dsphdl.BiquadFilter
HDL-optimized filter System object that you created and configured. See dsphdl.BiquadFilter.
V — Vector size power of 2 from 1 to 64
Vector size, specified as a power of 2 from 1 to 64. Use this argument to
request the latency of a similar object, but with V-sample
vector input. When you do not specify this argument, the function assumes scalar
input.
Vector input is supported only when the Structure property
is 'Pipelined feedback form'.
Cycles of latency that the filter object takes between the first valid input
and the first valid output. Each call to the object simulates one cycle. This
latency assumes valid input data on every cycle.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.