Use clause inside architecture block sometimes gives an (incorrect) error

For Example :

library ieee;
use ieee.std_logic_1164.all;
 
entity DUMMY is
...
end entity DUMMY;
 
architecture SYN of DUMMY is
  use ieee.numeric_std.all;
  ...
begin
...
end architecture SYN;

This code usually (but not consistently always) gives the error :
"Could not find primary unit numeric_std in library ieee"

Relocating the "use ieee.numeric_std.all;" to the top of the file solves the error, so there is not really a problem with finding the numeric_std library. However using (additional) library use clauses inside the architecture block is perfectly legal and should not produce an error.

use clause in declarative part

Hi Dirk,

Thanks for letting us know. You've found a problem with the internal dependency resolution. I've logged this as ticket:647.

For now, as a workaround, you can avoid this bug by adding an extra library clause to your architecture, or (as you said yourself) by moving the use clause in front of the architecture.

library ieee;
use ieee.std_logic_1164.all;
entity da293 is
end entity da293;
 
library ieee; -- LIBRARY CLAUSE HERE
architecture SYN of da293 is
use ieee.NUMERIC_STD.all; -- NO MORE ERRORS
begin
end architecture SYN;

fixed

This problem is fixed in the upcoming release.

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.