《VHDL60进制计数器实验.docx》由会员分享,可在线阅读,更多相关《VHDL60进制计数器实验.docx(2页珍藏版)》请在三一办公上搜索。
1、VHDL60进制计数器实验EDA技术课程实验报告 学生姓名: 所在班级: 指导教师: 记分及评价: 项目满分 5分 得 分 电信1001 一、实验名称 60进制计数器设计 二、任务及要求 4分 1、在QuartusII平台上,采用文本输入设计方法,通过编写VHDL语言程序,完成60进制计数器的设计并进行时序仿真。 2、设计完成后生成一个元件,以供更高层次的设计调用。 3、实验箱上选择恰当的模式进行验证,目标芯片为ACEX1K系列EP1K30TC144-3。 1分 在60进制基础上设计6进制计数器,完成时序仿真。 三、实验程序 Library ieee; use ieee.std_logic_1
2、164.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); sig
3、nal cnt1 :std_logic_vector(3 downto 0); Begin 第 1 页 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 clkevent 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的理解。 第 2 页