test_bpsk.c

来自「adsp blackfin系列的通信QAM编码标准程序」· 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_bpsk.c
Description    : This modules tests the functionality of _bpsk() routine
*******************************************************************************/
#include <stdio.h>
#include "tbpsk.h"

void _bpsk(int n, char in[], char out[]);

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

void main(int argc, char *argv[])
{
    int i, j, n, k = 0;
    
    f1 = _bpsk;

//Test Case : 1
    
    n = 4;

    cycle_count[0] = Compute_Cycle_Count(n, in, out);
                            //This function inturn calls bpsk()

    for( i =0 ; i <n ; i++)
        for( j =0 ; j <8 ; j++)
        {
            if(out[k]!=out_exp[k])
            {
                error_flag = error_flag | 1;
            }
            k++;
        }
    #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 + -
显示快捷键?