aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/issues/issue4/counter8.vhdl
blob: 2067e23e07eb32d075a11aea2c4b2a1187dab3c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity counter8 is
  port (clk : in std_logic;
        led0 : out std_logic);
end counter8;

architecture synth of counter8 is
  
begin

  process (clk)
    variable temp : unsigned (7 downto 0);
  begin
    if rising_edge(clk) then
      temp:= temp + 1;
      led0 <= temp(0);
    end if;
  end process;

end synth;