Skip to content

Commit f88f89c

Browse files
authored
Add files via upload
1 parent 3ec8b05 commit f88f89c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Project/Code/OPR.vhd

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
library IEEE;
2+
use IEEE.STD_LOGIC_1164.ALL;
3+
use Ieee.numeric_std.all;
4+
5+
entity OPR is
6+
Port ( clk : in std_logic;
7+
load : in STD_LOGIC;
8+
input : in unsigned (3 downto 0);
9+
output : out unsigned (3 downto 0));
10+
end OPR;
11+
12+
architecture Behavioral of OPR is
13+
14+
signal temp : unsigned ( 3 downto 0 ) ;
15+
16+
begin
17+
output <= temp ;
18+
process ( clk )
19+
begin
20+
if clk'event and clk = '1' then
21+
if load = '1' then
22+
temp <= input ;
23+
else
24+
temp <= temp;
25+
end if ;
26+
end if ;
27+
end process ;
28+
29+
30+
end Behavioral;

0 commit comments

Comments
 (0)