IEEE package 
Author Message
 IEEE package

There are tree IEEE packages to perform arithmetic:

-std_logic_arith
-std_logic_signed
-std_logic_unsigned

Which one to use ?

Thank you



Mon, 22 May 2000 03:00:00 GMT  
 IEEE package

Quote:

> There are tree IEEE packages to perform arithmetic:

> -std_logic_arith
> -std_logic_signed
> -std_logic_unsigned

> Which one to use ?

> Thank you

Only if you are using Synopsys for Synthesis.  I wish everyone would
migrate to the IEEE (real IEEE) packages of numeric_std and
numeric_bit.  Synopsys did everyone a big disservice putting their
packages in the IEEE library.

The short story on std_logic_unsigned and std_logic_signed is that if
you use them then all std_logic_vectors become that type for either the
architecture or entity architecture pair depending upon where the use is
declared.

Std_logic_arith is has many of the same functions but no implied true
signed/unsigned math.

Review the packages for both and you will understand how to use them.

I hope this help but doesn't necessary clarify the issues,

TomT...
--
+------------------------ ---------------------- ----------------------+
: t2design                                                             :
: 249 Lois Drive                                                       :
: Louisville, CO 80027                                                 :
+------------------------ ---------------------- ----------------------+

+------------------------ ---------------------- ----------------------+



Mon, 22 May 2000 03:00:00 GMT  
 IEEE package

Quote:

> There are tree IEEE packages to perform arithmetic:

> -std_logic_arith
> -std_logic_signed
> -std_logic_unsigned

> Which one to use ?

> Thank you

If you are doing just simple counters ( COUNT <= COUNT + '1'; ),
then all that you need for Synopsys is:

library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_UNSIGNED.all;

If you are doing 2's complement arithmetic functions, then use
IEEE.STD_LOGIC_SIGNED.all instead.

Regards,

Fred

--
__________________________________________________________
Frederick K. Best, P.E.           Phone: (407) 356-5257
Staff Engineer, ASIC Design     Fax:   (407) 356-5072




Fri, 02 Jun 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IEEE-Package STANDARD

2. Does anyone have ieee.math_real package?

3. IEEE 754 Floating point VHDL functions / MATH package

4. IEEE new Standard package

5. package ieee.std_logic_arith : a standard?

6. IEEE Waves package ?

7. IEEE/EIA Package

8. IEEE proposed standard package

9. IEEE Proposed MVL Package?

10. IEEE std constants package, in Ada forthcoming

11. Ada/IEEE binding (IEEE 754)

12. IEEE Standard Subroutines for CAMAC (ANSI/IEEE Std 758-1979)

 

 
Powered by phpBB® Forum Software