Skip to content
New issue

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

tree kind T_ARCH does not have item I_GENERICS #669

Closed
yikkrubz opened this issue Apr 10, 2023 · 1 comment
Closed

tree kind T_ARCH does not have item I_GENERICS #669

yikkrubz opened this issue Apr 10, 2023 · 1 comment

Comments

@yikkrubz
Copy link

Elaborating e causes a fatal error. This is a regression. Operating system macos 12.6.4. I can analyse and elaborate the file with other vhdl compilers.

e.vhd
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity d is
generic (c : positive);
port (
b : in std_logic
);
end d;

architecture beh of d is
constant g : time := 1 ms / real(c);
begin
process
begin
wait until falling_edge(b);
wait for g;
end process;
end architecture;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity e is
end e;

architecture sim of e is
signal a : std_logic;
begin
F : entity work.d(beh)
generic map(
c => 1
)
port map(
b => a
);
end architecture;

MacBook-Pro:top_src Peter$ nvc --std=08 -a e.vhd
MacBook-Pro:top_src Peter$ nvc --std=08 -e e
** Fatal: tree kind T_ARCH does not have item I_GENERICS
> e.vhd:12
|
12 | architecture beh of d is
| ^
[0x10ec028ef] object_lookup_failed+0x7d
[0x10eae2907] elab_hint_fn+0x337
[0x10eb77907] diag_new+0x137
[0x10ea64f84] error_at+0x74
[0x10eafbaae] bounds_visit_fn+0xc1e
[0x10eb03b2e] object_rewrite+0x54e
[0x10eb03a0f] object_rewrite+0x42f
[0x10eb03a0f] object_rewrite+0x42f
[0x10eadf59e] elab_stmts+0x26ee
[0x10eadb0b0] elab_top_level+0x1370
[0x10ead964c] elab+0x39c
[0x10ea5e478] process_command+0x2358
[0x10ea5b9b9] main+0x4a9
MacBook-Pro:top_src Peter$ nvc --version
nvc 1.10-devel (1.9.0.r8.g72ac80fb) (Using LLVM 16.0.1)
Copyright (C) 2011-2023 Nick Gasson
This program comes with ABSOLUTELY NO WARRANTY. This is free software, and
you are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.

@nickg
Copy link
Owner

nickg commented Apr 10, 2023

This is fixed on the master branch now. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants