aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue828/test1.vhdl
blob: c55de93637f01beb19fa68947546e452d756984c (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
32
33
34
35
36
37
library ieee;
use ieee.std_logic_1164.all;

entity test is
  port(
    tx : out std_logic);
end entity;

architecture tb of test is
begin
  process

    procedure transmit(data : std_logic_vector;
                       signal tx : out std_logic) is

      variable norm : std_logic_vector(data'length - 1 downto 0) := data;

      procedure send(value : std_logic) is
      begin
        tx <= value;
        wait for 10 ns;
      end procedure;

    begin
      for i in norm'reverse_range loop
        send(norm(i));
        report to_string(i);
      end loop;
    end procedure;

  begin

    transmit(x"55", tx);
    wait;

  end process;
end architecture;