aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue17/cond_assign_var.vhdl
blob: c6e4af87f999c45e8bc8d828220f53175ebb4d3c (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
library ieee ; 
use ieee.std_logic_1164.all ; 
use std.textio.all ; 

entity cond_assign_var is
end entity cond_assign_var ;

architecture doit of cond_assign_var is
  signal Clk : std_logic := '0'  ; 
  signal Y : std_logic ; 
begin
  Clk <= not Clk after 10 ns ; 
  
  process (Clk)
    variable A : std_logic ; 
  begin
    A := 'H' when Clk = '1' else 'L' ;
    Y <= A ; 
--    Y <= 'H' when Clk = '1' else 'L' ;
  end process ;

--    Y <= 'H' when Clk = '1' else 'L' ;
    
  process
  begin
    wait for 500 ns ; 
    std.env.stop ;
  end process ; 
end architecture doit ;