The Target and Optimizations pane enables you to specify the target hardware and apply certain optimizations to the generated HDL code.
Select a synthesis tool, then select the Family, Device, Package, and Speed for your synthesis target.
Default: No synthesis
tool specified
The options are:
No synthesis tool specified
Select this option if you do not want to perform logic synthesis. You can generate HDL code from your design.
Xilinx Vivado
Specify Xilinx® Vivado as the synthesis tool.
Xilinx ISE
Specify Xilinx ISE as the synthesis tool.
Altera Quartus II
Specify Altera® Quartus II as the synthesis tool.
If your synthesis tool is not one of the Synthesis tool options, see Synthesis Tool Path Setup.
Specify the target frequency in MHz for multiple features and workflows.
Default: 0
This setting is the target frequency in MHz for multiple features and workflows that HDL Coder™ supports. The supported features are:
FPGA floating-point target library mapping: Specify
the target frequency that you want the IP to achieve when you use ALTERA
MEGAFUNCTION (ALTERA FP FUNCTIONS)
. If you do not specify
the target frequency, HDL Coder sets the target frequency to a
default value of 200 MHz
.
Adaptive pipelining: If your design uses multipliers,
specify the synthesis tool and the target frequency. Based on these
settings, HDL Coder estimates the number of pipelines that can
be inserted to improve area and timing on the target platform. If
you do not specify the target frequency, HDL Coder uses a target
frequency of 0 MHz
and cannot insert any pipelines.
You can also set the target frequency by using the Target Frequency (MHz) setting in the Set Target Frequency task in the HDL Workflow Advisor.
Specify the target frequency for these workflows-
Generic ASIC/FPGA
: To specify
the target frequency that you want your design to achieve. HDL Coder generates
a timing constraint file for that clock frequency. It adds the constraint
to the FPGA synthesis tool project that you create in the Create
Project task. If the target frequency is not achievable,
the synthesis tool generates an error.
IP Core Generation
: To
specify the target frequency for HDL Coder to modify the clock
module setting in the reference design to produce the clock signal
with that frequency. Enter a target frequency value that is within
the Frequency Range (MHz). If you do not specify
the target frequency, HDL Coder uses the Default (MHz) target
frequency.
Simulink Real-Time FPGA I/O
:
For Speedgoat boards that are supported with Xilinx ISE
,
specify the target frequency to generate the clock module to produce
the clock signal with that frequency.
The Speedgoat boards that are supported with Xilinx
Vivado
use the IP Core Generation
workflow
infrastructure. Specify the target frequency for HDL Coder to
modify the clock module setting in the reference design to produce
the clock signal with that frequency. Enter a target frequency value
that is within the Frequency Range (MHz). If
you do not specify the target frequency, HDL Coder uses the Default
(MHz) target frequency.
FPGA Turnkey
: To generate
the clock module to produce the clock signal with that frequency automatically.
Property: TargetFrequency |
Type: integer |
Value: integer greater than or equal to 0 |
Default: 0 |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Enable delay balancing.
Default: On
If HDL Coder detects introduction of new delays along one path, matching delays are inserted on the other paths. When delay balancing is enabled, the generated model is functionally equivalent to the original model.
The latency along signal paths might not be balanced, and the generated model might not be functionally equivalent to the original model.
Property: BalanceDelays |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Map pipeline registers in the generated HDL code to RAM.
Default: Off
Map pipeline registers in the generated HDL code to RAM.
Do not map pipeline registers in the generated HDL code to RAM.
Property: MapPipelineDelaysToRAM |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Optimize timing controller entity for speed and code size by implementing separate counters per rate.
Default: On
HDL 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.
The coder generates a timing controller that uses one counter to generate all rates in the model.
A timing controller code file is generated if required by the design, for example:
When code is generated for a multirate model
When a cascade block implementation for certain blocks is specified
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.
The timing controller name derives from the name of the subsystem
that is selected for code generation (the DUT), and the current value
of the property TimingControllerPostfix
. For example,
if the name of your DUT is my_test
, in the default
case the coder adds the TimingControllerPostfix
_tc
to
form the timing controller name my_test_tc
.
Property: OptimizeTimingController |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Omit generation of clock enable logic for single-rate designs.
Default: Off
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;
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;
In some cases, HDL Coder emits clock enables even when Minimize clock enables is selected. These cases are:
Registers inside Enabled, State-Enabled, and Triggered subsystems.
Multirate models.
The coder always emits clock enables for the following blocks:
commseqgen2/PN Sequence Generator
dspsigops/NCO
Note: HDL support for the NCO block will be removed in a future release. Use the NCO HDL Optimized block instead. |
dspsrcs4/Sine Wave
hdldemolib/HDL FFT
built-in/DiscreteFir
dspmlti4/CIC Decimation
dspmlti4/CIC Interpolation
dspmlti4/FIR Decimation
dspmlti4/FIR Interpolation
dspadpt3/LMS Filter
dsparch4/Biquad Filter
Property: MinimizeClockEnables |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Enable to use trigger input signal as clock in generated HDL code.
Default: Off
For triggered subsystems, use the trigger input signal as a clock in the generated HDL code.
For triggered subsystems, do not use the trigger input signal as a clock in the generated HDL code.
Property: TriggerAsClock |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Enable this option to optimize Delay blocks with non zero initial condition.
Default: On
Transform Delay blocks with nonzero Initial condition in your Simulink® model to Delay blocks with zero Initial condition and some additional logic in the generated HDL code.
By using this transformation, HDL Coder can perform optimizations such as sharing, distributed pipelining, and clock-rate pipelining more effectively, and prevent an assertion from being triggered in the validation model.
Do not transform Delay blocks with nonzero Initial condition in your Simulink model.
Property: TransformNonZeroInitValDelay |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Specify the maximum input bit width for multipliers in your design.
Default: Inf
Partition multipliers so that N is the maximum multiplier input bit width.
To improve hardware mapping results, set the multiplier partitioning threshold to the input bit width of the DSP or multiplier hardware on your target device.
Do not partition multipliers.
Property: MultiplierPartitioningThreshold |
Type: integer |
Value: integer greater than or equal to 0 |
Default: Inf |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Specify the minimum RAM size for mapping to block RAMs instead of to registers.
Default: 256
The RAM mapping threshold must be an integer greater than or equal to zero. HDL Coder uses the threshold to determine whether or not to map the following elements to block RAMs instead of to registers:
Delay blocks
Persistent arrays in MATLAB Function blocks
Property: RAMMappingThreshold |
Type: integer |
Value: integer greater than or equal to 0 |
Default: 256 |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Specify whether to generate a reset for the timing controller.
Default: default
resettable
Generate a reset for the timing controller. If you select this
option, the Clock inputs value must be Single
.
default
Do not generate a reset for the timing controller.
Property: TimingControllerArch |
Type: character vector |
Value: 'resettable' | 'default' |
Default: 'default' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Specify that retiming be applied across a subsystem hierarchy.
Default: Off
Enable retiming across a subsystem hierarchy. HDL Coder applies
retiming hierarchically down, until it reaches a subsystem where DistributedPipelining is off
.
Distribute pipelining only within a subsystem.
Property: HierarchicalDistPipelining |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Insert pipeline registers at the clock rate instead of the data rate for multi-cycle paths in your design.
Default: On
Insert pipeline registers at clock rate for multi-cycle paths.
Insert pipeline registers at data rate for multi-cycle paths.
Property: ClockRatePipelining |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
For DUT output ports, insert pipeline registers at the clock rate instead of the data rate.
Default: Off
At DUT output ports, insert pipeline registers at clock rate.
At DUT output ports, insert pipeline registers at data rate.
Property: ClockRatePipelineOutputPorts |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Enable to prevent distributed pipelining from moving design delays.
Default: Off
Prevent distributed pipelining from moving design delays.
Do not prevent distributed pipelining from moving design delays.
Property: PreserveDesignDelays |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Insert adaptive pipeline registers in your design.
Default: On
Insert adaptive pipeline registers in your design. For HDL Coder to insert adaptive pipelines, you must specify the synthesis tool. If your design has multipliers, specify the synthesis tool and the target frequency for adaptive pipeline insertion.
Do not insert adaptive pipeline registers.
Property: AdaptivePipelining |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Specify priority for distributed pipelining algorithm.
Default: Numerical
Integrity
Numerical Integrity
Prioritize numerical integrity when distributing pipeline registers.
This option uses a conservative retiming algorithm that does not move registers across a component if the functional equivalence to the original design is unknown.
Performance
Prioritize performance over numerical integrity.
Use this option if your design requires a higher clock frequency and the Simulink behavior does not need to strictly match the generated code behavior. This option uses a more aggressive retiming algorithm that moves registers across a component even if the modified design's functional equivalence to the original design is unknown.
Property: DistributedPipeliningPriority |
Type: character vector |
Value: 'NumericalIntegrity' | 'Performance' |
Default: 'NumericalIntegrity' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Enable to share adders with the resource sharing optimization.
Default: Off
When resource sharing is enabled, share adders with a bit width greater than or equal to Adder sharing minimum bitwidth.
Do not share adders.
Property: ShareAdders |
Type: character vector |
Value: 'on' | 'off' |
Default: 'off' |
Share multipliers with the resource sharing optimization.
Default: On
When resource sharing is enabled, share multipliers with a bit
width greater than or equal to MultiplierSharingMinimumBitwidth
.
For successfully sharing multipliers, the input fixed-point data types
must have the same wordlength. The fraction lengths and signs of the
fixed-point data types can be different.
Do not share multipliers.
Property: ShareMultipliers |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Share Multiply-Add blocks with the resource sharing optimization.
Default: On
When resource sharing is enabled, share Multiply-Add blocks with a bit width greater than or equal to Multiply-Add block sharing minimum bitwidth.
Do not share Multiply-Add blocks.
Property: ShareMultiplyAdds |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Share atomic subsystems with the resource sharing optimization.
Default: On
When resource sharing is enabled, share atomic subsystems.
Do not share atomic subsystems.
Property: ShareAtomicSubsystems |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Share MATLAB Function blocks with the resource sharing optimization.
Default: On
When resource sharing is enabled, share MATLAB Function blocks.
Do not share MATLAB Function blocks.
Property: ShareMATLABBlocks |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Share floating-point IP blocks in the target hardware with the resource sharing optimization.
Default: On
When you enable resource sharing, HDL Coder shares floating-point IP blocks. The number of floating-point IP blocks that get shared depends on the SharingFactor that you specify for the subsystem.
Do not share floating-point IP blocks.
Property: ShareFloatingPointIP |
Type: character vector |
Value: 'on' | 'off' |
Default: 'on' |
Minimum bit width for shared adders.
To share only larger adders with the resource sharing optimization, specify the minimum adder bit width.
Default: 0
No minimum bit width for shared adders.
When resource sharing and adder sharing are enabled, share adders with a bit width greater than or equal to N.
Property: AdderSharingMinimumBitwidth |
Type: integer |
Value: integer greater than or equal to 0 |
Default: 0 |
Minimum bit width for shared multipliers.
To share only larger multipliers with the resource sharing optimization, specify the minimum multiplier bit width.
Default: 0
No minimum bit width for shared multipliers.
When resource sharing and multiplier sharing are enabled, share multipliers with a bit width greater than or equal to N.
Property: MultiplierSharingMinimumBitwidth |
Type: integer |
Value: integer greater than or equal to 0 |
Default: 0 |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Maximum word-length by which HDL Coder promotes a multiplier for sharing with other multipliers.
To share smaller multipliers with other larger multipliers by using the resource sharing optimization, specify the multiplier promotion threshold.
Default: 0
No difference in word-length between the multipliers. In other words, HDL Coder shares multipliers that have the same word-lengths.
Maximum word-length by which HDL Coder promotes a multiplier for sharing with other multipliers. HDL Coder promotes and shares multipliers with different word-lengths, if the difference in word-lengths is less than or equal to N.
Property: MultiplierPromotionThreshold |
Type: integer |
Value: integer greater than or equal to 0 |
Default: 0 |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
Minimum bit width for shared Multiply-Add blocks.
To share only larger Multiply-Add blocks with the resource sharing optimization, specify the minimum multiplier bit width.
Default: 0
No minimum bit width for shared Multiply-Add blocks.
When resource sharing and Multiply-Add block sharing are enabled, share Multiply-Add blocks with a bit width greater than or equal to N.
Property: MultiplierAddSharingMinimumBitwidth |
Type: integer |
Value: integer greater than or equal to 0 |
Default: 0 |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.