-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOutReg.vhd
47 lines (33 loc) · 1.03 KB
/
OutReg.vhd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
----------------------------------------------------------------------------------
-- Company: Benha Faculty of Engineering
-- Engineer: Mariam El-Shakafi
-- Create Date: 18:57:06 05/03/2020
-- Module Name: OutReg - Behavioral
-- Project Name: SAP1-VHDL
-- Description: This is an implementation of output register
-- Dependencies: None
-- Version: 1.0
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity OutReg is
Port ( clk : in STD_LOGIC;
Lo : in STD_LOGIC;
datain : in STD_LOGIC_VECTOR (7 downto 0);
dataout : out STD_LOGIC_VECTOR (7 downto 0));
end OutReg;
architecture Behavioral of OutReg is
signal OUT_content : STD_LOGIC_VECTOR (7 downto 0) := (others => '0');
begin
process (clk)
begin
if rising_edge(clk) then
if Lo = '1' then
OUT_content <= datain;
end if;
end if;
end process;
dataout <= OUT_content;
end Behavioral;