en_dff.txt
来自「用vhdl编写的D触发器」· 文本 代码 · 共 21 行
TXT
21 行
library ieee;
use ieee.std_logic_1164.all;
entity en_dff is
port (d,reset,EN,clk: in std_logic;
q : buffer std_logic);
end;
architecture behavior of en_dff is
begin
process (reset,clk)
begin
if reset='0' then
q<='0';
elsif clk'event and clk='1' then
if EN='1' then
q<=d;
else
q<=q;
end if;
end if;
end process;
end behavior;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?