3-phase PV router
Loading...
Searching...
No Matches
test_main.cpp File Reference

Performance benchmarks for assembly multiplication functions. More...

#include <Arduino.h>
#include <unity.h>
#include "../bench_report.h"
#include "../bench_timer.h"
#include "../halt_after_tests.h"
#include "mult_asm.h"
Include dependency graph for test_main.cpp:

Go to the source code of this file.

Functions

void loop ()
 
void setUp (void)
 
void setup ()
 
void tearDown (void)
 
void test_performance_isr_simulation (void)
 ISR-like performance test simulating real-world usage.
 
void test_performance_mult16x8_q8 (void)
 Performance comparison for Q8 fractional multiplication.
 
void test_performance_multS16x16_to32 (void)
 Performance comparison between assembly and standard multiplication.
 
void test_performance_multU16x16_to32 (void)
 Performance comparison for unsigned multiplication (multU16x16_to32)
 

Variables

uint8_t i = 0
 
uint8_t max_blinks = 1
 

Detailed Description

Performance benchmarks for assembly multiplication functions.

Version
0.1
Date
2026-11-24

This file contains performance benchmarks for the assembly-optimized multiplication functions. They run in CI in the simavr simulator (uno_sim environment), which is cycle-accurate: the timings are exact and the same from run to run. Every result is also printed as a BENCH line (bench_report.h).

Based on:

  • florentbr's optimization suggestions for PVRouter
  • avrfreertos multiplication optimizations by feilipu
  • OpenMusicLabs AVR assembly techniques

Definition in file test_main.cpp.

Function Documentation

◆ loop()

void loop ( )

Definition at line 488 of file test_main.cpp.

Here is the call graph for this function:

◆ setUp()

void setUp ( void )

Definition at line 28 of file test_main.cpp.

◆ setup()

void setup ( )

Definition at line 479 of file test_main.cpp.

◆ tearDown()

void tearDown ( void )

Definition at line 33 of file test_main.cpp.

◆ test_performance_isr_simulation()

void test_performance_isr_simulation ( void )

ISR-like performance test simulating real-world usage.

Definition at line 352 of file test_main.cpp.

Here is the call graph for this function:

◆ test_performance_mult16x8_q8()

void test_performance_mult16x8_q8 ( void )

Performance comparison for Q8 fractional multiplication.

Definition at line 247 of file test_main.cpp.

Here is the call graph for this function:

◆ test_performance_multS16x16_to32()

void test_performance_multS16x16_to32 ( void )

Performance comparison between assembly and standard multiplication.

Definition at line 41 of file test_main.cpp.

Here is the call graph for this function:

◆ test_performance_multU16x16_to32()

void test_performance_multU16x16_to32 ( void )

Performance comparison for unsigned multiplication (multU16x16_to32)

Definition at line 144 of file test_main.cpp.

Here is the call graph for this function:

Variable Documentation

◆ i

uint8_t i = 0

Definition at line 485 of file test_main.cpp.

◆ max_blinks

uint8_t max_blinks = 1

Definition at line 486 of file test_main.cpp.