dsphdl.FIRInterpolator
Description
The dsphdl.FIRInterpolator
System object™ implements a single-rate polyphase FIR interpolation filter that is optimized
for HDL code generation. The object provides a hardware-friendly interface with input and
output control signals. To provide a cycle-accurate simulation of the generated HDL code, the
object models architectural latency including pipeline registers and resource sharing.
The object accepts scalar or vector input and outputs a scalar or vector depending on the interpolation factor and the number of cycles between input samples. The object implements a polyphase decomposition with InterpolationFactor subfilters. The filter can implement a serial architecture if there is regular spacing between input samples.
The object provides two filter structures. The direct form systolic architecture provides a fully parallel implementation that makes efficient use of Intel® and Xilinx® DSP blocks. The direct form transposed architecture is a fully parallel implementation that is suitable for FPGA and ASIC applications. For a filter implementation that matches multipliers, pipeline registers, and pre-adders to the DSP configuration of your FPGA vendor, specify your target device when you generate HDL code.
All filter structures optimize hardware resources by sharing multipliers for symmetric or antisymmetric filters and by removing the multipliers for zero-valued coefficients such as in half-band filters and Hilbert transforms.
To filter and interpolate input data with an HDL-optimized algorithm::
Create the
dsphdl.FIRInterpolator
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Note
You can also generate HDL code for this hardware-optimized algorithm, without creating a MATLAB® script, by using the DSP HDL IP Designer app. The app provides the same interface and configuration options as the System object.
Creation
Syntax
Description
returns a
System object
firInterp
= dsphdl.FIRInterpolatorfirInterp
, which upsamples and filters the input signal with the
default settings.
firInterp = dsphdl.FIRInterpolator(INTERP,NUM)
returns a
System object
firInterp
with the InterpolationFactor
property
set to INTERP
and the Numerator
property set to
NUM
.
returns an HDL FIR Interpolation System object with one or more properties set by name-value arguments.firInterp
= dsphdl.FIRInterpolator(___,Name=Value
)
Properties
Usage
Syntax
Description
[
filters data when dataOut
,validOut
]
= firInterp(dataIn
,validIn
,reset
)reset
is false
. When
reset
is true
, the object resets the filter
registers. The object expects the reset
argument only when you set
the ResetInputPort
property to true
.
For more reset considerations, see the Reset Signal section on the Hardware Control Signals page.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Algorithms
This System object implements the algorithms described on the FIR Interpolator block reference page.