This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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 comma-separated pairs of Name,Value arguments to the generatehdl function. Name is the property name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair 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

Introduced before R2006a