You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a function signature is used in a report statement, nvc emits an error like this:
** Error: ambiguous use of name WAIT_LEVEL
> test.vhd:23
|
6 | procedure wait_level(signal data :in std_logic;| ^ hidden declaration of WAIT_LEVEL as WAIT_LEVEL [STD_LOGIC, STD_LOGIC, TIME]
...
10 | procedure wait_level(signal data :in std_logic_vector;| ^ visible declaration of WAIT_LEVEL as WAIT_LEVEL [STD_LOGIC_VECTOR, STD_LOGIC_VECTOR, TIME]
...
19 | procedure wait_level(signal data :in std_logic;| ^ visible declaration of WAIT_LEVEL as WAIT_LEVEL [STD_LOGIC, STD_LOGIC, TIME]
...
23 | report wait_level[std_logic, std_logic, time]'instance_name & " timeout occurred"; | ^^^^^^^^^^ use of name WAIT_LEVEL here** Error: unexpected [ while parsing report statement, expecting one of **, severity or ; > test.vhd:23 | 23 | report wait_level[std_logic, std_logic, time]'instance_name &" timeout occurred";| ^ this token was unexpected
The first error is a subsequent error from the fact that nvc can't distinguish between the two function of same name. For that reason I give the signature of the function in line 23, however nvc can't parse that code.
$ nvc --version
nvc 1.13-devel (1.12.0.r41.g3edb4fec) (Using LLVM 14.0.6)
Copyright (C) 2011-2024 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.
Full MWE
library ieee;
use ieee.std_logic_1164.all;
packagetestisprocedurewait_level(signal data : instd_logic;
constant value : instd_logic;
constant timeout : intime);
procedurewait_level(signal data : instd_logic_vector;
constant value : instd_logic_vector;
constant timeout : intime);
endpackagetest;
packagebodytestisprocedurewait_level(signal data : instd_logic;
constant value : instd_logic;
constant timeout : intime) isbeginreport wait_level[std_logic, std_logic, time]'instance_name &" timeout occurred";
endprocedurewait_level;
procedurewait_level(signal data : instd_logic_vector;
constant value : instd_logic_vector;
constant timeout : intime) isbeginreport wait_level[std_logic, std_logic, time]'instance_name &" timeout occurred";
endprocedurewait_level;
endpackagebody;
The text was updated successfully, but these errors were encountered:
When a function signature is used in a report statement, nvc emits an error like this:
The first error is a subsequent error from the fact that nvc can't distinguish between the two function of same name. For that reason I give the signature of the function in line 23, however nvc can't parse that code.
Full MWE
The text was updated successfully, but these errors were encountered: