Main Content

Fundamental HDL Code Generation Properties

Customize filter name, destination folder, and specify target language

With the fundamental HDL code generation properties, you can customize filter name, destination folder, and specify the target language.

Specify these properties as name-value arguments to the generatehdl function. Name is the property name and Value is the corresponding value. You can specify several name-value arguments in any order as 'Name1',Value1,...,'NameN',ValueN.

For example:

fir = dsp.FIRFilter('Structure','Direct form antisymmetric');
generatehdl(fir,'InputDataType',numerictype(1,16,15),'TargetLanguage','Verilog');

Target

expand all

HDL language of generated filter code, specified as 'VHDL' or 'Verilog'.

File name of generated HDL code, specified as a character vector or a string scalar. The coder adds a file type extension to the file name, as specified by the VerilogFileExtension or VHDLFileExtension properties. The file name also determines the name of the generated VHDL entity or Verilog module for the filter. The file is located in the folder specified by the TargetDirectory property.

If you specify a value that is a reserved word in the target language, the coder adds the postfix _rsvd to this value. You can update the postfix value by using the ReservedWordPostfix property. For more details, see Resolving HDL Reserved Word Conflicts.

Location of generated files, specified as a character vector or a string scalar. Specify the location as a subfolder under the current working folder, or as a complete path to the files.

Language-Specific

expand all

File type extension of generated Verilog file, specified as a character vector or a string scalar.

File type extension of generated VHDL file, specified as a character vector or a string scalar.

Data Types

expand all

Input data type for System object, specified as a numerictype object. This argument is required 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. For example:

fir = dsp.FIRFilter('Structure','Direct form antisymmetric');
generatehdl(fir,'InputDataType',numerictype(1,16,15));

Fractional delay data type, specified as a numerictype object. This argument is required 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. For example:

farrowfilt = dsp.VariableFractionalDelay('InterpolationMethod','Farrow');
generatehdl(farrowfilt,'InputDataType',numerictype(1,18,17), ...
    'FractionalDelayDataType',numerictype(1,8,7));

Tips

If you use the fdhdltool function to generate HDL code, you can specify the input and fractional delay data types as arguments, and then set additional properties in the Generate HDL dialog box.

PropertyLocation in Dialog Box
Language Target section at top of dialog box
Name
Folder
Verilog file extensionGlobal Settings tab
VHDL file extension

Version History

Introduced before R2006a