Skip to content

Commit e5c2104

Browse files
authored
Add files via upload
1 parent 022afec commit e5c2104

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Project/Code/AR.vhd

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

0 commit comments

Comments
 (0)