Perform mathematical function (HDL Coder)
The Math Function block is available with Simulink®.
For information about the simulation behavior and block parameters, see Math Function.
Architecture | Description |
---|---|
ComplexConjugate | Compute complex conjugate. See Math Function in the Simulink documentation. |
Architecture | Description |
---|---|
Hermitian | Compute hermitian. See Math Function in the Simulink documentation. |
This block has multi-cycle implementations that introduce additional latency in the generated code. To see the added latency, view the generated model or validation model. See Generated Model and Validation Model.
Architecture | Parameters | Additional cycles of latency | Description | ||
---|---|---|---|---|---|
Math (default)Reciprocal | None | 0 | Compute reciprocal as 1/N , using the HDL
divide (/ ) operator to implement the division. | ||
ReciprocalRsqrtBasedNewton | Iterations | Signed
input: Unsigned input: | Use the iterative Newton method. Select this option to optimize area. The default value for The recommended value for | ||
ReciprocalRsqrtBasedNewtonSingleRate | Iterations | Signed
input: ( Unsigned
input: ( | Use the single rate pipelined Newton method. Select this option to optimize speed, or if you want a single rate implementation. The default value for The recommended value for | ||
The Newton-Raphson iterative method:
ReciprocalRsqrtBasedNewton
and ReciprocalRsqrtBasedNewtonSingleRate
implement
the Newton-Raphson method with:
Architecture | Description |
---|---|
Transpose | Compute array transpose. See Math Function in the Simulink documentation. |
Number of registers to place at the outputs by moving existing delays within your design. Distributed pipelining does not redistribute these registers. The default is 0. See also ConstrainedOutputPipeline.
Number of input pipeline stages to insert in the generated code. Distributed pipelining and constrained output pipelining can move these registers. The default is 0. See also InputPipeline.
Number of output pipeline stages to insert in the generated code. Distributed pipelining and constrained output pipelining can move these registers. The default is 0. See also OutputPipeline.
The conj
, hermitian
,
and transpose
functions support complex
data.
When you use a reciprocal
implementation:
Input must be scalar and must have integer or fixed-point (signed or unsigned) data type.
The output must be scalar and have integer or fixed-point (signed or unsigned) data type.
Only the Zero
rounding
mode is supported.
The Saturate on integer overflow option on the block must be selected.