Package: NUMERIC_BIT
- File: numeric_bit.vhdl
Constants
Name | Type | Value | Description |
---|---|---|---|
CopyRightNotice | STRING | "Copyright � 2008 IEEE. All |
Types
Name | Type | Description |
---|---|---|
UNSIGNED | array (NATURAL range <>) of BIT | ============================================================================ Numeric Array Type Definitions ============================================================================ |
SIGNED | array (NATURAL range <>) of BIT |
Functions
- find_leftmost (ARG : UNSIGNED;
Y : BIT) return INTEGER
Description
Result subtype: SIGNED(R'LENGTH-1 downto 0)
Result: Computes "L mod R" where L is an INTEGER and
R is a SIGNED vector.
If NO_OF_BITS(L) > R'LENGTH, result is truncated to R'LENGTH.
Id: A.39
- find_leftmost (ARG : SIGNED;
Y : BIT) return INTEGER
Description
Result subtype: INTEGER
Result: Finds the leftmost occurrence of the value of Y in ARG.
Returns the index of the occurrence if it exists, or -1 otherwise.
Id: A.40
- find_rightmost (ARG : UNSIGNED;
Y : BIT) return INTEGER
Description
Result subtype: INTEGER
Result: Finds the leftmost occurrence of the value of Y in ARG.
Returns the index of the occurrence if it exists, or -1 otherwise.
Id: A.41
- find_rightmost (ARG : SIGNED;
Y : BIT) return INTEGER
Description
Result subtype: INTEGER
Result: Finds the leftmost occurrence of the value of Y in ARG.
Returns the index of the occurrence if it exists, or -1 otherwise.
Id: A.42
- MINIMUM (L,
R : UNSIGNED) return UNSIGNED
Description
Result subtype: BOOLEAN
Result: Computes "L /= R" where L is a SIGNED vector and
R is an INTEGER.
Id: C.37
- MINIMUM (L,
R : SIGNED) return SIGNED
Description
Result subtype: UNSIGNED
Result: Returns the lesser of two UNSIGNED vectors that may be
of different lengths.
Id: C.38
- MINIMUM (L : NATURAL;
R : UNSIGNED) return UNSIGNED
Description
Result subtype: SIGNED
Result: Returns the lesser of two SIGNED vectors that may be
of different lengths.
Id: C.39
- MINIMUM (L : INTEGER;
R : SIGNED) return SIGNED
Description
Result subtype: UNSIGNED
Result: Returns the lesser of a nonnegative INTEGER, L, and
an UNSIGNED vector, R.
Id: C.40
- MINIMUM (L : UNSIGNED;
R : NATURAL) return UNSIGNED
Description
Result subtype: SIGNED
Result: Returns the lesser of an INTEGER, L, and a SIGNED
vector, R.
Id: C.41
- MINIMUM (L : SIGNED;
R : INTEGER) return SIGNED
Description
Result subtype: UNSIGNED
Result: Returns the lesser of an UNSIGNED vector, L, and
a nonnegative INTEGER, R.
Id: C.42
- MAXIMUM (L,
R : UNSIGNED) return UNSIGNED
Description
Result subtype: SIGNED
Result: Returns the lesser of a SIGNED vector, L, and
an INTEGER, R.
Id: C.43
- MAXIMUM (L,
R : SIGNED) return SIGNED
Description
Result subtype: UNSIGNED
Result: Returns the greater of two UNSIGNED vectors that may be
of different lengths.
Id: C.44
- MAXIMUM (L : NATURAL;
R : UNSIGNED) return UNSIGNED
Description
Result subtype: SIGNED
Result: Returns the greater of two SIGNED vectors that may be
of different lengths.
Id: C.45
- MAXIMUM (L : INTEGER;
R : SIGNED) return SIGNED
Description
Result subtype: UNSIGNED
Result: Returns the greater of a nonnegative INTEGER, L, and
an UNSIGNED vector, R.
Id: C.46
- MAXIMUM (L : UNSIGNED;
R : NATURAL) return UNSIGNED
Description
Result subtype: SIGNED
Result: Returns the greater of an INTEGER, L, and a SIGNED
vector, R.
Id: C.47
- MAXIMUM (L : SIGNED;
R : INTEGER) return SIGNED
Description
Result subtype: UNSIGNED
Result: Returns the greater of an UNSIGNED vector, L, and
a nonnegative INTEGER, R.
Id: C.48
- SHIFT_LEFT (ARG : UNSIGNED;
COUNT : NATURAL) return UNSIGNED
Description
Result subtype: BIT
Result: Computes "L /= R" where L is an SIGNED vector and
R is an INTEGER.
Shift and Rotate Functions
Id: S.1
- SHIFT_RIGHT (ARG : UNSIGNED;
COUNT : NATURAL) return UNSIGNED
Description
Result subtype: UNSIGNED(ARG'LENGTH-1 downto 0)
Result: Performs a shift-left on an UNSIGNED vector COUNT times.
The vacated positions are filled with Bit '0'.
The COUNT leftmost bits are lost.
Id: S.2
- SHIFT_LEFT (ARG : SIGNED;
COUNT : NATURAL) return SIGNED
Description
Result subtype: UNSIGNED(ARG'LENGTH-1 downto 0)
Result: Performs a shift-right on an UNSIGNED vector COUNT times.
The vacated positions are filled with Bit '0'.
The COUNT rightmost bits are lost.
Id: S.3
- SHIFT_RIGHT (ARG : SIGNED;
COUNT : NATURAL) return SIGNED
Description
Result subtype: SIGNED(ARG'LENGTH-1 downto 0)
Result: Performs a shift-left on a SIGNED vector COUNT times.
The vacated positions are filled with Bit '0'.
The COUNT leftmost bits are lost.
Id: S.4
- ROTATE_LEFT (ARG : UNSIGNED;
COUNT : NATURAL) return UNSIGNED
Description
Result subtype: SIGNED(ARG'LENGTH-1 downto 0)
Result: Performs a shift-right on a SIGNED vector COUNT times.
The vacated positions are filled with the leftmost bit, ARG'LEFT.
The COUNT rightmost bits are lost.
Id: S.5
- ROTATE_RIGHT (ARG : UNSIGNED;
COUNT : NATURAL) return UNSIGNED
Description
Result subtype: UNSIGNED(ARG'LENGTH-1 downto 0)
Result: Performs a rotate-left of an UNSIGNED vector COUNT times.
Id: S.6
- ROTATE_LEFT (ARG : SIGNED;
COUNT : NATURAL) return SIGNED
Description
Result subtype: UNSIGNED(ARG'LENGTH-1 downto 0)
Result: Performs a rotate-right of an UNSIGNED vector COUNT times.
Id: S.7
- ROTATE_RIGHT (ARG : SIGNED;
COUNT : NATURAL) return SIGNED
Description
Result subtype: SIGNED(ARG'LENGTH-1 downto 0)
Result: Performs a logical rotate-left of a SIGNED vector COUNT times.
Id: S.8
- RESIZE (ARG : SIGNED;
NEW_SIZE : NATURAL) return SIGNED
Description
Result subtype: SIGNED(ARG'LENGTH-1 downto 0)
Result: SHIFT_RIGHT(ARG, COUNT)
RESIZE Functions
Id: R.1
- RESIZE (ARG : UNSIGNED;
NEW_SIZE : NATURAL) return UNSIGNED
Description
Result subtype: SIGNED(NEW_SIZE-1 downto 0)
Result: Resizes the SIGNED vector ARG to the specified size.
To create a larger vector, the new [leftmost] bit positions
are filled with the sign bit (ARG'LEFT). When truncating,
the sign bit is retained along with the rightmost part.
Id: R.2
- RESIZE (ARG,
SIZE_RES : UNSIGNED) return UNSIGNED
Description
Result subtype: UNSIGNED(NEW_SIZE-1 downto 0)
Result: Resizes the UNSIGNED vector ARG to the specified size.
To create a larger vector, the new [leftmost] bit positions
are filled with '0'. When truncating, the leftmost bits
are dropped.
- RESIZE (ARG,
SIZE_RES : SIGNED) return SIGNED
Description
Result subtype: UNRESOLVED_UNSIGNED (SIZE_RES'length-1 downto 0)
- TO_INTEGER (ARG : UNSIGNED) return NATURAL
Description
Result subtype: UNRESOLVED_SIGNED (SIZE_RES'length-1 downto 0)
Conversion Functions
Id: D.1
- TO_INTEGER (ARG : SIGNED) return INTEGER
Description
Result subtype: NATURAL. Value cannot be negative since parameter is an
UNSIGNED vector.
Result: Converts the UNSIGNED vector to an INTEGER.
Id: D.2
- TO_UNSIGNED (ARG,
SIZE : NATURAL) return UNSIGNED
Description
Result subtype: INTEGER
Result: Converts a SIGNED vector to an INTEGER.
Id: D.3
- TO_SIGNED (ARG : INTEGER;
SIZE : NATURAL) return SIGNED
Description
Result subtype: UNSIGNED(SIZE-1 downto 0)
Result: Converts a nonnegative INTEGER to an UNSIGNED vector with
the specified size.
Id: D.4
- TO_UNSIGNED (ARG : NATURAL;
SIZE_RES : UNSIGNED) return UNSIGNED
Description
Result subtype: SIGNED(SIZE-1 downto 0)
Result: Converts an INTEGER to a SIGNED vector of the specified size.
- TO_SIGNED (ARG : INTEGER;
SIZE_RES : SIGNED) return SIGNED
Description
Result subtype: UNRESOLVED_UNSIGNED(SIZE_RES'length-1 downto 0)
- to_ostring (value : UNSIGNED) return STRING
- to_ostring (value : SIGNED) return STRING
- to_hstring (value : UNSIGNED) return STRING
- to_hstring (value : SIGNED) return STRING
- READ (L : inout LINE;
VALUE : out UNSIGNED;
GOOD : out BOOLEAN) return ()
- READ (L : inout LINE;
VALUE : out UNSIGNED) return ()
- READ (L : inout LINE;
VALUE : out SIGNED;
GOOD : out BOOLEAN) return ()
- READ (L : inout LINE;
VALUE : out SIGNED) return ()
- WRITE (L : inout LINE;
VALUE : in UNSIGNED;
JUSTIFIED : in SIDE := right;
FIELD : in WIDTH := 0) return ()
- WRITE (L : inout LINE;
VALUE : in SIGNED;
JUSTIFIED : in SIDE := right;
FIELD : in WIDTH := 0) return ()
- OREAD (L : inout LINE;
VALUE : out UNSIGNED;
GOOD : out BOOLEAN) return ()
- OREAD (L : inout LINE;
VALUE : out SIGNED;
GOOD : out BOOLEAN) return ()
- OREAD (L : inout LINE;
VALUE : out UNSIGNED) return ()
- OREAD (L : inout LINE;
VALUE : out SIGNED) return ()
- HREAD (L : inout LINE;
VALUE : out UNSIGNED;
GOOD : out BOOLEAN) return ()
- HREAD (L : inout LINE;
VALUE : out SIGNED;
GOOD : out BOOLEAN) return ()
- HREAD (L : inout LINE;
VALUE : out UNSIGNED) return ()
- HREAD (L : inout LINE;
VALUE : out SIGNED) return ()
- OWRITE (L : inout LINE;
VALUE : in UNSIGNED;
JUSTIFIED : in SIDE := right;
FIELD : in WIDTH := 0) return ()
- OWRITE (L : inout LINE;
VALUE : in SIGNED;
JUSTIFIED : in SIDE := right;
FIELD : in WIDTH := 0) return ()
- HWRITE (L : inout LINE;
VALUE : in UNSIGNED;
JUSTIFIED : in SIDE := right;
FIELD : in WIDTH := 0) return ()
- HWRITE (L : inout LINE;
VALUE : in SIGNED;
JUSTIFIED : in SIDE := right;
FIELD : in WIDTH := 0) return ()