收藏 分销(赏)

数据采集模块及简易存储示波器设计.doc

上传人:仙人****88 文档编号:8507282 上传时间:2025-02-16 格式:DOC 页数:4 大小:56KB
下载 相关 举报
数据采集模块及简易存储示波器设计.doc_第1页
第1页 / 共4页
数据采集模块及简易存储示波器设计.doc_第2页
第2页 / 共4页
点击查看更多>>
资源描述
RAM的VHDL设计 LIBRARY ieee; USE ieee.std_logic_1164.all; LIBRARY lpm; USE lpm.all; ENTITY ram8 IS PORT ( address : IN STD_LOGIC_VECTOR (8 DOWNTO 0); data : IN STD_LOGIC_VECTOR (7 DOWNTO 0); inclock : IN STD_LOGIC ; we : IN STD_LOGIC := '1'; q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0) ); END ram8; ARCHITECTURE SYN OF ram8 IS SIGNAL sub_wire0 : STD_LOGIC_VECTOR (7 DOWNTO 0); COMPONENT lpm_ram_dq GENERIC ( lpm_address_control : STRING; lpm_indata : STRING; lpm_outdata : STRING; lpm_type : STRING; lpm_width : NATURAL; lpm_widthad : NATURAL ); PORT ( address : IN STD_LOGIC_VECTOR (8 DOWNTO 0); inclock : IN STD_LOGIC ; q : OUT STD_LOGIC_VECTOR (7 DOWNTO 0); data : IN STD_LOGIC_VECTOR (7 DOWNTO 0); we : IN STD_LOGIC ); END COMPONENT; BEGIN q <= sub_wire0(7 DOWNTO 0); lpm_ram_dq_component : lpm_ram_dq GENERIC MAP ( lpm_address_control => "REGISTERED", lpm_indata => "REGISTERED", lpm_outdata => "UNREGISTERED", lpm_type => "LPM_RAM_DQ", lpm_width => 8, lpm_widthad => 9 ) PORT MAP ( address => address, inclock => inclock, data => data, we => we, q => sub_wire0 ); END SYN; 计数器VHDL设计: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity cont9b is port (clk,lock0,rst,we:in std_logic; dout:out std_logic_vector(8 downto 0); clkout:out std_logic); end cont9b; architecture behave of cont9b is signal cq1:std_logic_vector(8 downto 0); signal clk0:std_logic; begin clk0<=lock0 when we='1' else clk; process(clk0,rst) begin if rst='1' then cq1<="000000000"; elsif rising_edge(clk0) then cq1<=cq1+1; end if; end process; dout<=cq1; clkout<=clk0; end; ADC设计: library ieee; use ieee.std_logic_1164.all; entity x_adc0809 is port (d:in std_logic_vector(7 downto 0); clk,rst:in std_logic; eoc:in std_logic; ale:out std_logic; start,oe:out std_logic; adda,lock_t:out std_logic; q:out std_logic_vector(7 downto 0)); end entity x_adc0809; architecture behave of x_adc0809 is type states is (s0,s1,s2,s3,s4); signal cs,next_state:states:=s0; signal regl:std_logic_vector(7 downto 0); signal lock:std_logic; begin adda<='0';lock_t<=lock; com:process(cs,eoc) begin case cs is when s0 => ale<='0';start<='0';oe<='0';lock<='0';next_state<=s1; when s1 => ale<='1';start<='1';oe<='0';lock<='0';next_state<=s2; when s2 => ale<='0';start<='0';oe<='0';lock<='0'; if(eoc='1') then next_state<=s3; else next_state<=s2; end if; when s3=>ale<='0';start<='0';oe<='1';lock<='0';next_state<=s4; when s4=>ale<='0';start<='0';oe<='1';lock<='1';next_state<=s0; when others=>ale<='0';start<='0';oe<='0';lock<='0';next_state<=s0; end case; end process com; reg:process (clk,rst) begin if rst='1' then cs<=s0; elsif clk'event and clk='1' then cs<=next_state; end if; end process reg; latch1:process (lock) begin if lock='1' and lock'event then regl<=d; end if; end process latch1; q<=regl; end behave; 总体结构图设计:
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 教育专区 > 小学其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服