|
3-phase PV router
|
Assembly-optimized multiplication functions for AVR microcontrollers. More...


Go to the source code of this file.
Functions | |
| constexpr uint8_t | float_to_q8 (float frac) |
| Convert floating-point fraction to Q8 format. | |
| template<typename V, typename F> | |
| static void | mult16x8_q8 (int16_t &result, V value, F fraction) |
| Optimized 16×8→16 signed multiplication with Q8 fractional. | |
| template<typename A, typename B> | |
| static void | multS16x16_to32 (int32_t &result, A a, B b) |
| Optimized 16×16→32 signed multiplication with assembly. | |
| template<typename A, typename B> | |
| static void | multU16x16_to32 (uint32_t &result, A a, B b) |
| Optimized 16×16→32 unsigned multiplication with assembly. | |
| template<typename A, typename B> | |
| static void | multU24x16_to32_hi8 (uint32_t &result, A a, B b) |
| Optimized 24×16→40 unsigned multiplication, returning bits 8..39. | |
| constexpr float | q8_to_float (uint8_t q8_val) |
| Convert Q8 format back to floating-point. | |
Assembly-optimized multiplication functions for AVR microcontrollers.
This file contains highly optimized assembly multiplication functions for time-critical operations on AVR microcontrollers. These functions eliminate the overhead of GCC's library calls for 16/32-bit multiplications.
Based on:
Definition in file mult_asm.h.
|
constexpr |
Convert floating-point fraction to Q8 format.
Helper function to convert a floating-point fraction (0.0 to 1.0) to the Q8 format used by mult16x8_q8().
| frac | Floating-point fraction (0.0 to 1.0) |
Definition at line 239 of file mult_asm.h.

|
constexpr |
Convert Q8 format back to floating-point.
Helper function to convert Q8 format back to floating-point for debugging and testing purposes.
| q8_val | Q8 format value (0 to 255) |
Definition at line 255 of file mult_asm.h.
