FastRTS Example

Overview

This example demonstrates the use of the FastRTS (Run-Time Support) library, which provides hardware-accelerated mathematical functions using the Trigonometric Math Unit (TMU) available on the device. The FastRTS library offers significant performance improvements over standard software-based math libraries for:

  • Control system algorithms

  • Signal processing applications

  • Real-time calculations

  • Motor control

  • Power electronics

  • Scientific computing

What the Example Does

The example:

  1. Tests mathematical function calls

  2. Compares TMU-accelerated results against standard RTS library golden values

  3. Measures execution cycles for each function call

  4. Reports PASS/FAIL status for each test based on error tolerance

  5. Provides a summary of total tests passed vs. expected

Limitations

Certain expf test cases are expected to exceed the error threshold due to TMU hardware accuracy limitations for certain input values. This is a known limitation and does not indicate a failure of the example.

Usage Notes

Error Tolerance

Tests use an absolute error tolerance to account for:

  • Floating-point rounding differences

  • TMU approximation methods

  • Hardware implementation variations

Customization

You can modify the example to:

  • Add more test cases for each function

  • Test different input ranges

  • Adjust error tolerance thresholds

  • Benchmark performance against software implementations

  • Add other mathematical functions if supported by TMU

Integration into Applications

To use FastRTS in your application:

  1. Include fastrts_tmu.h header file

  2. This automatically replaces standard math functions with _tmu variants

External Connections

None required. This is a software-only computational example demonstrating TMU hardware acceleration.