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

📄 memdmainit.asm

📁 ADI公司BF533读取SDRAM数据
💻 ASM
字号:
/*****************************************************************************
**																			**
**	 Name: 	MemDMA_descriptor.dpj							        			**	
**																			**
******************************************************************************

(C) Copyright 2003 - Analog Devices, Inc.  All rights reserved.

File Name:		memdmainit.asm

Date Modified:	3/5/03		RG		Rev 1.0

Software:       VisualDSP++3.1

Hardware:		ADSP-BF533 EZ-KIT Board

Special Connections:  None

Purpose:		To demonstrate various memDMA descriptor examples
				including 1D to 1D, 1D to 2D, and 2D to 2D
				
Program Parameters:

******************************************************************************/


#include "defBF533.h"



/***************************************************************

	MemDma initialization routine
	
	This routine sets up the descriptor list framework
	for a memDMA transfer up to NUM_DESCR_BLOCKS_IN_QUEUE descriptors
	
	A source and destination buffer is set up because memDMA is being used		

***************************************************************/

#include "memdma.h"


.section L1_data_a;
.align 4;

//DMA Descriptor  - Small Model
//1 32B Word: LS16BW: Next Descr Pointer, MS16BW: Start Addr Low
//2 32B Word: LS16BW:Start Addr High , MS16BW:DMA config
//3 32B Word: LS16BW:XCNT, MS16BW:XMOD
//4 32B Word: LS16BW:YCNT, MS16BW:YMOD


.global MemDMAQueue;
MemDMAQueue:
.byte4 _MemDMAQueue[4 * 2 * NUM_DESCR_BLOCKS_IN_QUEUE]; // 8 32 bit words * NUM_DESCR_IN_QUEUE
MemDMAQueue.end:

.section L1_code;
.align 4;

//dummy_start:

.global memdma_init;
memdma_init:

// This routine sets up a descriptor framework
// Each descriptor is filled in from calls within main.asm 
		
	p1.h = MemDMAQueue;
	p1.l = MemDMAQueue;
	p2 = 16(z);
	r0 = p1;
	r1 = p1;
	r0 += 16;				 
	
	p0 = ((NUM_DESCR_BLOCKS_IN_QUEUE - 1) * 2);
	lsetup (start_memdmaqueueinit, end_memdmaqueueinit) lc0 = p0;

start_memdmaqueueinit:
		r0 += 16;
end_memdmaqueueinit:
		w[p1 ++ p2] = r0.l;

//Last Descriptor in the Queue points to the first one
	w[p1 ++ p2] = r1.l;
	r1 += 16;
	[p1] = r1;

	
	rts;
memdma_init.end:	


⌨️ 快捷键说明

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