Products & Services Solutions Academia Support User Community Company

HDL Coder Pane: Global Settings

Global Settings Overview

The Global Settings pane lets you set options to specify detailed characteristics of the generated code, such as HDL element naming and whether certain optimizations are applied.

Reset type

Specify whether to use asynchronous or synchronous reset logic when generating HDL code for registers.

Settings

Default: Asynchronous

Asynchronous

Use asynchronous reset logic.

Synchronous

Use synchronous reset logic.

Command-Line Information

Property: ResetType
Type: string
Value: 'async' | 'sync'
Default: 'async'

See Also

ResetType

Reset asserted level

Specify whether the asserted (active) level of reset input signal is active-high or active-low.

Settings

Default: Active-high

Active-high

Asserted (active) level of reset input signal is active-high (1).

Active-low

Asserted (active) level of reset input signal is active-low (0).

Command-Line Information

Property: ResetAssertedLevel
Type: string
Value: 'active-high' | 'active-low'
Default: 'active-high'

See Also

ResetAssertedLevel

Clock input port

Specify the name for the clock input port in generated HDL code.

Settings

Default: clk

Enter a string value to be used as the clock signal name in generated HDL code. If you specify a string that is a VHDL or Verilog reserved word, the code generator appends a reserved word postfix string to form a valid VHDL or Verilog identifier. For example, if you specify the reserved word signal, the resulting name string would be signal_rsvd.

Command-Line Information

Property: ClockInputPort
Type: string
Value: Any identifier that is legal in the target language
Default: 'clk'

See Also

ClockInputPort

Clock enable input port

Specify the name for the clock enable input port in generated HDL code.

Settings

Default: clk_enable

Enter a string value to be used as the clock enable input port name in generated HDL code. If you specify a string that is a VHDL or Verilog reserved word, the code generator appends a reserved word postfix string to form a valid VHDL or Verilog identifier. For example, if you specify the reserved word signal, the resulting name string would be signal_rsvd.

Tip

The clock enable input signal is asserted active-high (1). Thus, the input value must be high for the generated entity's registers to be updated.

Command-Line Information

Property: ClockEnableInputPort
Type: string
Value: Any identifier that is legal in the target language
Default: 'clk_enable'

See Also

ClockEnableInputPort

Oversampling factor

Specify frequency of global oversampling clock as a multiple of the model's base rate.

Settings

Default: 1

Oversampling factor specifies the oversampling factor of a global oversampling clock. The oversampling factor expresses the desired rate of the global oversampling clock as a multiple of your model's base rate.

When you specify the Oversampling factor for a global oversampling clock, note these requirements:

Command-Line Information

Property: Oversampling
Type: int
Value: integer greater than or equal to 1
Default: 1

See Also

Generating a Global Oversampling Clock
Oversampling

Reset input port

Enter the name for the reset input port in generated HDL code.

Settings

Default: reset

Enter a string value to be used as the reset input port name in generated HDL code. If you specify a string that is a VHDL or Verilog reserved word, the code generator appends a reserved word postfix string to form a valid VHDL or Verilog identifier. For example, if you specify the reserved word signal, the resulting name string would be signal_rsvd.

Tip

If the reset asserted level is set to active-high, the reset input signal is asserted active-high (1) and the input value must be high (1) for the entity's registers to be reset. If the reset asserted level is set to active-low, the reset input signal is asserted active-low (0) and the input value must be low (0) for the entity's registers to be reset.

Command-Line Information

Property: ResetInputPort
Type: string
Value: Any identifier that is legal in the target language
Default: 'reset'

See Also

ResetInputPort

Comment in header

Specify comment lines in header of generated HDL and test bench files.

Settings

Default: None

Text entered in this field generates a comment line in the header of generated model and test bench files. The code generator adds leading comment characters as appropriate for the target language. When newlines or linefeeds are included in the string, the code generator emits single-line comments for each newline.

Command-Line Information

Property: UserComment
Type: string

See Also

UserComment

Verilog file extension

Specify the file-name extension for generated Verilog files.

Settings

Default: .v

This field specifies the file-name extension for generated Verilog files.

Dependencies

This option is enabled when the target language (specified by the Language option) is Verilog.

Command-Line Information

Property: VerilogFileExtension
Type: string
Default: '.v'

See Also

VerilogFileExtension

VHDL file extension

Specify the file-name extension for generated VHDL files.

Settings

Default: .vhd

This field specifies the file-name extension for generated VHDL files.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: VHDLFileExtension
Type: string
Default: '.vhd'

See Also

VHDLFileExtension

Entity conflict postfix

Specify the string used to resolve duplicate VHDL entity or Verilog module names in generated code.

Settings

Default: _block

The specified postfix resolves duplicate VHDL entity or Verilog module names. For example, in the default case, if the coder detects two entities with the name MyFilt, the coder names the first entity MyFilt and the second instance MyFilt_entity.

Command-Line Information

Property: EntityConflictPostfix
Type: string
Value: Any string that is legal in the target language
Default: '_block'

See Also

EntityConflictPostfix

Package postfix

Specify a string to append to the model or subsystem name to form name of a package file.

Settings

Default: _pkg

The coder applies this option only if a package file is required for the design.

Dependency

This option is enabled when:

The target language (specified by the Language option) is VHDL.

The target language (specified by the Language option) is Verilog, and the Multi-file test bench option is selected.

Command-Line Information

Property: PackagePostfix
Type: string
Value: Any string value that is legal in a VHDL package file name
Default: '_pkg'

See Also

PackagePostfix

Reserved word postfix

Specify a string to append to value names, postfix values, or labels that are VHDL or Verilog reserved words.

Settings

Default: _rsvd

The reserved word postfix is applied to identifiers (for entities, signals, constants, or other model elements) that conflict with VHDL or Verilog reserved words. For example, if your generating model contains a signal named mod, the coder adds the postfix _rsvd to form the name mod_rsvd.

Command-Line Information

Property: ReservedWordPostfix
Type: string
Default: '_rsvd'

See Also

ReservedWordPostfix

Split entity and architecture

Specify whether generated VHDL entity and architecture code is written to a single VHDL file or to separate files.

Settings

Default: Off

On

VHDL entity and architecture definitions are written to separate files.

Off

VHDL entity and architecture code is written to a single VHDL file.

Tips

The names of the entity and architecture files derive from the base file name (as specified by the generating model or subsystem name). By default, postfix strings identifying the file as an entity (_entity) or architecture (_arch) are appended to the base file name. You can override the default and specify your own postfix string.

For example, instead of all generated code residing in MyFIR.vhd, you can specify that the code reside in MyFIR_entity.vhd and MyFIR_arch.vhd.

Dependencies

This option is enabled when the target language (specified by the Language option) is Verilog.

Selecting this option enables the following parameters:

Command-Line Information

Property: SplitEntityArch
Type: string
Value: 'on' | 'off'
Default: 'off'

See Also

SplitEntityArch

Split entity file postfix

Enter a string to be appended to the model name to form the name of a generated VHDL entity file.

Settings

Default: _entity

Dependencies

This parameter is enabled by Split entity and architecture.

Command-Line Information

Property: SplitEntityFilePostfix
Type: string
Default: '_entity'

See Also

SplitEntityFilePostfix

Split arch file postfix

Enter a string to be appended to the model name to form the name of a generated VHDL architecture file.

Settings

Default: _arch

Dependencies

This parameter is enabled by Split entity and architecture.

Command-Line Information

Property: SplitArchFilePostfix
Type: string
Default: '_arch'

See Also

SplitArchFilePostfix

Clocked process postfix

Specify a string to append to HDL clock process names.

Settings

Default: _process

The coder uses process blocks for register operations. The label for each of these blocks is derived from a register name and the postfix _process. For example, the coder derives the label delay_pipeline_process from the register name delay_pipeline and the default postfix string _process.

Command-Line Information

Property: ClockProcessPostfix
Type: string
Default: '_process'

See Also

ClockProcessPostfix

Enable prefix

Specify the base name string for internal clock enables and other flow control signals in generated code.

Settings

Default: 'enb'

Where only a single clock enable is generated, Enable prefix specifies the signal name for the internal clock enable signal.

In some cases, multiple clock enables are generated (for example, when a cascade block implementation for certain blocks is specified). In such cases, Enable prefix specifies a base signal name for the first clock enable that is generated. For other clock enable signals, numeric tags are appended to Enable prefix to form unique signal names. For example, the following code fragment illustrates two clock enables that were generated when Enable prefix was set to 'test_clk_enable':

COMPONENT Timing_Controller
    PORT( clk                   :   IN    std_logic;
          reset                 :   IN    std_logic;
          clk_enable            :   IN    std_logic;
          test_clk_enable       :   OUT   std_logic;
          test_clk_enable_5_1_0 :   OUT   std_logic
          );
  END COMPONENT;

Command-Line Information

Property: EnablePrefix
Type: string
Default: 'enb'

See Also

EnablePrefix

Pipeline postfix

Specify string to append to names of input or output pipeline registers generated for pipelined block implementations.

Settings

Default: '_pipe'

Using a control file, you can specify a generation of input and/or output pipeline registers for selected blocks. The coder appends the string specified by the Pipeline postfix option when generating code for such pipeline registers.

Command-Line Information

Property: PipelinePostfix
Type: string
Default: '_pipe'

See Also

PipelinePostfix

Complex real part postfix

Specify string to append to real part of complex signal names.

Settings

Default: '_re'

Enter a string to be appended to the names generated for the real part of complex signals.

Command-Line Information

Property: ComplexRealPostfix
Type: string
Default: '_re'

See Also

ComplexRealPostfix

Complex imaginary part postfix

Specify string to append to imaginary part of complex signal names.

Settings

Default: '_im'

Enter a string to be appended to the names generated for the imaginary part of complex signals.

Command-Line Information

Property: ComplexImagPostfix
Type: string
Default: '_im'

See Also

ComplexImagPostfix

Input data type

Specify the HDL data type for the model's input ports.

Settings

For VHDL, the options are:

Default: std_logic_vector

std_logic_vector

Specifies VHDL type STD_LOGIC_VECTOR.

signed/unsigned

Specifies VHDL type SIGNED or UNSIGNED.

For Verilog, the options are:

Default: wire

In generated Verilog code, the data type for all ports is 'wire'. Therefore, Input data type is disabled when the target language is Verilog.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: InputType
Type: string
Value: (for VHDL)'std_logic_vector' | 'signed/unsigned'
(for Verilog) 'wire'
Default: (for VHDL) 'std_logic_vector'
(for Verilog) 'wire'

See Also

InputType

Output data type

Specify the HDL data type for the model's output ports.

Settings

For VHDL, the options are:

Default: Same as input data type

Same as input data type

Specifies that output ports have the same type specified by Input data type.

std_logic_vector

Specifies VHDL type STD_LOGIC_VECTOR.

signed/unsigned

Specifies VHDL type SIGNED or UNSIGNED.

For Verilog, the options are:

Default: wire

In generated Verilog code, the data type for all ports is 'wire'. Therefore, Output data type is disabled when the target language is Verilog.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: OutputType
Type: string
Value: (for VHDL)'std_logic_vector' | 'signed/unsigned'
(for Verilog) 'wire'
Default: If the property is left unspecified, output ports have the same type specified by InputType.

See Also

OutputType

Clock enable output port

Specify the name for the generated clock enable output.

Settings

Default: ce_out

A clock enable output is generated when the design requires one.

Command-Line Information

Property: ClockEnableOutputPort
Type: string
Default: 'ce_out'

See Also

ClockEnableOutputPort

Represent constant values by aggregates

Specify whether all constants in VHDL code are represented by aggregates, including constants that are less than 32 bits.

Settings

Default: Off

On

The coder represents all constants as aggregates. The following VHDL constant declarations show a scalar less than 32 bits represented as an aggregate:

GainFactor_gainparam <= (14 => '1',  OTHERS => '0');
Off

The coder represents constants less than 32 bits as scalars and constants greater than or equal to 32 bits as aggregates. The following VHDL code was generated by default for a value less than 32 bits:

GainFactor_gainparam <= to_signed(16384, 16);

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: UseAggregatesForConst
Type: string
Value: 'on' | 'off'
Default: 'off'

See Also

UseAggregatesForConst

Use "rising_edge" for registers

Specify whether or not generated code uses the VHDL rising_edge function to check for rising edges when operating on registers.

Settings

Default: Off

On

Generated code uses the VHDL rising_edge function to check for rising edges when operating on registers.

Off

Generated code checks for clock events when operating on registers.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: UseRisingEdge
Type: string
Value: 'on' | 'off'
Default: 'off'

See Also

UseRisingEdge

Loop unrolling

Specify whether VHDL FOR and GENERATE loops are unrolled and omitted from generated VHDL code.

Settings

Default: Off

On

Unroll and omit FOR and GENERATE loops from the generated VHDL code. (In Verilog code, loops are always unrolled.)

Off

Include FOR and GENERATE loops in the generated VHDL code.

Tips

If you are using an electronic design automation (EDA) tool that does not support GENERATE loops, select this option to omit loops from your generated VHDL code.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: LoopUnrolling
Type: string
Value: 'on' | 'off'
Default: 'off'

See Also

LoopUnrolling

Cast before sum

Specify whether operands in addition and subtraction operations are type cast to the result type before executing the operation.

Settings

Default: On

On

Typecast input values in addition and subtraction operations to the result type before operating on the values.

Off

Preserve the types of input values during addition and subtraction operations and then convert the result to the result type.

Command-Line Information

Property: CastBeforeSum
Type: string
Value: 'on' | 'off'
Default: 'on'

See Also

CastBeforeSum

Use Verilog `timescale directives

Specify use of compiler `timescale directives in generated Verilog code.

Settings

Default: On

On

Use compiler `timescale directives in generated Verilog code.

Off

Suppress the use of compiler `timescale directives in generated Verilog code.

Tip

The `timescale directive provides a way of specifying different delay values for multiple modules in a Verilog file. This setting does not affect the generated test bench.

Dependencies

This option is enabled when the target language (specified by the Language option) is Verilog.

Command-Line Information

Property: UseVerilogTimescale
Type: string
Value: 'on' | 'off'
Default: 'on'

See Also

UseVerilogTimescale

Inline VHDL configuration

Specify whether generated VHDL code includes inline configurations.

Settings

Default: On

On

Include VHDL configurations in any file that instantiates a component.

Off

Suppress the generation of configurations and require user-supplied external configurations. Use this setting if you are creating your own VHDL configuration files.

Tip

HDL configurations can be either inline with the rest of the VHDL code for an entity or external in separate VHDL source files. By default, the coder includes configurations for a model within the generated VHDL code. If you are creating your own VHDL configuration files, suppress the generation of inline configurations.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: InlineConfigurations
Type: string
Value: 'on' | 'off'
Default: 'on'

See Also

InlineConfigurations

Concatenate type safe zeros

Specify use of syntax for concatenated zeros in generated VHDL code.

Settings

Default: On

On

Use the type-safe syntax, '0' & '0', for concatenated zeros. Typically, this syntax is preferred.

Off

Use the syntax "000000..." for concatenated zeros. This syntax can be easier to read and more compact, but it can lead to ambiguous types.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Command-Line Information

Property: SafeZeroConcat
Type: string
Value: 'on' | 'off'
Default: 'on'

See Also

SafeZeroConcat

Optimize timing controller

Optimize timing controller entity for speed and code size by implementing separate counters per rate.

Settings

Default: On

On

The coder generates multiple counters (one counter for each rate in the model) in the timing controller code. The benefit of this optimization is that it generates faster logic, and the size of the generated code is usually much smaller.

Off

The coder generates a timing controller that uses one counter to generate all rates in the model.

Tip

A timing controller code file (Timing_Controller.vhd or Timing_Controller.v) is generated if required by the design, for example:

This file contains a module defining timing signals (clock, reset, external clock enable inputs and clock enable output) in a separate entity or module. In a multirate model, the timing controller entity generates the required rates from a single master clock using one or more counters and multiple clock enables.

Command-Line Information

Property: OptimizeTimingController
Type: string
Value: 'on' | 'off'
Default: 'on'

See Also

OptimizeTimingController

Minimize clock enables

Omit generation of clock enable logic for single-rate designs.

Settings

Default: Off

On

For single-rate models, omit generation of clock enable logic wherever possible. The following VHDL code example does not define or examine a clock enable signal. When the clock signal (clk) goes high, the current signal value is output.

Unit_Delay_process : PROCESS (clk, reset)
  BEGIN
    IF reset = '1' THEN
      Unit_Delay_out1 <= to_signed(0, 32);
    ELSIF clk'EVENT AND clk = '1' THEN
      Unit_Delay_out1 <= In1_signed;
    END IF;
  END PROCESS Unit_Delay_process;
Off

Generate clock enable logic. The following VHDL code extract represents a register with a clock enable (enb)

Unit_Delay_process : PROCESS (clk, reset)
  BEGIN
    IF reset = '1' THEN
      Unit_Delay_out1 <= to_signed(0, 32);
    ELSIF clk'EVENT AND clk = '1' THEN
      IF enb = '1' THEN
        Unit_Delay_out1 <= In1_signed;
      END IF;
    END IF;
  END PROCESS Unit_Delay_process;

Exceptions

In some cases, the coder emits clock enables even when Minimize clock enables is selected. These cases are:

Command-Line Information

Property: MinimizeClockEnable
Type: string
Value: 'on' | 'off'
Default: 'off'

See Also

MinimizeClockEnable

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS