Documentation

fdhdltool

Open Generate HDL dialog box

Syntax

fdhdltool(filtSO,nt)
fdhdltool(filtSO,nt,fd)
fdhdltool(filterObj)

Description

example

fdhdltool(filtSO,nt) opens the Generate HDL dialog box to set options and generate HDL code for the specified filter System object™ and the input data type, specified by nt.

When the dialog box opens, it displays default values for code generation options that apply to the filter. You can then specify code generation options and generate HDL code. You can also use this dialog box to generate HDL test bench code and scripts for third-party EDA tools.

fdhdltool operates on a copy of the filter, not the original object in the workspace. After you call fdhdltool, changes made to the original filter do not apply to the copy. The Generate HDL dialog box does not update either. The naming convention for the copied filter is filt_copy, where filt is the name of the original filter.

fdhdltool(filtSO,nt,fd) opens the Generate HDL dialog box to set options and generate HDL code for a dsp.VariableFractionalDelay filter System object. Specify the input data type by nt, and the fractional delay data type by fd.

fdhdltool(filterObj) opens the Generate HDL dialog box to set options and generate HDL code for the specified dfilt filter object.

Examples

collapse all

Design a filter System object™.

Fs = 96e3;
filtSpecs = fdesign.lowpass(20e3,22.05e3,1,80,Fs);
FIRLowpass = design(filtSpecs,'equiripple','filterstructure','dfsymfir','SystemObject',true);

Choose a fixed-point data type for the input data.

T = numerictype(1,16,15);

Open the Generate HDL dialog box by passing the filter and the data type as arguments.

fdhdltool(FIRLowpass,T)

Input Arguments

collapse all

Filter from which to generate HDL code, specified as a filter System object. For an overview of supported filter types, see Generate HDL from Filter System Objects. To create a filter System object, use its constructor or the design function.

Input data type, specified as a numerictype object. This argument applies only when the input filter is a System object. Call numerictype(s,w,f), where s is 1 for signed and 0 for unsigned, w is the word length in bits, and f is the number of fractional bits.

Fractional delay data type, specified as a numerictype object. This argument applies only when the input filter is a dsp.VariableFractionalDelay System object. Call numerictype(s,w,f), where s is 1 for signed and 0 for unsigned, w is the word length in bits, and f is the number of fractional bits.

Filter from which to generate HDL code, specified as a dfilt object. You can create this object by using the design function. For an overview of supported filter features, see Filter Configuration Options.

Introduced in R2007a

Was this topic helpful?