全文预览

基于VHDL-4位电子密码锁的设计

上传者:火锅鸡 |  格式:docx  |  页数:15 |  大小:0KB

文档介绍
d case;Р???else null;Р???end if;РР学习文档 仅供参考Р??end if;Р?end process;Р--*****************************************************************Р--左移进程,按下一个按键则clock输出一个高电平,显示译码器左移Р?process(clock,yes,start,reset,cancel)Р?beginР??if reset='0' thenР???correct<='0';Р???out_error<='0';Р???counter<=0;Р???enable<='1';Р???alarm<='0';Р??Р??elsif cancel='1' thenР???correct<='0';Р???out_error<='0';Р???out_q<="0000000000000000";Р???cnt4<=0; --使计数器清零,重新开始译码Р??elsif start='0' then Р???cnt4<=0;Р???out_q<="0000000000000000";Р??elseР???if rising_edge(clock) thenР????if cnt4=4 thenР?????null;Р????elseР?????out_q<=out_q(11 downto 0) & q;????Р?????cnt4<=cnt4+1;Р????end if;Р???end if;Р???if falling_edge(yes) thenР????if out_q=psw thenР?????correct<='1';Р?????out_error<='0';Р?????alarm<='0';

收藏

分享

举报
下载此文档