我用的芯片是TI的5409和ALTERA的EP1C6这款芯片,但是我传送数据总是不成功,我DSP的数据线是通过74LV16245连接到FPGA的I/O口的,地址译码用的是a0-a3,我有一个疑问,我DSP用的是20m晶振倍频过后得到的100m时钟,而FPGA直接用20m晶振的时钟(和DSP用一个晶振)。我用portFFF0 = 0x01;这样的CODE传送数据给FPGA,FPGA中代码如下:
if (RW='0' and IOSTRB='0') then
if (dat /=3) then
dat <= dat+1;
if (dat = 1) then
case LA is
when "0000" =>cmd_code <= D(7 downto 0);
when "0001" =>t_const <= conv_integer(D(13 downto 0));
when "0010" =>p_num <= conv_integer(D(8 downto 0));
when "0011" =>c_flag <= D(1 downto 0);
when "1000" =>f_vector(15 downto 0) <= D;
when "1001" =>f_vector(27 downto 16) <= D(11 downto 0);
f_cnum <= conv_integer(f_vector);
when "1010" =>s_vector(15 downto 0) <= D;
when "1011" =>s_vector(27 downto 16) <= D(11 downto 0);
s_cnum <= conv_integer(s_vector);
when others => NULL;
end case;
end if;
end if;
else
dat <= 0;
end if;
这样的语句,但是两个时钟不一样没有问题吗?
我的数据传送不过去啊,请问哪里有错?