左游手柄助手激活:D触发器的VHDL语言程序谁会编?

来源:百度文库 编辑:高校问答 时间:2024/04/28 06:32:22
带有置位和清零端的D触发器和T触发器用VHDL语言编程

你说的置位就是有一个set输入(Q=1),清零应该可以用复位键reset吧(Q=0)。

library ieee;
use ieee.std_logic_1164.all;

entity sync_rsdff is
port(d,clk : in std_logic;
set : in std_logic;
reset: in std_logic;
q,qb : out std_logic);
end sync_rsdff;

architecture rtl_arc of sync_rsdff is
process(clk)
begin
if (clk'event and clk='1') then
if(set='0' and reset='1') then
q<='1';
qb<='0';
elsif (set='1' and reset='0') then
q<='0';
qb<='1';
else
q<=d;
qb<=not d;
end if;
end process;
end rtl_arc;
以上是同步置位/复位的D触发器。

我也在忙我自己的论文啊。