Floating-Point Tolerance Parameters
Set the floating-point tolerance parameters in the Verification > Verify with HLS Test Bench > Test Bench Options tab of the HDL Workflow Advisor. Using the parameters in this tab, you can specify the floating-point tolerance strategy and the tolerance value.
Tolerance Strategy
When you generate HLS code from your MATLAB® algorithm containing floating-point types, specify the floating-point tolerance strategy option.
Settings
Default: Relative
Error
When you verify the generated code by using HLS Test bench, HDL Coder™ checks for the floating-point tolerance based on the relative error.
Dependency
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.
Limitation
ULP error is not supported for HLS code generation.
Command-Line Information
Parameter:
FPToleranceStrategy |
Type: character vector |
Value:
"Relative Error" |
Default:
"Relative Error" |
Tolerance Value
Enter the tolerance value based on the floating-point tolerance check setting.
Settings
Default: 1e-07
When you use this floating-point tolerance check setting, specify the
tolerance value as a double
.
Dependency
Generate test bench enables this parameter.
Command-Line Information
Parameter:
FPToleranceValue |
Type:
double |
Default:
1e-07 |