main.c

来自「ADI-BF533 DSP cache的配置代码」· C语言 代码 · 共 59 行

C
59
字号
/************************************************************/
/*	This code demonstrate VDSP++ compiler support for the 	*/
/*	BF instruction and Data Cache							*/
/*															*/
/*	The cplbtab533.s is the default CPLB configuration file */
/*	available with VDSP++ installation. We have included	*/
/*	this file in the project. Any changes done to the 		*/
/*	CPLB configuratin in this file, will reflect in the 	*/
/*	application												*/
/*															*/
/*							Initial Version					*/
/*							Kunal Singh						*/
/*							DSP applications, ADI			*/					
/*							Dated 7 June, 2005				*/
/*															*/
/************************************************************/

#include<cdefbf533.h>
#include <stdio.h>
#include <string.h>

#include <cplb.h>

#define __IMG__ 
#ifdef __IMG__
	//图像解码参数入口
	extern int 	iProcImgMain(void);
	extern void vIniParam(unsigned char* g_mem0);
#endif 
 
#pragma retain_name 
int __cplb_ctrl = 
	CPLB_ENABLE_ICPLBS|
    CPLB_ENABLE_ICACHE|
    CPLB_ENABLE_DCPLBS|
    CPLB_ENABLE_DCACHE|
    CPLB_ENABLE_DCACHE2; 
    
/*****************/
/* main function */
/*****************/    
void main()
{
	int i;
	unsigned char pSDRAM[640*480];
	
	
	
	//memset(pSDRAM, 0, sizeof(pSDRAM));
	sprintf(pSDRAM, "\n111\n");
	printf("%s",pSDRAM);
	printf("\nTest start\n");
	
#ifdef __IMG__
	vIniParam((unsigned char *)pSDRAM);
	i = iProcImgMain();
#endif
}

⌨️ 快捷键说明

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