Documentation

Fundamental Properties

Customize filter name and input data type, generation language, and target folder

Fundamental properties used at filter generatation.

Specify these properties as Name,Value pair arguments to the generatehdl function, or set the corresponding options at the top of the Generate HDL dialog box.

Target

expand all

This name is also used for the VHDL entity or Verilog module for the filter. The coder creates the file in the location specified in the TargetDirectory property. The coder uses the file type extension defined by the VerilogFileExtension or VHDLFileExtension property.

Avoiding Reserved Words in Names

If you specify a character vector that is a reserved word in the selected language, the coder appends either:

  • The Reserved word postfix option on the Global Settings > General tab of the Generate HDL dialog box.

  • The ReservedWordPostfix property.

See Setting the Postfix String for Resolving HDL Reserved Word Conflicts.

Specify the subfolder under the current working folder into which generated files are written. Alternatively, the character vector can specify a complete path.

Specify which language to use to generate the HDL implementation of the filter. The coder uses the file type extension defined by the VerilogFileExtension or VHDLFileExtension property.

Data Types

expand all

When you call generatehdl on a System object™, you must specify this property. Set the property to an object of the numerictype class. Create this object by calling 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. See numerictype.

d = fdesign.lowpass('Fp,Fst,Ap,Ast',0.2,0.22,1,60);
filt = design(filt,'equiripple','filterstructure','dfsymfir', ...
    'SystemObject',true);
generatehdl(filt,'InputDataType',numerictype(1,16,15))

Language-Specific

expand all

The coder uses this extension for generated Verilog files.

The coder uses this extension for generated VHDL files.

The coder creates this architecture in generated VHDL files.

At script generation time, the coder substitutes this character vector into the HDLCompileInit property. By default, the coder generates the library specification'vlib work/n'.

You can use VHDLLibraryName to avoid library name conflicts with your existing VHDL code. See Integration with Third-Party EDA Tools.

Was this topic helpful?