⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello.c

📁 TI DSP TMS320DM642 用定时器测试函数执行时间
💻 C
字号:
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) DSP/BIOS 4.90.270 06-11-03 (barracuda-m10)" */
/***************************************************************************/
/*                                                                         */
/*     H E L L O . C                                                       */
/*                                                                         */
/*     Basic LOG event operation from main.                                */
/*                                                                         */
/***************************************************************************/

#include <std.h>

#include <log.h>
#include <stdio.h>
#include "hellocfg.h"


/*
 *  ======== main ========
 */
 int start_timer;
 int stop_timer;
 int curr_timer,curr_timer1;
 short curr[8][8];
 short curr1[8][8];
Void main()
{
    SetTimer();
    for(;;)
    {
	    
	    int i,j;
    
	    for(j=0 ; j<8 ; j++)
	    {
	    	for(i=0 ; i<8 ; i++)
	    	{
	    		curr[j][i]=(j<<3)+i+240;
	    	}
	 	}
//	 	start_timer=timer_start();
    	inv_transform_B8(curr);
//		stop_timer=timer_stop();
//		curr_timer = stop_timer - start_timer;
		/////////////////////////////////////////////////////////////
		for(j=0 ; j<8 ; j++)
	    {
	    	for(i=0 ; i<8 ; i++)
	    	{
	    		curr1[j][i]=(j<<3)+i+240;
	    	}
	 	}
//	 	start_timer=timer_start();
    	inv_transform_B8_1(curr1);
//		stop_timer=timer_stop();
//		curr_timer1 = stop_timer - start_timer;
		////////////////////////////////////////////////////////////
		for(j=0 ; j<8 ; j++)
	    {
	    	for(i=0 ; i<8 ; i++)
	    	{
	    		if(curr1[j][i] != curr[j][i])
	    		{
	    			fprintf(stdout,"j=%d,i=%d,curr=%d,curr1=%d \n",j,i,curr[j][i],curr1[j][i]);
	    		//	LOG_printf(&trace, "i=%d,j=%d,curr=%d,curr1=%d \n",i,j,curr[i][j],curr1[i][j]);
	    		} 
	    	}
	 	}
		
	}
		    LOG_printf(&trace, "hello world!");
    /* fall into DSP/BIOS idle loop */
    return;
}

⌨️ 快捷键说明

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