The Max computation latency parameter enables you to specify a time budget for HDL Coder™ when performing a single computation. Within this time budget, HDL Coder does its best to optimize your design without exceeding the Max oversampling ratio.
When you set a Max computation latency, N
,
each Simulink® time step takes N
time
steps in the implemented design.
The following table shows the possible values for the maximum computation latency and their effect on the design implementation.
Max computation latency value, N | Description |
---|---|
N = 1 (default) or N < 1 |
|
N > 1 |
|
In the Configuration Parameters dialog box, you can specify the maximum computation latency:
In HDL Code Generation > Global Settings, click the Optimization tab.
For Max computation latency, enter the number of cycles HDL Coder can use to implement a computation.
In the HDL Workflow Advisor, you can specify the maximum oversampling ratio:
In the HDL Code Generation > Set Code Generation Options > Set Advanced Options task, click the Optimization tab.
For Max computation latency, enter the number of cycles HDL Coder can use to implement a computation.
On the command line, set the MaxComputationLatency
property
using makehdl
or hdlset_param
.
For example, if you know the inputs change at most every 1000
cycles for your DUT subsystem, dut
, in
your model, mymodel
, enter:
hdlset_param ('myModel/dut', 'MaxComputationLatency', 1000)
The maximum computation latency feature has the following restrictions:
You cannot set the maximum computation latency to Inf
.