Main Content

Check for blocks that have nonzero output latency

Check ID: com.mathworks.HDL.ModelChecker.runNFPLatencyChecks

Check for blocks that introduce latency in the generated code but do not simulate with latency in original model


Native floating-point operators and certain fixed-point blocks introduce latency in the generated HDL code. This check detects blocks in your Simulink® model that introduce latency in the generated HDL code when you use fixed point and floating-point types. If your model uses floating-point types, set the Floating Point IP Library to Native Floating Point.

When you run the check, the Result subpane displays hyperlinks to the blocks that have a nonzero output latency, and the latency value. When you generate code, HDL Coder™ figures out this latency.

Results and Recommended Actions

By using the latency information reported in the Result subpane, you can add the appropriate number of delays adjacent to those blocks in your original model, and therefore simulate the original model with latency. The code generator absorbs the delays you added to your model, and does not have to introduce additional latency in the generated model.

For blocks with nonzero latency that are reported by this check, consider the effect this latency has in the validation model. In the generated model and validation model, you see the additional delays that the code generator adds to account for the latency.

See Also

Latency Considerations with Native Floating Point