1、 课课 程程 设设 计计 报报 告告 (理工类)(理工类) 课程名称: EDA 技术 专业班级: 电子信息工程 101 学生学号: 学生姓名: 所属院部: 指导教师: 2020 1111 2020 1 12 2 学年学年 第第 2 2 学期学期 一、设计目的和要求 1. 课程设计目的 2. 课程设计的基本要求 3. 课程设计类型 二、 仪器和设备 三、 设计过程 1. 设计内容和要求 2. 设计方法和开发步骤 3. 设计思路 4. 设计难点 四、 设计结果与分析 1. 思路问题以及测试结果失败分析 2. 程序简要说明 一、设计目的和要求 1.课程设计目的 1)根据设计要求,完成对数字秒表的设计
2、。 2)进一步加强对 Maxplus软件的应用和对 VHDL 语言的使用。 2.课程设计的基本要求 1)提供的时钟信号频率为 100Hz,实现计数从 0.01s 到 0.1s,再 到 1s,10s,1min,10min,1h。 3.课程设计类型 1)综合应用设计 二、二、仪器和设备 1.计算机,1 台 三、设计过程 1.设计内容和要求 1)用 Maxplus软件编程实现六进制计数器、十进制计数器、分 频器(3MHz100MHz)模块。 2)编译各个模块,连接各模块,最终实现一小时的秒表计数功 能。 2.设计方法和开发步骤 1)编程实现十进制计数器 十进制计数器源代码: library ieee
3、; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity cnt10 is port(clk: in std_logic; clr: in std_logic; ena: in std_logic; cq: out integer range 0 to 15; carry_out: out std_logic); end entity cnt10; architecture art of cnt10 is signal cqi: integer ran
4、ge 0 to 15; begin process(clk,clr,ena)is begin if clr=1then cqi=0; elsif clkevent and clk=1then if ena=1then if cqi9 then cqi=cqi+1; else cqi=0;end if; end if; end if; end process; process(cqi)is begin if cqi=9 then carry_out=1; else carry_out=0;end if; end process; cq=cqi; end architecture art; 2)编
5、程实现六进制计数器 六进制计数器源代码: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity cnt6 is port(clk: in std_logic; clr: in std_logic; ena: in std_logic; cq: out std_logic_vector(3 downto 0); carry_out: out std_logic); end entity cnt6; architecture a
6、rt of cnt6 is signal cqi: std_logic_vector(3 downto 0); begin process(clk,clr,ena)is begin if clr=1then cqi=“0000“; elsif clkevent and clk=1then if ena=1then if cqi=“0101“then cqi=“0000“; else cqi=cqi+1;end if; end if; end if; end process; process(cqi)is begin if cqi=“0000“then carry_out=1; else carry_out=0;end if; end process; cq=cqi; end architecture art; 3)编程实现分频器模块 分频器源代码(3MHz100Hz) library ieee; use ieee.std_logic_1164.all;