求DSP 6747与FPGA用EMIF 通信例程

求DSP 6747与FPGA用EMIF 通信例程,第1张

供参考

Code Segment

The following code segment sets up the EMIF as described above using the

TMS320C6000 Peripheral Runtime Support Control Library.

#include <emif.h>

.

. /*OTHER USER CODE*/

.

/* Get default values for all EMIF registers */

unsigned int g_ctrl = GET_REG(EMIF_GCTRL)

unsigned int ce0_ctrl = GET_REG(EMIF_CE0_CTRL)

unsigned int ce1_ctrl = GET_REG(EMIF_CE1_CTRL)

unsigned int ce2_ctrl = GET_REG(EMIF_CE2_CTRL)

unsigned int ce3_ctrl = GET_REG(EMIF_CE3_CTRL)

unsigned int sdram_ctrl = GET_REG(EMIF_SDRAM_CTRL)

unsigned int sdram_ref = GET_REG(EMIF_SDRAM_REF)

/* Set Global Control - Enable CLKOUT2,SDCLK, and SSCLK*/

/*- Disable CLKOUT1 */

/* - Set for ½x SBSRAM interface */

RESET_BIT(&g_ctrl, SSCRT)

SET_BIT(&g_ctrl, CLK2EN)

RESET_BIT(&g_ctrl, CLK1EN)

SET_BIT(&g_ctrl, SSCEN)

SET_BIT(&g_ctrl, SDCEN)

/* Configure CE2 as SBSRAM */

LOAD_FIELD(&ce2_ctrl ,MTYPE_32SBSRAM, MTYPE , MTYPE_SZ )

/* Store EMIF Control Registers */

emif_init(g_ctrl, ce0_ctrl, ce1_ctrl, ce2_ctrl, ce3_ctrl,

sdram_ctrl, sdram_ref)

.

. /*OTHER USER CODE*/

.

不行。EMIF接口固定DSP为主设备,也就是说,FPGA在EMIF接口上只能作为从设备。只能主设备主动发起对从设备的访问,反过来是不行的。

如果想FPGA能主动访问DSP,可以使用DSP的HPI口。在HPI接口上,DSP是从设备。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12001789.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存