vhdl实现8个D触发器

一木 2.3K 0
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
entity dff1 is
port(clk:in std_logic;
	   d:in std_logic_vector(3 downto 0);
	   q1,q2,q3,q4,q5,q6,q7,q8:out std_logic_vector(3 downto 0));--定义8个输出端口
end;
architecture bhv of dff1 is
  signal q:std_logic_vector(3 downto 0);
begin
	process(clk,d)
	begin
		if clk'event and clk='1' then
			q<=d;
 end if;
end process;
	q1<=q;
	q2<=q;
	q3<=q;
	q4<=q;
	q5<=q;
	q6<=q;
	q7<=q;
	q8<=q;
end bhv;

发表评论 取消回复
表情 图片 链接 代码

分享