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:
Tests mathematical function calls
Compares TMU-accelerated results against standard RTS library golden values
Measures execution cycles for each function call
Reports PASS/FAIL status for each test based on error tolerance
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:
Include
fastrts_tmu.hheader fileThis automatically replaces standard math functions with
_tmuvariants
External Connections
None required. This is a software-only computational example demonstrating TMU hardware acceleration.