EDA设计参考程序完整版,合计31题剖析
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);
您可能关注的文档
最近下载
- 2023版马原马克思主义基本原理(2023年版)ppt全套教学课件.ppt
- 2024-2030年中国飞机机库行业市场发展趋势与前景展望战略分析报告.docx
- 泉州市正骨医院招聘真题2024.docx VIP
- GB51101-2016 太阳能发电站支架基础技术规范.pdf VIP
- 泉州市正骨医院招聘试题及解析.pdf VIP
- 泉州正骨医院护士面试题目.pdf VIP
- 民间谱牒历史价值对清水江下游天柱县考察.pdf VIP
- 《电气工程制图》教案第一章资料.ppt VIP
- 2025年广东广州市高三二模高考数学试题卷(含答案详解).pdf
- 家庭劳动我来做个性房间我装扮小学六年级综合实践课件.pptx VIP
原创力文档

文档评论(0)