Latch.vhd
上传用户:hbxtsdjs
上传日期:2022-07-03
资源大小:753k
文件大小:1k
- ----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 19:06:36 05/04/2010
-- Design Name:
-- Module Name: Latch - Behavioral
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity Latch is
Port ( data_in : in STD_LOGIC_VECTOR (7 downto 0);
data_out : out STD_LOGIC_VECTOR (7 downto 0);
- cs : in STD_LOGIC;
clk : in STD_LOGIC);
end Latch;
architecture Behavioral of Latch is
begin
b:process(clk)
begin
- if cs='1' then
if clk'event and clk='1' then
data_out <= data_in;
end if;
- end if;
end process;
end Behavioral;