基于vhdl的数字电子钟的设计内容摘要:
end if。 elsif(count1660)then count=count+1。 enhour_1=39。 039。 after 100 ns。 else count=0000000。 end if。 end if。 end process。 end fun。 模块:用来对时进行计数,当记到计数器的低四位为 1001 时,若高三位小于 010 时,则时计数器加 7,目的是使计数值变为 BCD 码。 当计数器的高三位小于 010,低四位小于 1001 时,计数器加 1;若当计数器记到 0100100 时,则有一进位。 HOUR 模块的时钟由 SETHOUR 和 MINUTE 记到 60 的进位两部分组成。 HOUR 模块源程序如下: library ieee。 use。 use。 entity hour is port(clk,reset:in std_logic。 daout:out std_logic_vector(5 downto 0) )。 end entity hour。 architecture fun of hour is signal count:std_logic_vector(5 downto 0)。 begin daout=count。 process(clk,reset) begin if(reset=39。 139。 )then count=000000。 elsif(clk39。 event and clk=39。 139。 )then if(count(3 downto 0)=1001)then if(count1623)then count=count+7。 else count=000000。 end if。 elsif(count1623)then count=count+1。 else count=000000。 end if。 end if。 end process。 end fun。 CLOCK_TOP 模块:用来对元件进行例化,以及对 端口进行映射。 HOUR 模块源程序如下: library ieee。 use。 entity clock_top is port(clk,reset,setmin,sethour:in std_logic。 second_daout,minute_daout:out std_logic_vector(6 downto 0)。 hour_daout:out std_logic_vector(5 downto 0) )。 end clock_top。 architecture a of clock_top is ponent second port(clk,reset,setmin:in std_logic。 daout:out std_logic_vector(6 downto 0)。 enmin:out std_logic)。 end ponent。 ponent minute port(clk,reset,clk1,sethour:in std_logic。 enhour:out std_logic。 daout:out std_logic_vector(6 downto 0))。 end ponent。 ponent hour port(clk,reset:in std_logic。 daout:out std_logic_vector(5 downto 0))。 end ponent。 signal enmin_re,enhour_re:std_logic。 begin u1:second port map(reset=reset, clk=clk, setmin=setmin, enmin=enmin_re, daout=second_daout)。 u2:minute port map(clk=enmin_re, reset=reset, clk1=clk, sethour=sethour, enhour=enhour_re, daout=minute_daout)。 u3:hour port map(clk=enhour_re, reset=reset, daout=hour_daout)。 end a。 (二) 硬件 设计 : 利用 QuartusII 把程序写入实验板,根据上面的输入输出引脚,锁定到芯片引脚。 本实验运用的芯片是 EPF10K10LC844,还有利用了 6个 LED显示,分别显示时、分、秒各两个,没有利用译码器,利用的 LED 是 8 引脚的。 本次验证利用实验板的模式 7,根据板的说明书,锁定引脚并下载程序。 引脚锁定: clk——pin_93,sethour—— pin_7, Setmin—— pin_4,。基于vhdl的数字电子钟的设计
相关推荐
中所有的对顶角、同位角、内错角和同旁内角。 1 2 3 4 5 6 7 8 例 1 如图 1- 2,直线 DE截 AB,AC,构成 8个角。 指出所有的同位角、内错角和同旁内角。 1 2 3 4 5 6 7 8 A B C D E 如图:两只手的食子和拇指在同一平面内,它们构成的一对角可以看成是什么角 ?类似地,你还能用两只手的手指构成同位角和同旁内角吗 ? 例 2
a, b之间的距离 注意是 垂线段的长 ,而不是垂线段 如图,直线 a∥b ,请量出这两条平行线之间的距离 a b 如图是一个平行四边形 ,请表示出图中的平行线 AB与 CD之间的距离 . A B C D 例: 已知直线 ,把这条直线平移,使经平移后得的像与直线 的距离为 ,求作直线 平移后所得的像。 课本 P
VHDL,模拟器对编辑后的程序进行模拟,如果达不到设计要求,则可以重新修改程序,直到通过功能模拟。 (3) 逻辑综合与优化 将通过功能模拟的程序放到 VHDL 编译器中,进行逻辑综合与优化。 (4) 门级模拟对电路用 VHDL。 仿真器仿真。 可对门级电路的延时、定时状态、驱动能力等进行仿真。 如不符合要求,可重复步骤 (3),再门级模拟,直到符合要求止。 (5) 版图生成 用相应的软件处理后
case a is when 00 = p1=c。 当 a 为 0 时,将 c 的值赋给 p1。 when 01 = p2=c。 当 a 为 1 时,将 c 的值赋给 p2。 when 10 = p3=c。 当 a 为 2 时,将 c 的值赋给 p3。 when 11 = p4=c。 当 a 为 3 时,将 c 的值赋给 p4。 end case。 end if。 end process t1。
.............................................................6 实验总结 ..........................................................................................................7 摘要 ....................