Trigonometric Function

Specified trigonometric function on input (HDL Coder)

Description

The Trigonometric Function block is available with Simulink®.

For information about the simulation behavior and block parameters, see Trigonometric Function.

HDL Architecture

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.

ArchitectureFunctionApproximation MethodUsePipelinedKernel SettingAdditional cycles of latency
SinCosCordicsinCORDICOn

Number of iterations + 1

Off0
cosCORDICOn

Number of iterations + 1

Off0
cos + jsinCORDICOn

Number of iterations + 1

Off0
sincosCORDICOn

Number of iterations + 1

Off0

HDL Block Properties

ConstrainedOutputPipeline

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.

InputPipeline

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.

OutputPipeline

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.

UsePipelinedKernel

Whether to use a pipelined implementation of the CORDIC algorithm in the generated code. The default is On.

SettingDescription
On (default)Use a pipelined implementation of the CORDIC algorithm. The pipelined implementation adds latency.
OffUse 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.

Restrictions

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.

Was this topic helpful?