📄 ddoor.vhd
字号:
library ieee;
use ieee.std_logic_1164.all; --引用库
--D触发
entity Ddoor is
port(ctrl:in std_logic; --控制时序
Gin:in std_logic; --输入
Gout:out std_logic); --输出
signal tempGout : std_logic;--保存上次状态
end;
architecture behavioral of Ddoor is
begin
process(ctrl,Gin)
begin
if ctrl'event and ctrl='1' then --clk上升沿锁存数据
tempGout<=Gin; -- 输入--->输出
end if;
Gout<=tempGout; --输出
end process;
end behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -