基于fpga的语音数字时钟系统内容摘要:

_tinmeout)then count_k_end=39。 139。 else counter_k=Counter_k+1。 end if。 end if。 end process Count_key。 Count_alarm:process(Enable_count_a,clk) begin if(enable_count_a=39。 139。 )then counter_a=39。 039。 count_a_end=39。 039。 elsif (rising_edge(clk))then if (counter_a=show_alarm_timeout)then count_a_end=39。 139。 else counter_a=counter_a+1。 end if。 end if。 end process Count_alarm。 end art。 二.闹钟系统译码器设计 :每次按下闹钟系统的数字键盘后产生一个数字所对应的10 位二进制数据信号转换为 1 位十进制整数信号,作为小时,分钟计 数的 4 个数字之一。 结构图 Decoder 输入 0000000001 0000000010 0000000100 0000001000 0000010000 输出 0 1 2 3 4 输入 0000100000 0001000000 0010000000 0100000000 1000000000 输出 5 6 7 8 9 library IEEE。 use。 use。 ENTITY decoder is port(keypad:in std_logic_vector(9 downto 0)。 value:out T_digital)。 end decoder。 ARCHITECTURE art of decoder is begin with keypad select value=0 when 0000000001, 1 when 0000000010, 2 when 0000000100, 3 when 0000001000, 4 when 0000010000, 5 when 0000100000, 6 when 0001000000, 7 when 0010000000, 8 when 0100000000, 9 when 1000000000, 0 when others。 end art。 三.闹钟系统的移位寄存器的设计 :在 clk 的上升沿同步下,将 key 端口的输入信号移入new_time 端口的输出端口最低位,原有信息一次向左移动,最高位舍去, reset 对输出端口 new_time异步清零。 电路原理图 library IEEE。 use。 use。 ENTITY key_buffer is port(key:in t_digital。 clk,reset:in std_logic。 new_time:out t_clock_time)。 end key_buffer。 ARCHITECTURE art of key_buffer is signal n_t:t_clock_time。 process(clk,reset) begin if (reset=39。 139。 )then n_t=(0,0,0,0)。 elsif(rising_edge(clk))then for i in 3 downto 1 loopzuo huan yi n_t(i)=n_t(i1)。 end loop。 n_t(0)=key。 end if。 end process。 new_time=n_t。 end art。 四.闹钟寄存器的设计 :闹钟寄存器在时钟上升沿同步下,根据 Load_new_a 端口的输入信号控制 Alarm_time 口的输出,当控制信号为高电平时,把 New_alarm_time 端口的赋给 alarm_time然后 输出, reset 端口输入信号对 alarm_time端口的输出进行异步清零复位。 电路原理图 library IEEE。 use。 use。 ENTITY Alarm_reg is port(clk,reset:in std_logic。 new_alarm_time:in t_clock_time。 load_new_a:in std_logic。 alarm_time:out std_logic)。 end Alarm_reg。 ARCHITECTURE art of Alarm_reg is begin process(clk,reset) begin if(reset=39。 139。 )then alarm_clock=(0,0,0,0)。 else if rising_edge(clk)then if load_new_a=39。 139。 then alarm_time=new_alarm_time。 elsif load_new_a=39。 039。 then。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。