服开头的成语
数字电路EDA实验报告
学校:
学院:
班级: 挖掘机简笔画
姓名:
学号:
指导教师:
模60倒计时器
一、实验目的
1.使用VHDL语言设计数字电路。
2.熟悉Quartus II开发环境,掌握基本操作。
3.学会使用FPGA开发板进行开发。
二、实验仪器
1.电脑一台。
2. FPGA开发板一块。
三、实验原理与设计
1.分频器设计
(1)原理设计
使用实验板上的50MHz时钟信号,因此需要对该时钟信号进行分频,以得到1Hz时钟信号,供计数器使用。
(2)VHDL语言描述
library ieee;
u ieee.std_logic_1164.all;
u ieee.std_logic_unsigned.all;
entity divider is
投标文件密封条port(
CLK:in std_logic;
OUT_CLK:out std_logic
);
实习项目end divider;
architecture one of divider is
signal count:std_logic_vector(31 downto 0):=x"00000000";
signal flag:std_logic:='0';
begin
process(CLK)
begin
if CLK'event and CLK='1' then
if count<24999999 then
count<=count+1;
el
count<=(others=>'0');
仿写春天的句子 flag<=not flag;
end if;
end if;
end process;
OUT_CLK<=flag;
end one;
(3)RTL视图
(4)符号表示
2.计数器设计
(1)原理设计
计数器为模60倒计时计数器,分成十位与个位两部分。个位减到0后再减则十位减1,个位减完后为9。当两位数为“00”时输出借位,再减1则为“59”。另外,设计计数使能、异步清零功能。
(2)VHDL语言描述
library ieee;
u ieee.std_logic_1164.all;
最亲爱的人
u ieee.std_logic_unsigned.all;
entity cnt60 is
port(
CLK:in std_logic;
OUT_H:out std_logic_vector(3 downto 0);
OUT_L:out std_logic_vector(3 downto 0);
EN:in std_logic;
CL:in std_logic;
OC:out std_logic
);
end cnt60;
architecture one of cnt60 is
signal s_h:std_logic_vector(3 downto 0):=(others=>'0');
signal s_l:std_logic_vector(3 downto 0):=(others=>'0');
signal s_oc:std_logic:='0';
begin
process(EN,CL,CLK)
begin
if CL='0' then
小鸟小鸟歌曲 s_h<=(others=>'0');
s_l<=(others=>'0');
elsif EN='1' then
if CLK'event and CLK='1' then
if s_oc='1' then
s_oc<='0';
end if;
if s_l>0 then
s_l<=s_l-1;
if s_h="0000" and s_l="0001" then
s_oc<='1';
end if;
el
s_l<="1001";
if s_h>0 then
s_h<=s_h-1;
el
即使的意思
s_h<="0101";
end if;
end if;
end if;
end if;
end process;
OUT_L<=s_l;
OUT_H<=s_h;
OC<=s_oc;
end one;
(3)RTL视图