首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

BF518F的EBIU与FPGA接口问题

BF518F的EBIU与FPGA接口问题

自己画的BF518F的板子,通过EBIU以异步存储访问FPGA内部自己设计的256字节双口RAM,接口信号用了下面的信号线:
A[19:1],D[15:0],AMS[3-0],ABE[1:0],ARE,AWE,
其中数据线D[15:0]采用245驱动,AMS[3-0],ARE,AWE均有上拉电阻。
写了个测试程序
/*******************************************************************
*  global variables and defines
*******************************************************************/
#define pDebugLed  (volatile unsigned short *)0x20000000
//#define START_ADDR   0xFF800000 /* start address on EZ-Board */
/*******************************************************************
*   Function:    Init_EBIU
*   Description: This function initializes EBIU interface.
*******************************************************************/
void Init_EBIU(void);
int main( void )
{
int i;
int DelayValue=5000000;
/* Begin adding your custom code here */
Init_EBIU();
while(1)
{
      *pDebugLed = 0x0000;
        for(i=0;i<DelayValue;i++);
  
        *pDebugLed = 0xffff;
        for(i=0;i<DelayValue;i++);
}
}
/*******************************************************************
*   Function:    Init_EBIU
*   Description: This function initializes EBIU interface.
*******************************************************************/
void Init_EBIU(void)
{
/* sets wait states for EBIU interface */
*pEBIU_AMBCTL0 = 0xFFFEFFFE;
*pEBIU_AMBCTL1 = 0xFFFEFFFE;
ssync();
/* enable all banks 0 */
*pEBIU_AMGCTL = 0x00F2;
ssync();

/* PG11 - AMS2, PG15 - AMS3 */
/* setup mux bits */
short portg_mux = *pPORTG_MUX; /* bits [15:14] = 10 for AMS3
            bits [13:12] = 01 for AMS2 */
portg_mux |= 0x9000;   /* set bits 15, 12 */
portg_mux &= 0x9fff;   /* clear bits 14, 13 */
*pPORTG_MUX = portg_mux;  /* write it back */
*pPORTG_FER |= (PG15 | PG11); /* enable peripheral function */
}
调试运行时,每次执行到对双口RAM写操作时( *pDebugLed = 0x0000;),提示如下错误:
Target halted due to software breakpoint but no breakpoint found at address: 0xef00067e
Possible reasons are:
1.An embedded breakpoint (EMUEXCPT instruction) in the code
2.A breakpoint is placed at the last instruction of a do() loop
Error reading opcode for breakpoint at address:
然后程序跑飞了,调了好长时间找不到问题所在,求高手指点。


自己怀疑是不是可能跟下面因素有关:
(1)LDF文件中,异步存储器的四个BANK均已映射,显示unused,是否执行时内核认为访问了不存在的存储器地址,导致EBIU检测到错误,然后强制定位到可用的存储器地址或者强制DSP软复位,从而出现上述问题?
(2)信号完整性原因?外部晶振25MHz,VCO跑400MHz,CCLK跑80MHz,SCLK跑20MHz,用带宽1.5GHz示波器查AMS0低电平时间约为80ns,ARE的低电平几乎看不到,只有类似干扰的小扰动。数据线在AMS0为高电平期间把245关断置高阻,应该不会引起冲突吧?
求指点。
返回列表