《EDA技术》课程实验报告
学生姓名:郑月庭
所在班级:电信1001
指导教师:高金定老师
记分及评价:
项目满分5分
得分
一、实验名称
60进制计数器设计
二、任务及要求
【基本部分】4分
1、在QuartusII平台上,采用文本输入设计方法,通过编写VHDL语言程序,完成60进制计数器的设计并进行时序仿真。
2、设计完成后生成一个元件,以供更高层次的设计调用。
3、实验箱上选择恰当的模式进行验证,目标芯片为ACEX1K系列EP1K30TC144-3。
【发挥部分】1分
在60进制基础上设计6进制计数器,完成时序仿真。
三、实验程序
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
Entity j602 Is
port (clk:in std_logic;
ent:in std_logic;
rst:in std_logic;
y0: out std_logic_vector(3 downto 0);
y1: out std_logic_vector(3 downto 0);
cout: out std_logic);
End j602;
Architecture j602 of j602 is
signal cnt0 :std_logic_vector(3 downto 0);
signal cnt1 :std_logic_vector(3 downto 0);
Begin
cout<='1' when (cnt1="0101" and cnt0="1001" and ent = '1') else '0';
process(clk,rst)
Begin
If rst ='0' Then
cnt0<="0000";
cnt1<="0000";
elsif clk'event and clk='1' Then
if ent = '1' Then
if cnt0="1001" Then
cnt0<="0000";
if cnt1="0101" Then
cnt1<="0000";
else
cnt1<=cnt1+1;
end if;
else
cnt0<=cnt0+1;
end if;
end if;
end if;
end process;
y0<=cnt0;
y1<=cnt1;
end j602;
四、仿真及结果分析
五、硬件验证
1、选择模式:模式5
六、小结
通过这次实验,使我明白了用VHDL语言编程和用设计原理图实现同样功能器件的区别,从而加深的对EDA的理解。