The xlGetReOrderedCoeff function provides the re-ordered coefficient set of a FIR Compiler block.
Syntax
A = xlGetReOrderedCoeff(new_coeff_set, returnType, handle)
Description
Note: All three parameters of this function are
required.
-
new_coeff_set - The new coefficient set that needs to be loaded into an existing FIR Compiler. Must be supplied to the function in the original order.
-
handle - Provides the scheme by which the cofficients are re-ordered.
This can either be a handle to the FIR Compiler block in the design, or the
path to a reload.txt file generated by the IP repository. If a FIR Compiler
block is selected on the Simulink
canvas, then the handle can be specified as
gcbh. -
returnType - Specifies whether to return the re-ordered coefficients or
the reload order only. You can specify this as either
coefforindex. Acoeffreturn type modifies the required coefficient set. It also provides the re-arranged coefficient set that can be directly supplied to the FIR compiler block. Theindexreturn type provides only the coefficient address vector using thenew_coeff_setthat needs to be processed manually.
Examples
Example 1:
If A is a row vector of coefficients, then the coefficients sorted in the reload order can be obtained as follows:
reload_order_coefficients = xlGetReOrderedCoeff(A,'coeff', gcbh)
In this example, reload_order_coefficients
specifies the order in which coefficients contained in A pass to the FIR Compiler
through the reload channel.
Alternatively, you can obtain the reload address vector:
reload_order_coefficients = A(xlGetReOrderedCoeff(A,'index',gcbh))
Example 2:
This example shows how to use an text file, generated by the IP repository, to specify the reload order.
reload_order_coefficients = xlGetReOrderedCoeff(A,'coeff','reload_<version>.txt')
See Also
FIR Compiler 7.2 block