blob: ceb8cc8cb212c6aed685b327dcb70ebe51f0d1a4 (
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
|
entity range_tb is
end range_tb;
architecture tb of range_tb is
begin
process
variable i : integer;
begin
-- Behaves like 32-bit arithmetic with modular truncation
i := integer'low;
report integer'image(i);
i := integer'low-1;
report integer'image(i);
-- Produces the error "overflow detected"
i := integer'low;
report integer'image(i);
i := i-1;
report integer'image(i);
wait; -- forever
end process;
end tb;
|