lock.vhd
来自「1、 南北和东西方向各有一组绿、黄、红灯」· VHDL 代码 · 共 27 行
VHD
27 行
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity lock is
port(
clk : in std_logic;
kin : in std_logic;
kout : out std_logic);
end lock;
architecture a of lock is
begin
process(clk)
variable i1 : std_logic;
variable i2 : std_logic;
begin
if(clk'event and clk='1') then
i1 := i2;
i2 := kin;
if (i1=i2) then
kout <= i2;
end if;
end if;
end process;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?