blob: 48d810f63d3884db94c634a2a0aa8251ea589c32 (
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
|
package pkg is
procedure iterate (
input : in bit_vector);
end pkg;
package body pkg is
procedure iterate (
input : in bit_vector) is
variable j : integer := input'range'left;
begin -- iterate
for i in input'range loop
assert i = j report "TEST FAILED" severity failure;
j := j + 1;
end loop; -- i in 1 to 10
assert j = input'range'right + 1 report "TEST FAILED" severity failure;
end iterate;
end pkg;
entity test is
end test;
architecture only of test is
begin -- only
doit: process
begin -- process doit
work.pkg.iterate("0000");
report "TEST PASSED";
wait;
end process doit;
end only;
|