We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package testpkg is generic ( type A ; val : A ; function to_string(x : A) return string is <> ; ) ; constant x : A := val ; function doit(l, r : A) return string ; end package ; package body testpkg is function doit(l, r : A) return string is begin return to_string(l) & to_string(r) ; end function ; end package body ; library ieee ; use ieee.std_logic_1164.all ; use ieee.numeric_std.all ; entity test is end entity ; architecture arch of test is --package test_int is new work.testpkg generic map(A => integer, val => 12) ; package test_signed is new work.testpkg generic map (A => signed, val => to_signed(12, 16)) ; begin tb : process begin --report test_int.doit(44, 55) ; report test_signed.doit(to_signed(44, 16), to_signed(55, 16)) ; std.env.stop ; end process ; end architecture ;
The integer version works, but not the signed version.
$ nvc --std=2019 -a test.vhdl -e test -r ** Fatal: tree kind T_ALIAS does not have item I_PORTS [0x5599b8e2a2f9] ../src/object.c:254 object_lookup_failed [0x5599b8e27692] ../src/tree.c:595 tree_ports [0x5599b8e27692] ../src/tree.c:50 simp_call_args.cold [0x5599b8ea2f3d] ../src/simp.c:238 simp_fcall [0x5599b8ea2f3d] ../src/simp.c:1565 simp_tree.lto_priv.0 [0x5599b8eb7b44] ../src/object.c:714 object_rewrite [0x5599b8eb7ba6] ../src/object.c:778 object_rewrite [0x5599b8eb7d74] ../src/object.c:789 object_rewrite [0x5599b8eb7ba6] ../src/object.c:778 object_rewrite [0x5599b8eb7d74] ../src/object.c:789 object_rewrite [0x5599b8eb7d74] ../src/object.c:789 object_rewrite [0x5599b8eb7d74] ../src/object.c:789 object_rewrite [0x5599b8f79eaf] ../src/tree.c:1302 tree_rewrite.isra.0 [0x5599b8eb587c] ../src/simp.c:1700 analyse_file [0x5599b8e3a60a] ../src/nvc.c:246 analyse [0x5599b8e3a60a] ../src/nvc.c:1920 process_command [0x5599b8e314e5] ../src/nvc.c:2060 main
The text was updated successfully, but these errors were encountered:
809b75b
The difference is to_signed is an alias for signed but an implicit subprogram for integer.
to_signed
signed
integer
Sorry, something went wrong.
Fix crash with subprogram alias in generic <>. Fixes #924
72400b2
No branches or pull requests
The integer version works, but not the signed version.
The text was updated successfully, but these errors were encountered: