aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/ghdl-issues/issue1610/exp.vhdl
blob: 3d3ac38b3a1e3cf16ee3ca2676aea69731d96638 (plain)
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
library IEEE;
use IEEE.std_logic_1164.ALL;
use IEEE.numeric_std.ALL;

entity exp is
  port (
    clk : in    std_logic
  );
end entity exp;

architecture behav of exp is

  signal ver_clk : std_logic;
  signal count : integer := 0;

  attribute gclk : boolean;
  attribute gclk of ver_clk : signal is true;

begin

  default Clock is rising_edge(clk);

  process (ver_clk)
  begin
    if rising_edge(ver_clk) then
      count <= count + 1;
    end if;
  end process;

  assert always next count = prev(count) + 1;

end architecture behav;