Operators in Bluespec SV
Date: 07/15/2005
Table
I : Operators for Bit-Vectors
S.No.
|
Operator
|
Description
|
Inputs
|
Outputs
|
Testcases Done
|
Comments
|
1
|
+
|
Unary: plus
|
Bit#(n) |
Bit#(n) |
|
|
2
|
-
|
Unary: minus
|
Bit#(n) |
Bit#(n) |
|
|
3
|
~ |
Unary: Bitwise Invert |
Bit#(n) |
Bit#(n)
|
|
|
4
|
& |
Unary: AND Reduction |
Bit#(n) |
bit
|
|
not implemented |
5
|
~& |
Unary: NAND Reduction |
Bit#(n) |
bit
|
|
not implemented |
6
|
| |
Unary: OR Reduction |
Bit#(n) |
bit
|
|
not implemented |
7
|
~| |
Unary: NOR Reduction |
Bit#(n) |
bit
|
|
not implemented |
8
|
^ |
Unary: XOR Reduction |
Bit#(n) |
bit
|
|
not implemented |
9
|
~^ OR ^~ |
Unary: XNOR Reduction |
Bit#(n) |
bit
|
|
not implemented |
10
|
<<
|
Unary:
Left Shift
|
Bit#(n) |
Bit#(n) |
|
|
11
|
>>
|
Unary:
Right Shift
|
Bit#(n) |
Bit#(n) |
|
|
12
|
+
|
Add |
Bit#(n) , Bit#(n) |
Bit#(n) |
|
|
13
|
-
|
Subtract
|
Bit#(n) , Bit#(n) |
Bit#(n) |
|
|
14
|
*
|
Multiply
|
Bit#(n) , Bit#(m) |
Bit#(n+m)
|
|
|
15
|
/
|
Divide
|
Bit#(n) , Bit#(n) |
Bit#(n) |
|
not implemented |
16
|
%
|
Modulus
|
Bit#(n) , Bit#(n) |
Bit#(n) |
|
not implemented |
17
|
<
|
Less than
|
Bit#(n) , Bit#(n) |
Bool
|
|
|
18
|
>
|
Greater than
|
Bit#(n) , Bit#(n) |
Bool
|
|
|
19
|
<=
|
Less than or Equal to
|
Bit#(n) , Bit#(n) |
Bool
|
|
|
20
|
>=
|
Greater than or Equal to |
Bit#(n) , Bit#(n) |
Bool
|
|
|
21
|
==
|
Equal to
|
Bit#(n) , Bit#(n) |
Bool
|
|
|
22
|
!=
|
NOT Equal to |
Bit#(n) , Bit#(n) |
Bool
|
|
|
23
|
&
|
Bitwise AND
|
Bit#(n) , Bit#(n) |
Bit#(n) |
|
|
24
|
^
|
Bitwise XOR |
Bit#(n) , Bit#(n) |
Bit#(n) |
|
|
25
|
~^ OR ^~
|
Bitwise Equivalence |
Bit#(n) , Bit#(n) |
Bool
|
|
|
26
|
|
|
Bitwise OR |
Bit#(n) , Bit#(n) |
Bit#(n)
|
|
|
Table
II: Operators for Booleans
S.No.
|
Operator
|
Description
|
Inputs
|
Outputs
|
Testcases Done |
Comments |
1
|
!
|
Unary:
NOT
|
Bool
|
Bool |
|
|
2
|
==
|
Equal
to
|
Bool ,
Bool |
Bool |
|
|
3
|
!=
|
NOT
Equal to
|
Bool ,
Bool |
Bool |
|
|
4
|
&&
|
AND
|
Bool ,
Bool |
Bool |
|
|
5
|
||
|
OR
|
Bool ,
Bool |
Bool |
|
|