test_conv_cdma2000_1by3_9.c

来自「ADSP-BLACKFIN533 平台上实现卷积编码」· C语言 代码 · 共 54 行

C
54
字号
/*******************************************************************************
Copyright(c) 2000 - 2002 Analog Devices. All Rights Reserved.
Developed by Joint Development Software Application Team, IPDC, Bangalore, India
for Blackfin DSPs  ( Micro Signal Architecture 1.0 specification).

By using this module you agree to the terms of the Analog Devices License
Agreement for DSP Software. 
********************************************************************************
File Name      : test_conv_cdma2000_1by3_9.c
Description    : This file contains the testing routine for
                 conv_cdma2000_1by3_9()
*******************************************************************************/
#include <stdio.h>
#include "tconv_cdma2000_1by3_9.h"

int error_flag = 0;
void (*f1)();
int cycle_count[10];
void _conv_cdma2000_1by3_9();

main()
{
    int m, i, a, error;

    f1 = _conv_cdma2000_1by3_9;

// Test Case : 1 

    a = 32;

    cycle_count[0] = Compute_Cycle_Count(d, output, a);
                        //This function inturn calls conv_cdma2000_1by3_9()

        for(i = 0; i < a; ++i)
        {
            error = (output[i] - exout[i]);
            if(error < 0)
                error = -error;
            if(error > MAX_PERMISSIBLE_ERROR)
                error_flag = error_flag | 1;
        } 
    #ifdef PRINTF_SUPPORT
        if(error_flag & 1)
            printf("Test Case 1 failed\n");
        else
            printf("Test Case 1 passed\n");
    #endif
   
    printf("cycle_count[0]=%d\n",cycle_count[0]);
     
 
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?