Enter the tolerance value based on floating-point tolerance check setting
N
Default: 1e-07
The value of N
depends on the floating-point tolerance check
setting that you specify. Use this setting to specify a custom tolerance value for checking
the numerical accuracy in the generated test bench. When you set the Floating
point tolerance check based on to:
relative error
, the default is a tolerance value of
1e-07
. When you use this floating-point tolerance check setting,
specify the tolerance value as a double data type.
ulp error
, the default is a Tolerance
Value of 0
. When you use this floating-point tolerance
check setting, specify the tolerance value as an integer. You can specify a
Tolerance Value, N, that is greater than or equal to
0
.
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
To specify the floating-point tolerance value for a model, use the
hdlset_param
function to specify the tolerance strategy, and then
enter the tolerance value. For example, to check the floating-point tolerance based on ULP
error and enter the tolerance value:
% check for floating-point tolerance based on the ULP error hdlset_param('sfir_single', 'FPToleranceStrategy', 'ULP'); % When using ULP error, optionally enter tolerance value greater than or equal to 0 hdlset_param('FP_test_16a', 'FPToleranceValue', 1);