aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket96/ent.vhd
blob: d876cc154cc0bb4c81bd2d5830be66afd0bf9515 (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
entity ent is
end entity;

architecture a of ent is
  procedure proc(
    constant seq : in string;
    signal clk        : in  bit) is
  begin
    for i in seq'left to seq'right loop
      report ("left=" & integer'image(seq'left) &
              ", right=" & integer'image(seq'right) &
              ", i=" & integer'image(i));
      report "seq(i)=" & character'image(seq(i));
      wait until rising_edge(clk);
    end loop;
  end procedure;

  signal clk : bit := '0';
begin

  clk <= not clk after 1 ns;
  main : process
    variable var : string(1 to 10 - 1);
  begin
    var := (others => '0');
    proc(var & "0", clk);
    wait;
  end process;
end architecture;