(DOC)用VHDL设计数字系统实例

(DOC)用VHDL设计数字系统实例

ID:41350579

大小:206.50 KB

页数:55页

时间:2019-08-22

(DOC)用VHDL设计数字系统实例_第1页
(DOC)用VHDL设计数字系统实例_第2页
(DOC)用VHDL设计数字系统实例_第3页
(DOC)用VHDL设计数字系统实例_第4页
(DOC)用VHDL设计数字系统实例_第5页
资源描述:

《(DOC)用VHDL设计数字系统实例》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、用VHDL设计数字系统实例  目            录       例1矩形波发生器2例2三角波发生器15例3数字频率计22例4数字钟32例5交通灯控制器43例6LED字符显示器52例7LED跑马灯55例8过河游戏59例9拔河游戏69例10键盘输入显示器82  1     附图1.1矩形波发生器总体框图  4.源程序及注释  (1)上层模块  library ieee;   use ieee.std_logic_1164.all;   2  use ieee.std_logic_signed.all;   use ieee

2、.std_logic_unsigned.all;      entity cheif is   port(clk_1m : in std_logic;  --时钟信号,1 MHz。   k1     : in std_logic;  --调节频率的开关信号。   k2     : in std_logic;  --调节占空比的开关信号。   k3     : in std_logic;  --换挡开关信号。   sel    : out std_logic_vector(5 downto 0);--数码管片选信号。   d  

3、    : out std_logic_vector(6 downto 0);--数码管的驱动信号。   f      : out std_logic_vector(7 downto 0)); --输出给DAC0832的8位数字信号。    end cheif ;      architecture aa of cheif is   signal mode_mid    : integer range 0 to 1;   signal clk_125_mid : std_logic;   signal s1          

4、: std_logic;   signal s2          : std_logic;   signal s3          : std_logic;   signal fs_mid      : std_logic;   signal statusf_mid : integer range 0 to 9;   signal statush_mid : integer range 0 to 8;      component keyin  --调用防抖动模块。   port(k       : in std_logi

5、c;   kout    : buffer std_logic;   clk_125 : in std_logic);   end component;      component fp  --调用分频及控制模块。   port(clk_1m  : in std_logic;   s1      : in std_logic;                                     s3      : in std_logic;    statusf : out integer range 0 to 9;  

6、 mode    : out integer range 0 to 1;   fs      : out std_logic );   end component;      component output  --调用信号输出模块。   port(fs      : in std_logic;   s2      : in std_logic;   statush : out integer range 0 to 8;      f    : out std_logic_vector(7 downto 0) );    3 

7、 end component;      component display  --调用分频及显示模块。   port(statusf : in integer range 0 to 9;    statush : in integer range 0 to 8;    mode    : in integer range 0 to 1;    clk_1m  : in std_logic;   clk_125 : out std_logic;    sel     : out std_logic_vector(5 downt

8、o 0);   d       : out std_logic_vector(6 downto 0) );   end component;   begin   u1 : keyin port map (k1,s1,clk_125_mid);     u2 : keyin p

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。