Specified trigonometric function on input (HDL Coder)
The Trigonometric Function block is available with Simulink®.
For information about the simulation behavior and block parameters, see Trigonometric Function.
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.
The Trigonometric Function block supports HDL code generation for the functions in this table.
Architecture | Function | Approximation Method | UsePipelinedKernel Setting | Additional cycles of latency |
---|---|---|---|---|
SinCosCordic | sin | CORDIC | On | Number of iterations + 1 |
Off | 0 | |||
cos | CORDIC | On | Number of iterations + 1 | |
Off | 0 | |||
cos + jsin | CORDIC | On | Number of iterations + 1 | |
Off | 0 | |||
sincos | CORDIC | On | Number of iterations + 1 | |
Off | 0 |
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.
Whether to use a pipelined implementation of the CORDIC algorithm
in the generated code. The default is On
.
Setting | Description |
---|---|
On (default) | Use a pipelined implementation of the CORDIC algorithm. The pipelined implementation adds latency. |
Off | Use a combinatorial implementation of the CORDIC algorithm. The combinatorial implementation does not add latency. If the block is in a feedback loop, use this implementation. |
For the sin
and cos
functions,
only signed fixed-point data types are
supported for CORDIC approximations.
HDL Coder™ displays an error when you select:
An unsupported function on the Trigonometric Function block.
An Approximation method other
than CORDIC
.
The SinCosCordic architecture, UsePipelinedKernel is On
,
and the block is in a feedback loop.