blob: edd4361c81fa0782331ebe61ef614a95e51cb8e8 (
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
|
library ieee;
use ieee.std_logic_1164.all;
entity psl_onehot0 is
port (clk : in std_logic;
a, b : in std_logic_vector(3 downto 0);
c : in natural range 0 to 15
);
end entity psl_onehot0;
architecture psl of psl_onehot0 is
begin
-- All is sensitive to rising edge of clk
default clock is rising_edge(clk);
-- This assertion holds
ONEHOT0_0_a : assert always onehot0(a);
-- This assertion fails at cycle 15
ONEHOT0_1_a : assert always onehot0(b);
-- This assertion fails at cycle 15
ONEHOT0_2_a : assert always onehot(c);
end architecture psl;
|