blob: c6dd7841bbf4b9d9475d2ea22875f57c0e88ffde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.all;
entity bug02 is
end bug02;
architecture rtl of bug02 is
FUNCTION weird (bw : integer range 2 to 32)
RETURN INTEGER IS
BEGIN
RETURN -(2**(bw - 1));
END weird;
begin
process
begin
report to_string(weird(10));
wait;
end process;
end architecture;
|