这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » FPGA » arm与FPGA通信问题请教

共2条 1/1 1 跳转至

arm与FPGA通信问题请教

菜鸟
2007-12-04 11:32:36     打赏

arms3c2410直接通过数据地址总线连接到FPGA,FPGA相当于ARM的外存,对FPGA 读的过程中,数据总是有错,必须在两次读的过程中加一句,printk()并延迟几个百个时钟周期,才能减少数据的错误,但错误一直有,没法100%真确,arm向FPGA写没有什么问题,100%正确。有谁作过类似的课题吗?知道是什么原因,请教请教??

 process(nOE)
 begin
  if falling_edge(nOE) then
   if nGCS4 = '0' then
    DataOut <= ram(conv_integer(Addr));
   end if;
  end if;
 end process; 

 process(nOE,nGCS4)
 begin
  if nOE = '1' or nGCS4 = '1' then
   Data <= "ZZZZZZZZZZZZZZZZ";
  elsif nOE = '0' and nGCS4 = '0' then

   Data <= DataOut ;
  end if;
 end process;




关键词: 通信     问题     请教    

菜鸟
2007-12-10 20:06:12     打赏
2楼
process(HCLK)
 begin
  if rising_edge(HCLK) then

    DataOut <= ram(conv_integer(Addr));
    end if;
 end process; 

 process(nOE,nGCS4,DataOut)
 begin
  if nOE = '1' or nGCS4 = '1' then
   Data <= "ZZZZZZZZZZZZZZZZ";
  elsif nOE = '0' and nGCS4 = '0' then

   Data <= DataOut ;
  end if;
 end process;

改成这样就没问题了,HCLK为系统时钟,
但ram里面数据++1,就会有错,++2没有问题,是什么原因,请教??


共2条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]