- 7
- 0
- 约3.91万字
- 约 43页
- 2016-07-21 发布于湖北
- 举报
1、设计一个带计数使能、异步复位、带进位输出的减1三位二进制计数器,结果由共阴极七段数码管显示。
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity counter is
port(clk,en,clr:in std_logic;
ledout:out std_logic_vector(6 downto 0);
co:out std_logic);
end counter;
architecture a of counter is
signal cnt:std_logic_vector(2 downto 0);
signal hex:std_logic_vector(2 downto 0);
begin
process(clk)
begin
if clr=1then
cnt=(others=0);
elsif(clkevent and clk=1)then
if en=1then
if cnt=000then
cnt=111;
co=1;
else
cnt=cnt-1;
co=0;
end if;
end if;
end if;
end process;
hex=cnt(2 downto 0);
您可能关注的文档
最近下载
- 核电子技术原理 王芝英 着 原子能出版社 部分课后答案.pdf VIP
- 2025年十堰 市中考生物、地理合卷试卷真题(含答案解析).docx
- 数学建模基础智慧树知到期末考试答案章节答案2024年吉林财经大学.docx VIP
- 2026中国生物质能源开发利用现状及政策导向报告.docx
- 政府机关保洁服务人员管理及培训方案.docx VIP
- 乒乓球培训教材.pdf VIP
- 子宫输卵管超声造影.ppt VIP
- 给水排水工程钢筋混凝土水池结构设计规程 CECS 138:2002.pdf VIP
- (正式版)XJJ 110-2019 《现浇混凝土复合外保温模板应用技术标准》.pdf VIP
- 2024年河北高考数学真题及答案.pdf VIP
原创力文档

文档评论(0)