H
Hubble
Guest
Hi all,
although our project developed a standards paper at the project start
stating the usable VHDL packages which was delivered to all designers,
several (most) designers used
ieee.std_logic_unsigned.all
for their arithmetic instead of ieee.numeric_std.all which was defined
in the project standards. According to the VHDL Faq
(http://tech-www.informatik.uni-hamburg.de/vhdl/doc/faq/FAQ1.html), the
ieee.std_logic_unsigned is
a) non standard and differently implemented by various vendors (FAQ1,
Section 4.8.1)
b) leads to a "=" resolution conflict (FAQ1, section 4.2.20), which is
ignored by some tools.
Modelsim users have to use the -explicit compiler option to direct vcom
to use the explicit declaration in ieee.std_logic_unsigned.all.
There is a great opposition here against numeric_std, namely because
the need for type conversion when incrementing a std_logic_vector
use ieee.std_logic_unsigned.all;
...
std_logic_vector sv(7 downto 0);
...
s<=sv+1;
via
use ieee.numeric_std_all;
...
std_logic_vector sv(7 downto 0);
...
s<=std_logic_vector(unsigned(sv)+1);
which is considered unreadable. Although I am not completely against
changing to ieee.std_logic_unsigned, I would strongly recommend leaving
ieee.number_std.all.
Any suggestions.
Hubble.
although our project developed a standards paper at the project start
stating the usable VHDL packages which was delivered to all designers,
several (most) designers used
ieee.std_logic_unsigned.all
for their arithmetic instead of ieee.numeric_std.all which was defined
in the project standards. According to the VHDL Faq
(http://tech-www.informatik.uni-hamburg.de/vhdl/doc/faq/FAQ1.html), the
ieee.std_logic_unsigned is
a) non standard and differently implemented by various vendors (FAQ1,
Section 4.8.1)
b) leads to a "=" resolution conflict (FAQ1, section 4.2.20), which is
ignored by some tools.
Modelsim users have to use the -explicit compiler option to direct vcom
to use the explicit declaration in ieee.std_logic_unsigned.all.
There is a great opposition here against numeric_std, namely because
the need for type conversion when incrementing a std_logic_vector
use ieee.std_logic_unsigned.all;
...
std_logic_vector sv(7 downto 0);
...
s<=sv+1;
via
use ieee.numeric_std_all;
...
std_logic_vector sv(7 downto 0);
...
s<=std_logic_vector(unsigned(sv)+1);
which is considered unreadable. Although I am not completely against
changing to ieee.std_logic_unsigned, I would strongly recommend leaving
ieee.number_std.all.
Any suggestions.
Hubble.