Subversion Repositories canSerial

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mjames 1
#ifndef _CONTROLLER_TEMPLATES_H_
2
#define _CONTROLLER_TEMPLATES_H_
3
 
4
/*--------------------------------------------------------------------------------*/
5
/* Includes */
6
/*--------------------------------------------------------------------------------*/
7
 
8
#include "test_templates.h"
9
#include <string.h>             /* memcpy() */
10
 
11
/*--------------------------------------------------------------------------------*/
12
/* Group Specific Templates */
13
/*--------------------------------------------------------------------------------*/
14
 
15
/**
16
 * Comparison SNR thresholds for the data types used in transform_tests.
17
 */
18
#define CONTROLLER_SNR_THRESHOLD_float32_t 110
19
#define CONTROLLER_SNR_THRESHOLD_q31_t     100
20
#define CONTROLLER_SNR_THRESHOLD_q15_t     45
21
 
22
/**
23
 *  Compare the outputs from the function under test and the reference
24
 *  function using SNR.
25
 */
26
#define CONTROLLER_SNR_COMPARE_INTERFACE(block_size,    \
27
                                         output_type)   \
28
    do                                                  \
29
    {                                                   \
30
        TEST_CONVERT_AND_ASSERT_SNR(                    \
31
            controller_output_f32_ref,                  \
32
            (output_type *) controller_output_ref,      \
33
            controller_output_f32_fut,                  \
34
            (output_type *) controller_output_fut,      \
35
            block_size,                                 \
36
            output_type,                                \
37
            CONTROLLER_SNR_THRESHOLD_##output_type      \
38
            );                                          \
39
    } while (0)
40
 
41
 
42
/*--------------------------------------------------------------------------------*/
43
/* TEST Templates */
44
/*--------------------------------------------------------------------------------*/
45
 
46
#endif /* _CONTROLLER_TEMPLATES_H_ */