1、 评分:_数字系统设计实践课程设计报告设计题目 : 数 字 钟 的 设 计 程 序 班 级: 姓名: 学号: 指导教师: 实验日期: 年 月 日1.秒、分 60 进制计数模块LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;USE IEEE.STD_LOGIC_UNSIGNED.ALL;ENTITY SECOND ISPORT(CLK,RESET:IN STD_LOGIC;DATEOUT:OUT STD_LOGIC_VECTOR(7 DOWNTO 0);COUT:OUT STD_LOGIC);END SECOND;ARCHITECTURE BEHAV OF SE
2、COND ISSIGNAL OLBR:STD_LOGIC_VECTOR(3 DOWNTO 0);SIGNAL OHBR:STD_LOGIC_VECTOR(3 DOWNTO 0);BEGINPROCESS(CLK,RESET)BEGINIF(RESET=1)THENOLBR4)THENOLBR8)THENOLBR1)THENOLBR8)THENOLBRDAOUTDAOUTDAOUTDAOUTDAOUTDAOUTNULL;END CASE;END PROCESS;END FUN;4.译码模块Library ieee;use ieee.std_logic_1164.all;entity show1
3、isport(num:in std_logic_vector(3 downto 0);Y:out std_logic_VECTOR(6 DOWNTO 0);end show1;architecture behav of show1 isbeginprocessbegincase num iswhen“0000“=yyyyyyyyyyyHORHORHORHORNULL;END CASE;END PROCESS P2;SCTLSPEAKERSPEAKERNULL;END CASE;END PROCESS;END BEHAV;花样显示程序LIBRARY IEEE;USE IEEE.STD_LOGIC
4、_1164.ALL;USE IEEE.STD_LOGIC_UNSIGNED.ALL;ENTITY COLOR1 ISPORT(CLK:IN STD_LOGIC;LED:OUT STD_LOGIC_VECTOR(11 DOWNTO 0);END COLOR1;ARCHITECTURE BEHAV OF COLOR1 ISSIGNAL COUNT:INTEGER RANGE 0 TO 15;BEGINP1:PROCESS(CLK)BEGINIF(CLKEVENT AND CLK=1)THENCOUNTLEDLEDLEDLEDLEDLEDLEDLEDLEDLEDLEDLEDLEDLEDLEDLED=“111111111111“;END CASE;END PROCESS P2;END BEHAV;整点宝石:花样显示:7.信号选择模块LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;ENTITY MUX21 ISPORT(S,CLK,BOTTON:IN STD_LOGIC;Y:OUT STD_LOGIC);END MUX21;ARCHITECTURE BEHAV OF MUX21 ISBEGINY=CLK WHEN S=0ELSE BOTTON;END BEHAV;8 顶层模块