No.40309 作者:yang547 邮件:yang547@yahoo.com.cn ID:14435 登陆:3次 文章数:2篇 最后登陆IP:202.117.121.35 最后登陆:2003/8/24 22:41:05 注册:2003/8/18 14:47:46 财富:108 发帖时间:2003/8/18 14:55:50 发贴者IP:61.150.43.67 标题:yang547:虚心求教:用 FPGA 做高速 AD 转换时突然终止?? 摘要:No.40309虚心求教:用 FPGA 做高速 AD 转换时突然终止?? 向各位大侠紧急求救! 打算让 fpga 接受到 start 信号后控制 adc 一次完成 2K 个数据的采集并送入双口 ram ,但有时会中途停止,不知道是不是程序上的问题?希望高手不吝赐教!(副VHDL程序) library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity ad_vhd_final1 is port(reset : in std_logic; start : in std_logic; clk : in std_logic; data_in : in std_logic_vector(7 downto 0); data_out: out std_logic_vector(7 downto 0); addr : out std_logic_vector(10 downto 0); flag : out std_logic; encode_out : out std_logic; ce : out std_logic; we : out std_logic; oe : out std_logic); end ad_vhd_final1; architecture a of ad_vhd_final1 is signal encode : std_logic; signal data : std_logic_vector(7 downto 0); signal count: std_logic_vector(10 downto 0); type states is (s0,s1,s2,s3); signal state : states; begin encode_out <= encode; data_out <= data; addr <= count; ----------------------------------- ad ouput data latch ---------------------------------- process(reset,encode) begin if reset='1' then data <= "00000000"; elsif encode'event and encode='0' then data <= data_in; end if; end process; ---------- ......
>>返回讨论的主题
|