- 31
- 0
- 约3.44千字
- 约 25页
- 2021-10-12 发布于广东
- 举报
电子时钟设计;设计要求;系统组成 ;系统组成方框图 ;1. 10进制可预置计数器模块;2. 6进制可预置计数器模块;24进制可预置计数器模块;4. 译码显示模块;电子时钟设计与仿真 ;10进制计数器VHDL程序;begin
dout = count;
process(clk,reset,din)
begin
if reset=0then count = din ; c=0;
elsif rising_edge(clk) then
if count = 1001 then count = 0000; c=1;
else count = count+1; c=0;
end if;
end if;
end process;
end Behavioral;
;10进制计数器??真;6进制计数器VHDL程序 ;process(clk,reset,din)
begin
if reset= 0 then count = din; c=0;
elsif rising_edge(clk) then
if count=101 then count=000; c=1;
else count=count+1; c=0;
end if;
end if;
end process;
dout = count;
end Behavioral;
;6进制计数器仿真 ;24进制计数器VHDL程序;process(clk,reset,din)
begin
if reset= 0 then count = din;
elsif rising_edge(clk) then
if count(3 downto 0)=1001 then count(3 downto 0)=0000;
count(5 downto 4)=count(5 downto 4) +1;
else count(3 downto 0)=count(3 downto 0)+1;
end if;
if count=100011 then count=000000;
end if;
end if;
end process;
dout = count;
end Behavioral;
;24进制计数器仿真 ;译码器VHDL程序;process(din)
begin
case din is
when 0000 = dout=0000001;--0
when 0001 = dout=1001111;--1
when 0010 = dout=0010010;--2
when 0011 = dout=0000110;--3
when 0100 = dout=1001100; --4
when 0101 = dout=0100100;--5
when 0110 = dout=0100000;--6
when 0111 = dout=0001111;--7
when 1000 = dout=0000000;--8
when 1001 = dout=0000100;--9
when others = dout=1111111;
end case;
end process;
end Behavioral;
;顶层设计VHDL程序; hourl: out std_logic_vector(6 downto 0); --小时低位输出
hourh: out std_logic_vector(6 downto 0)); --小时高位输出
end clock;
architecture Behavioral of clock is
component counter10 is
Port ( clk : in std_logic;
reset : in std_logic;
din : in std_logic_vector(3 downto 0);
dout : out std_logic_vector(3 downto 0);
c:out std_logic);
end component;
component counter6 is
Port ( clk : in std_logic;
reset : in std_logic;
din : in std_l
您可能关注的文档
最近下载
- 川教版六年级《生命生态安全》下册第3课《生命只有一次》课件.pptx VIP
- 急性缺血性脑卒中识别与早期治疗PPT课件.pptx VIP
- 2025年邵阳学院辅导员考试参考题库附答案.docx VIP
- 2025年高校教师资格证题库含答案(考试直接用).docx VIP
- horiba mexa 600s不透光烟度计horiba mexa 600s-1--中文翻译--20140928.pdf VIP
- 五年级下册语文必背内容汇总.docx
- 职业技术学院数控技术专业技能考核题库.pdf VIP
- 眼视光公共卫生学体系构建与实施策略.pptx VIP
- 《社区居家适老化环境设计》健康养老专业全套教学课件.pptx
- 食品安全控制技术课件.pptx VIP
原创力文档

文档评论(0)