suocunqi4.vhd

来自「4位电子智能密码锁」· VHDL 代码 · 共 24 行

VHD
24
字号
-- suocunqi4_k.vhd    用于键盘密码输入 ( _k: key)
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity suocunqi4 is
	port( key_in : in std_logic_vector(3 downto 0);       ---shu ru
             rst : in std_logic ;                         ---fu wei  
              cs : in std_logic ;                         ---pian xuan
              oe : in std_logic ;                         ---shu chu yu xu
         key_out : out std_logic_vector(3 downto 0) );    ---shu chu
end suocunqi4;

architecture one of suocunqi4 is
begin
--***
process(RST,CS,OE)
  begin
  if rst='1' then key_out <= "0000";
     elsif cs='1' then 
           if oe='1' and oe'event then key_out <= key_in; end if;
end if;
end process;
end;
--***

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?