我有9个触发器和一个复位输入。当重置为0
时,我需要将8个触发器的输出设置为0
。并输出一个触发器到1
。这款触发器独一无二,从未改变过。怎么做?不同的触发器 - 一个复位输入的不同输出
触发器的代码:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity d_ff is
port
(
clk : in std_logic;
rst : in std_logic;
d : in std_logic;
q : out std_logic
);
end entity d_ff;
architecture logicFunc of d_ff is
begin
process (clk) is
begin
if (rst='0') then
q <= '0';
elsif (clk'event and clk = '1') then
q <= d;
end if;
end process;
end architecture logicFunc;
现在这个代码设置所有触发器到0
时复位是0
,我不能在主程序
这么简单的解决方案。我怎么没有这样做。谢谢! – levshkatov