IEEE Standard 1076.3 (the numeric standard) was developed to help synthesis tool users and vendors by providing standard, portable data types and operations for numeric data, and by providing more clearly defined meaning for the nine values of the IEEE 1164 std_ulogic and std_logic data types.

 

IEEE Standard 1076.3 defines the package numeric_std that allows the use of arithmetic operations on standard logic (std_logic and std_logic_vector) data types. (The 1076.3 standard also defines arithmetic forms of the bit and bit_vector data types in a package named numeric_bit, but this alternative package is not described here.)

 

The numeric_std package defines the numeric types signed and unsigned and corresponding arithmetic operations and functions based on the std_logic (resolved) data type. The package was designed for use with synthesis tools, and therefore includes additional functions (such as std_match) that simplify the use of donít-cares.

 

There are two numeric data types, unsigned and signed, declared in the numeric_std package, as shown below:

 

    type unsigned is array (natural range <>) of std_logic;

    type signed is array (natural range <>) of std_logic;

 

Unsigned represents unsigned integer data in the form of an array of std_logic elements. Signed represents signed integer data. In signed or unsigned arrays, the leftmost bit is treated as the most significant bit. Signed integers are represented in the signed array in two's complement form.

 

image\diamond.gif  Using Numeric Data Types

image\diamond.gif  Numeric Standard Operators

image\diamond.gif  Numeric Array Resize Functions

image\diamond.gif  Numeric Type Conversion Functions

image\diamond.gif  Numeric Matching Functions

image\diamond.gif  Numeric Translation Functions