v10_1.vhd
来自「台湾全华科技VHDL教材实例」· VHDL 代码 · 共 56 行
VHD
56 行
library ieee;
use ieee.std_logic_1164.all;
entity DFF is
port(D : in std_logic;
Q : out std_logic;
Rst : in std_logic;
Clk : in std_logic);
end DFF;
architecture A_DFF of DFF is
begin
process(Clk)
begin
if Clk = '1' and Clk'event then
if Rst = '0' then
Q <= '0';
else
Q <= D after 5 ns;
end if;
end if;
end process;
end A_DFF;
library ieee;
use ieee.std_logic_1164.all;
entity top is
port(D : in std_logic;
Q : out std_logic;
OE : in std_logic;
Rst : in std_logic;
Clk : in std_logic);
end top;
architecture A_top of top is
component DFF
port(D : in std_logic;
Q : out std_logic;
Rst : in std_logic;
OE : in std_logic;
Clk : in std_logic);
end component;
begin
SRDFF : DFF
port map(D => D ,
Q => Q ,
Rst => Rst ,
OE => OE ,
Clk => Clk );
end A_top;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?