22 lines
719 B
C
Raw Normal View History

2023-10-31 07:47:27 +01:00
#pragma once
#include <inttypes.h>
#include "test_function.h"
#include "../../software/signal_processing/system/float_word.h"
#define TEST_OK " [ OK ]"
#define TEST_FAIL " [ FAIL ]"
#define TEST_DONE "test done\n"
int device_test( test_function test, uint32_t binding, void * task, void * input_a, void * input_b, void * expected, float epsilon );
int assert_float_near( float expected, float value, float abs_err );
int assert_eq( uint32_t expected, uint32_t value );
void print_float_data_for_python( const float_word * data, uint32_t len );
void print_hex_data_for_python( const float_word * data, uint32_t len );
void print_results_for_python( uint32_t cycle_count, const float_word * data, uint32_t len );