addDesignRangeSpecification
Add design range specification to parameter
Syntax
addDesignRangeSpecification(fcnName,paramName,designMin, designMax)
Description
addDesignRangeSpecification(
specifies
the minimum and maximum values allowed for the parameter, fcnName
,paramName
,designMin
, designMax
)paramName
,
in function, fcnName
. The fixed-point conversion
process uses this design range information to derive ranges for downstream
variables in the code.
Input Arguments
Examples
Add a Design Range Specification
% Set up the fixed-point configuration object cfg = coder.config('fixpt'); cfg.TestBenchName = 'dti_test'; cfg.addDesignRangeSpecification('dti', 'u_in', -1.0, 1.0) cfg.ComputeDerivedRanges = true; % Derive ranges and generate fixed-point code fiaccel -float2fixed cfg dti