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

📄 dec643.h

📁 基于dm643的Fir 滤波器的设计
💻 H
字号:
/************************************************************
  Copyright (C), 2007 by SEED Electronic Technology LTD.
  FileName: DEC643.h
  Author:  Ya.X      Version : V1.0         Date:2007-09-20
  Description:   DEC643头文件,包含DEC643初始化函数以及FPGA访问等函数  
*************************************************************/

#ifndef DEC643_
#define DEC643_

#ifdef __cplusplus
extern "C" {
#endif

#include <csl.h>
#include <csl_i2c.h>
#include <csl_gpio.h>

/*
 *  Note:  Bit definitions for each register field
 *         needs to be supplied here for the CPLD
 *	       and other board periperals.
 */

/* Compatability definitions */
#define NULL                 0

/* CPLD address definitions */
#define DEC643_CPLD_BASE       	0xA0000000
#define DEC643_SDRAM_BASE  		0x80000000
#define DEC643_SYNC_BASE        0xb0000000
#define DEC643_FPGAFLASH_BASE   0x90040000
#define DEC643_FPGASDRAM_BASE   0x80000000

/* FPGA address definitions */
#define DEC643_FPGA_BASE       0x90080000

/* FPGA Register Indices */
#define DEC643_OSDCTRL      0x10
#define DEC643_THRESHLSB    0x11
#define DEC643_THRESHMSB    0x12
#define DEC643_ISR          0x13
#define DEC643_IER          0x14
#define DEC643_GPIODIR      0x15
#define DEC643_GPIOSTAT     0x16
#define DEC643_LED          0x17
#define DEC643_FLASHPAGE    0x18
#define DEC643_REVISION     0x1F

/* FPGA definitions */
#define DEC643_FPGALEN      0x393d8

/* CPLD Register Indices */
#define DEC643_CTL_REG    	   0x00 
#define DEC643_UARTCTL_REG     0x01
#define DEC643_INTSTAT_REG	   0x02
#define DEC643_STAT_REG		   0x03
#define DEC643_FLASH_REG       0x04
#define DEC643_WDOG_REG        0x05

/* I2C handle */
extern I2C_Handle DEC643_I2C_hI2C;

/* GPIO handle */
extern GPIO_Handle DEC643_GPIO_hGPIO;

/* Initialize all board APIs */
void DEC643_init();

/* Read an 8-bit value from a CPLD register */
Uint8 DEC643_rget(Int16 regnum);

/* Write an 8-bit value to a CPLD register */
void DEC643_rset(Int16 regnum, Uint8 regval);

/* Read an 8-bit value from a FPGA register */
Uint8 DEC643_fpga_rget(Int16 regnum);

/* Write an 8-bit value to a FPGA register */
void DEC643__fpga_rset(Int16 regnum, Uint8 regval);

/* Spin in a delay loop for delay iterations */
void DEC643_wait(Uint32 delay);

/* Spin in a delay loop for delay microseconds */
void DEC643_waitusec(Uint32 delay);

/* Send a configuration file to the FPGA */
void DEC643_fpgaLoad(Uint32 fpgaaddr);

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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