There was an error while loading. Please reload this page.
1 parent 022afec commit e5c2104Copy full SHA for e5c2104
Project/Code/AR.vhd
@@ -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
30
+ end process ;
31
32
33
+end Behavioral;
0 commit comments