Floating point tolerance check
Model Configuration Pane: Test Bench
Description
When you generate HLS code from your MATLAB® algorithm containing floating-point types, specify the floating-point tolerance strategy option.
Dependencies
Generate test bench enables this parameter. Enable this parameter by clicking Generate Test Bench in the Verification > Verify with HLS Test Bench > Output Settings pane of the HDL Workflow Advisor.
Settings
Relative Error
(default) |
ULP Error
-
Relative Error
This is the default option. When you verify the generated code by using HDL Testbench, HDL Coder™ checks for the floating-point tolerance based on the relative error.
-
ULP Error
When you verify the generated code by using HLS Testbench, HDL Coder checks for the floating-point tolerance of the native floating-point library or the floating-point target library that your design mapped to based on the ULP error.
Examples
Recommended Settings
No recommendations.
Programmatic Use
Parameter:
FPToleranceStrategy
|
Type: character vector |
Value:
"Relative Error" | "ULP Error"
|
Default:
"Relative Error"
|
Version History
Introduced in R2024a