|
The std_logic_arith
package in the ieee library includes a number of arithmetic and relational operators for use with SIGNED
and UNSIGNED
types. These operators are shown
below:
Type: | Operator: | Examples: | Description: |
---|---|---|---|
Arithmetic | +
|
a + b, +a |
addition subtraction multiplication |
Relational | < <= > >= = /= |
a < b a <= b a > b a >= b a = b a /= b |
less than less than or equal to greater than greater than or equal to equal to not equal to |
Operands in arithmetic and relational operations cannot have a greater width than the result. In arithmetic operations, one of the operands must have the same width as the result; the other is sign- or zero-extended. In relational operations, the result has a single bit. |
- PLDWorld - |
|
Created by chm2web html help conversion utility. |