'Library conflict when using both std_logic_arith and numeric_std

Is it possible to declare the std_logic_arith arithmetic library with the numeric_std library together?

Because when I removed them the code didn't work, but when I used them both it gives an error that there is a conflict between these two libraries.



Solution 1:[1]

Both the std_logic_arith and the numeric_std packages declare for example a type named unsigned.

So if you use both packages with .all, then you are very likely to run into conflicts.

Suggestion is to use only the IEEE standard package numeric_std, and skip using the non-standard package std_logic_arith. Despite the location in the ieee library, the std_logic_arith package is not VHDL standard, but an open source package from Synopsys.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jim Lewis