⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8位数据锁存器.txt

📁 4位乘法器,4位除法器 8位数据锁存器,8位相等比较器,带同步复位的状态 机,元件例化与层次设计,最高优先级编码器
💻 TXT
字号:
--
--
------------------------------------------------------------------------------------
-- DESCRIPTION   :  Flip-flop D type
--                  Width: 8
--                  Clock active: high
--                  Synchronous clear active: high
--                  Synchronous set active: high
--                  Clock enable active: high
--                  Load active: high
-- Download from :  http://www.pld.com.cn
------------------------------------------------------------------------------------


library IEEE;
use IEEE.std_logic_1164.all;

entity ffd is
	port (
		CLR : in std_logic;
		SET : in std_logic;
		CE : in std_logic;
		LOAD : in std_logic;
		CLK : in std_logic;
		DATA_IN : in std_logic_vector (7 downto 0);
		DATA_OUT : out std_logic_vector (7 downto 0)
	);
end entity;



architecture ffd_arch of ffd is
signal TEMP_DATA_OUT: std_logic_vector (7 downto 0);
begin

	process (CLK)
	begin

		if rising_edge(CLK) then
			if CE = '1' then
				if CLR = '1' then
					TEMP_DATA_OUT <= (others => '0');
				elsif SET = '1' then
					TEMP_DATA_OUT <= (others => '1');
				elsif LOAD = '1' then
					TEMP_DATA_OUT <= DATA_IN;
				end if;
			end if;
		end if;

	end process;

	DATA_OUT <= TEMP_DATA_OUT;

end architecture;


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -