blob: 6e46376ff779c3a2a8167e123c8803b4cc5eeba5 (
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
|
package my_pkg_gen is
generic (type el_type);
type sfixed is array (integer range <>) of el_type;
function to_string (inp: sfixed) return string;
end my_pkg_gen;
package body my_pkg_gen is
function to_string (inp: sfixed) return string is
begin
return "image-pkg";
end to_string;
end my_pkg_gen;
package my_pkg is new work.my_pkg_gen generic map (el_type => bit);
use work.my_pkg.all;
entity repro is
end;
architecture behavioral of repro is
function to_string (inp: sfixed) return string is
begin
return "image-ent";
end function;
begin
process
variable z: sfixed (3 downto -3);
begin
z := "1111000";
report "z = " & to_string (z);
wait;
end process;
end architecture behavioral;
|