aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue529/impure2.vhdl
blob: 83f37ccc0c89de12d82f792dc96697a0afcc2fdc (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
entity impure_ex2 is
port (
   clk : in  bit;
   arg : in  bit;
   res : out bit
);
end impure_ex2;

architecture rtl of impure_ex2 is

   -- An impure function called from a combinatorial process with "all" 
   -- sensitivity triggers an exception.
   impure function foo return bit is
   begin
      return arg;
   end function foo;

   signal ns : bit;

begin

   --comb_process : process(res) -- this works
   comb_process : process(all)
   begin
      ns <= res XOR foo;
   end process;
end rtl;