AM64x MCU+ SDK  10.00.00

Introduction

This module contains APIs for TMU operations.

Functions

static float ti_tmu_sin_pu (float anglePU)
 Computes the trigonometric sine value of the input angle using TMU. More...
 
static float ti_tmu_cos_pu (float anglePU)
 Computes the trigonometric cosine value of the input angle using TMU. More...
 
static float ti_tmu_atan_pu (float x)
 Computes the trigonometric atan value of the input using TMU. More...
 
static float ti_tmu_log_pu (float x)
 Computes the logarithmic value of the input using TMU. More...
 
static float ti_tmu_log_e_pu (float x)
 Computes the logarithmic value to the base e of the input using TMU. More...
 
static float ti_tmu_iexp_pu (float x)
 Computes the inverse exponential value of the input using TMU. More...
 
static float ti_tmu_iexp_e_pu (float x)
 Computes the inverse exponential value to the base e of the input using TMU. More...
 
static float ti_tmu_sin (float angleRad)
 Computes the trigonometric sine value of the input angle using TMU. More...
 
static float ti_tmu_cos (float angleRad)
 Computes the trigonometric cosine value of the input angle using TMU. More...
 
static float ti_tmu_atan (float x)
 Computes the trigonometric atan value of the input angle using TMU. More...
 
static float ti_tmu_atan2 (float x, float y)
 Computes the trigonometric atan2 value of the input values using TMU. Uses the quadratic built in TMU function to comput the ratio and quadrant value, which is then used to comput atan2 value of input. More...
 
static void ti_tmu_sincos_pu (float anglePU, float *sin_val, float *cos_val)
 Computes the trigonometric sine and cosine value of the input using TMU. More...
 
static void ti_tmu_sincos (float angleRad, float *sin_val, float *cos_val)
 Computes the trigonometric sine and cosine value of the input using TMU. More...
 
static float ti_tmu_powf (float x, float y)
 Computes the power of the input value. More...
 

Macros

#define ReciprocalOf2PI   0.159154943091895335768f
 
#define TwoPI   6.283185307F
 
#define Log2ofe   1.44269F
 
#define OnebyLog2ofe   0.693147F
 
#define ISR_TMU_CONTEXT_SAVE   HW_WR_REG32((CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_SAVE), HW_RD_REG32(CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_SAVE)| (1));
 
#define ISR_TMU_CONTEXT_RESTORE   HW_WR_REG32((CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_RESTORE), HW_RD_REG32(CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_RESTORE)| (1));
 

Macro Definition Documentation

◆ ReciprocalOf2PI

#define ReciprocalOf2PI   0.159154943091895335768f

◆ TwoPI

#define TwoPI   6.283185307F

◆ Log2ofe

#define Log2ofe   1.44269F

◆ OnebyLog2ofe

#define OnebyLog2ofe   0.693147F

◆ ISR_TMU_CONTEXT_SAVE

#define ISR_TMU_CONTEXT_SAVE   HW_WR_REG32((CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_SAVE), HW_RD_REG32(CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_SAVE)| (1));

◆ ISR_TMU_CONTEXT_RESTORE

#define ISR_TMU_CONTEXT_RESTORE   HW_WR_REG32((CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_RESTORE), HW_RD_REG32(CSL_MSS_TMU_BASE + CSL_TMU_CONTEXT_RESTORE)| (1));

Function Documentation

◆ ti_tmu_sin_pu()

static float ti_tmu_sin_pu ( float  anglePU)
inlinestatic

Computes the trigonometric sine value of the input angle using TMU.

Parameters
[in]anglePU- input angle in per unit within [-1.0f, +1.0f]
Returns
Computed sine value
Note
Usage Considerations: Valid input is limited to values between -1.0f to +1.0f. No error checking is performed on input.

◆ ti_tmu_cos_pu()

static float ti_tmu_cos_pu ( float  anglePU)
inlinestatic

Computes the trigonometric cosine value of the input angle using TMU.

Parameters
[in]anglePU- input angle in per unit within [-1.0f, +1.0f]
Returns
Computed cosine value
Note
Usage Considerations: Valid input is limited to values between -1.0f to +1.0f. No error checking is performed on input.

◆ ti_tmu_atan_pu()

static float ti_tmu_atan_pu ( float  x)
inlinestatic

Computes the trigonometric atan value of the input using TMU.

Parameters
[in]x- input value from -1.0f to 1.0f
Returns
Computed atan value −0.125f to +0.125f (the value whose tan is x)
Note
Usage Considerations: Valid input is limited to values between -1.0f to 1.0f. No error checking is performed on input.

◆ ti_tmu_log_pu()

static float ti_tmu_log_pu ( float  x)
inlinestatic

Computes the logarithmic value of the input using TMU.

Parameters
[in]x- input value in float
Returns
Computed log value (base of 2)
Note
Usage Considerations: Valid input is limited to values between negative infinity to positive infinity. No error checking is performed on input.

◆ ti_tmu_log_e_pu()

static float ti_tmu_log_e_pu ( float  x)
inlinestatic

Computes the logarithmic value to the base e of the input using TMU.

Parameters
[in]x- input value in float
Returns
Computed log value (base of e)
Note
Usage Considerations: Valid input is limited to values between negative infinity to positive infinity. No error checking is performed on input.

◆ ti_tmu_iexp_pu()

static float ti_tmu_iexp_pu ( float  x)
inlinestatic

Computes the inverse exponential value of the input using TMU.

Parameters
[in]x- input value in float
Returns
Computed exponential value (base of 2)
Note
Usage Considerations: No error checking is performed on input.

◆ ti_tmu_iexp_e_pu()

static float ti_tmu_iexp_e_pu ( float  x)
inlinestatic

Computes the inverse exponential value to the base e of the input using TMU.

Parameters
[in]x- input value in float
Returns
Computed exponential value (base of e)
Note
Usage Considerations: No error checking is performed on input.

◆ ti_tmu_sin()

static float ti_tmu_sin ( float  angleRad)
inlinestatic

Computes the trigonometric sine value of the input angle using TMU.

Parameters
[in]angleRad- input angle in radians within [-2PI, +2PI]
Returns
Computed sine value
Note
Usage Considerations: Valid input is limited to values between -2PI to 2PI. The input is multiplied with 1/2PI to convert it to per unit value for using TMU. No error checking is performed on input.

◆ ti_tmu_cos()

static float ti_tmu_cos ( float  angleRad)
inlinestatic

Computes the trigonometric cosine value of the input angle using TMU.

Parameters
[in]angleRad- input angle in radians within [-2PI, +2PI]
Returns
Computed cosine value
Note
Usage Considerations: Valid input is limited to values between -2PI to 2PI. The input is multiplied with 1/2PI to convert it to per unit value for using TMU. No error checking is performed on input.

◆ ti_tmu_atan()

static float ti_tmu_atan ( float  x)
inlinestatic

Computes the trigonometric atan value of the input angle using TMU.

Parameters
[in]x- input value from -1.0f to 1.0f
Returns
Computed atan value
Note
Usage Considerations: Valid input is limited to values between -1.0f to 1.0f. The computed output value is multiplied with 2PI to change it to radians. No error checking is performed on input.

◆ ti_tmu_atan2()

static float ti_tmu_atan2 ( float  x,
float  y 
)
inlinestatic

Computes the trigonometric atan2 value of the input values using TMU. Uses the quadratic built in TMU function to comput the ratio and quadrant value, which is then used to comput atan2 value of input.

Parameters
[in]x- input value within the domain of arctangent
[in]y- input value within the domain of arctangent
Returns
Computed atan2 value
Note
Usage Considerations: No error checking is performed on input.

◆ ti_tmu_sincos_pu()

static void ti_tmu_sincos_pu ( float  anglePU,
float *  sin_val,
float *  cos_val 
)
inlinestatic

Computes the trigonometric sine and cosine value of the input using TMU.

Parameters
[in]anglePU- input angle in per unit within [-1.0f, +1.0f]
[in]sin_val- input value storing the value of sin after sincos operations
[in]cos_val- input value storing the value of cos after sincos operations
Note
Usage Considerations: No error checking is performed on input.

◆ ti_tmu_sincos()

static void ti_tmu_sincos ( float  angleRad,
float *  sin_val,
float *  cos_val 
)
inlinestatic

Computes the trigonometric sine and cosine value of the input using TMU.

Parameters
[in]angleRad- input angle in radians within [-2PI, +2PI]
[in]sin_val- input value storing the value of sin after sincos operations
[in]cos_val- input value storing the value of cos after sincos operations
Note
Usage Considerations: No error checking is performed on input.

◆ ti_tmu_powf()

static float ti_tmu_powf ( float  x,
float  y 
)
inlinestatic

Computes the power of the input value.

Parameters
[in]x- input value which is base of power function
[in]y- input value that needs to be raised
Returns
Computed power value
Note
Usage Considerations: No error checking is performed on input.