如何用VHDL语言实现一个T✀触发器和一个D触发器的级联? 两个触发器的描述如下

2024-12-04 09:16:24
推荐回答(1个)
回答1:

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY FF01 IS
port (clk: in std_logic;
q0,q1: out std_logic);
end entity;
ARCHITECTURE Q01 OF FF01 IS
COMPONENT FF0
port (clk: in std_logic;
q: out std_logic);
end COMPONENT;
COMPONENT FF1
port (d,clk: in std_logic;
q: out std_logic);
end COMPONENT;
SIGNAL D:std_logic;
BEGIN
U0:FF0 PORT MAP(clk => clk, q => D);
U1:FF1 PORT MAP(clk => clk, d => D, q => q1);
q0 <= D;
END Q01;