aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue662/psl_onehot.vhdl
blob: 97753a17b0a22246a34abdc7689d5a2df5e42fcc (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
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity psl_onehot is
  port (clk  : in std_logic;
        a, b : in std_logic_vector(3 downto 0)
  );
end entity psl_onehot;


architecture psl of psl_onehot is
begin

  -- All is sensitive to rising edge of clk
  default clock is rising_edge(clk);

  -- This assertion holds
  ONEHOT_0_a : assert always onehot(a);

  -- This assertion fails at cycle 12
  ONEHOT_1_a : assert always onehot(b);

end architecture psl;