文件名称:dff
介绍说明--下载内容均来自于网络,请自行研究使用
用VHDL语言编写的带进位、置位、复位的D触发器,异步清零D触发器,同步清零D触发器-library ieee
use ieee.std_logic_1164.all
use ieee.std_logic_unsigned.all
entity exp7_10 is
port( clk: in std_logic
d: in std_logic
clr: in std_logic
en,s:in std_logic
q: out std_logic
)
end exp7_10
architecture bhv of exp7_10 is
signal q1: std_logic
begin
process(clk)
begin
if(clk event and clk= 1 ) then
if(en= 1 ) then
if(clr= 1 ) then q1<= 0
elsif(s= 1 ) then q1<= 1
else q1<=d
end if
end if
end if
end process
q<=q1
end bhv
use ieee.std_logic_1164.all
use ieee.std_logic_unsigned.all
entity exp7_10 is
port( clk: in std_logic
d: in std_logic
clr: in std_logic
en,s:in std_logic
q: out std_logic
)
end exp7_10
architecture bhv of exp7_10 is
signal q1: std_logic
begin
process(clk)
begin
if(clk event and clk= 1 ) then
if(en= 1 ) then
if(clr= 1 ) then q1<= 0
elsif(s= 1 ) then q1<= 1
else q1<=d
end if
end if
end if
end process
q<=q1
end bhv
(系统自动生成,下载前可以参看下载内容)
下载文件列表
dff.txt