|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Number
byucc.jhdl.base.BV
Copyright (c) 1999-2000 Brigham Young University. All rights reserved. Reproduction in whole or in part in any form or medium without express permission of Brigham Young University is prohibited.
This class defines a structure that represents legal values for wires. Each BitVector (BV) has both a width and a value. In addition, a variety of methods are provided for manipulation of BVs.
In general, the constructors are of the form:
BV(width, value [, sign_ext]).
width must be a positive integer, or a BVException is thrown.
value can be a boolean, byte, char, short, int, long, low-endian int[]
(that is, the least significant bits are in slot [0]), String, BigInteger, or BV.
If value is wider than width, only the least significant bits will
be used; if width is wider, the most significant bits will be set according
to sign_ext.
sign_ext can be ZERO_PAD or SIGN_EXT, constants
inherited by extending Cell. ZERO_PAD will set all bits beyond those
provided to 0, SIGN_EXT will set all extra bits to the value of the
most significant bit provided. When not provided, default behavior of the
constructors is to ZERO_PAD.
String constructors have some minor differences. width may be
the constant DETERMINE_FROM_STRING, or it may be omitted in which
case it defaults to DETERMINE_FROM_STRING. This constant will set
the width according to the number of bits per character of binary, octal, or
hexadecimal strings, or to the minimum number of bits needed for a decimal
string to be represented in 2's-complement. The String will be parsed as a
decimal string unless prefixed with "0b" for binary, "0o" for octal, or "0x" for
hexadecimal, but is not case sensitive. If a String is decimal, it is explicitly
signed by the presence or absence of '-' at the beginning of the string, and
in that case the flag sign_ext has no meaning. Whitespace in the string
is ignored. If a String cannot be parsed, a NumberFormatException is thrown.
Additionally, the constructor BV(BV vector) is valid, simply cloning
the vector. The constructors BV(BV bv1, BV bv2 [, BV bv3 [, BV bv4]])
and BV(BV[] array) concatenate the given BVs, with the first one listed
providing the least significant bits. The constructor BV(int width)
creates a BV with value 0. The constructor BV() creates a BV with width
1 and value 0. The constructor BV(Wire w) creates a BV with the width
of the wire and value 0.
Once a BV has been constructed, it can be modified directly with the method
setValue([width,] value [, sign_ext]).
Here, the parameters behave the same as in the constructors, except that
width is optional and value required. If width is not
specified, the BV does not change in width from its previous value, even when
value is a String. In order to have different type signatures,
setValue(int, boolean) treats the int as the value and the boolean
as the sign_ext parameter - in order to interpret the int as the width and set
a boolean value, a second boolean for sign_ext must be included.
The width of a BV can be modified by
setWidth(width [, sign_ext]).
If width is greater than the prior width, the new bits are set according
to sign_ext, defaulting to ZERO_PAD if not specified.
Also, setWidth(Wire w [, sign_ext]) sets the width to that
of the wire argument.
Additionally, the methods
setValue(BV bv1, BV bv2 [, BV bv3 [, BV bv4]]) and
setValue(BV[] array) concatenate the given BVs, with the first one
providing the least significant bits of the new BV.
All operator methods are static, and return a BV. Each operator is of the form:
operator([width, ] arglist [, output]).
When width is specified, the output will be that width, otherwise, it
will be the width of output or the default as determined by the operation.
When output is specified, it is modified to get the result of the
operation, and is returned for chaining or nesting operations. When output
is not specified, a new BV is created with the result and returned, available for
assignment.
Caution should be excercised in assigning output to a variable when output
is specified, because multiple references to the same BV could lead to data corruption.
See the individual operations for information on default width, and for the syntax of arglist. In general, arglist is a single BV for unary operators, and two BVs for binary.
Most operations also have an optional sign_ext flag as the last argument. In general, this flag determines whether an operation will be signed or unsigned, and whether the arguments and result will be sign-extended or zero-padded. See the operation in question to determine the behavior of the method with or without the use of this flag, when it is supported.
Arithmetic operators include add, incr (increment),
sub, decr (decrement), abs (absolute value),
negate, mult (multiply), div (divide),
mod (modulus), pow (exponentiation), max,
and min. Note that pow takes an int, not a BV, as the
argument for the exponent, and that illegal math operations, like division by
0, throw an ArithmeticException.
Boolean operators include and, or, not,
xor, nand, nor, xnor. Shift
operators include shiftRight, shiftLeft,
barrelShiftRight, and barrelShiftLeft. Note that the
shift operations take an int, not a BV, as the argument for shift amount, and that
a negative shift amount simply shifts in the opposite direction. The operator
reverse simply reverses the bit order from most to least significant.
These instance methods return a boolean for comparison to 0:
negative, positive, zero.
equals(Object obj) overrides Object.equals for strict equality (both
width and value are identical), and is accompanied by hashCode()
to allow HashTables of BVs. signum returns -1 if the value is
negative, 0 if it is zero, or 1 if it is positive, as a 2's-complement number.
compare(BV bv2 [, sign_ext]) returns -1 if the bound
instance is less than the argument, 0 if equal, and 1 if greater, with
sign_ext determining whether the comparisons are signed or unsigned.
In addition, the following comparison methods exist in both an instance
(where the bound reference is compared to the first argument) and a static
(where the first argument is compared to the second) version, returning
true if and only if the relation is satisfied: lt
(less than), gt (greater than), lteq (less than or
equal), gteq (greater than or equal), eq (equal in
value, not necessarily width), and neq (not equal). Again, the
presence of the optional flag sign_ext determines whether to perform
signed or unsigned comparison.
The method stringBitWidth(String, [boolean]) returns the minimum
number of bits needed to represent the string as a BV, either including or
ignoring leading 0 bits in the string.
The following instance methods allow read access to the width and arbitrary
portions of the value: getWidth, getBit,
upperBits, lowerBits, and range.
In addition, these instance methods allow write access to an arbitrary subset
of an existing BV: setBit, setBits, clearBit,
clearBits, toggleBit, toggleBits, and
setRange. See the individual methods for more information on the
argument types, but the return value is the updated BV except for getBit.
In general, attempts to access bits out of the boundaries of the width will
throw a BVException.
Further methods for obtaining information about a BV are getLSBOn,
getMSBOff, getLSBOn, getLSBOff,
getOnCount, and getOffCount. Also, the method
clone() overrides that of Object, and returns a clone as type Object.
The following methods override Number, and provide a way to convert a BV
to native types (although the conversion may lose precision): byteValue,
shortValue, intValue, longValue,
floatValue, and doubleValue.
These methods also convert a BV to various types, and accept the optional
argument sign_ext of whether or not to sign-extend smaller BVs into
the return type: toBoolean, toByte, toShort,
toChar, toInt, toLong, toArray
(a low-endian int[], where the lsb is in slot [0]). Formatted String conversion is
provided with toBinaryString, toDecimalString, and
toHexString.
The method toString overrides Object, and displays the width
of the BV inside parentheses, before the value in hexadecimal, spaced every
8 characters for legibility.
| Field Summary | |
protected static int |
BYTE_MASK
Mask the size of bytes within ints. |
static int |
DETERMINE_FROM_STRING
Set the width according to the number of bits required to represent the String. |
protected static long |
INT_MASK
Mask the size of ints within longs. |
protected boolean |
is_signed
Shows if the BV is signed or unsigned |
protected static int |
SHORT_MASK
Mask the size of shorts within ints. |
static boolean |
SIGN_EXT
Set any bits beyond those provided to the value of the most significant bit provided. |
static boolean |
SIGNED
Perform a mathematical operation by treating the arguments as signed. |
static boolean |
UNSIGNED
Perform a mathematical operation by treating the arguments as unsigned. |
protected int[] |
value
The value, low-endian (bits 31:0 in slot [0]). |
protected int |
width
The width of the BV |
static boolean |
ZERO_PAD
Set any bits beyond those provided to 0. |
| Constructor Summary | |
BV()
Creates an unsigned BV of width 1 and value 0. |
|
BV(java.math.BigInteger value)
Creates an unsigned BV of width value.bitLength() from the BigInteger. |
|
BV(BV vector)
Creates a BV of identical width (short for (BV)clone()). |
|
BV(BV[] bv_array)
Creates a BV by concatenating the given BVs, with the BV in slot 0 providing the least significant bits. |
|
BV(BV bv1,
BV bv2)
Creates a BV by concatenating the given BVs, with the first argument providing the least significant bits. |
|
BV(BV bv1,
BV bv2,
BV bv3)
Creates a BV by concatenating the given BVs, with the first argument providing the least significant bits. |
|
BV(BV bv1,
BV bv2,
BV bv3,
BV bv4)
Creates a BV by concatenating the given BVs, with the first argument providing the least significant bits. |
|
BV(int width)
Creates an unsigned BV of specified width and value 0. |
|
BV(int width,
java.math.BigInteger value)
Creates an unsigned BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
java.math.BigInteger value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and signed flag set as indicated by sign_ext. |
|
BV(int width,
boolean value)
Creates an unsigned BV of arbitrary width, set to true (1) or false (0). |
|
BV(int width,
boolean value,
boolean sign_ext)
Creates a BV of arbitrary width, set to true or false. |
|
BV(int width,
BV vector)
Creates a BV of arbitrary width, with zero-padding or sign extension as determined by the signed flag of the original BV. |
|
BV(int width,
BV vector,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and setting the signed flag of the new BV as indicated by sign_ext. |
|
BV(int width,
byte value)
Creates an unsigned BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
byte value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and signed flag set as necessary. |
|
BV(int width,
char value)
Creates an unsigned BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
char value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and signed flag set as necessary. |
|
BV(int width,
int value)
Creates a BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
int[] value)
Creates a BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
int[] value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and signed flag set as necessary. |
|
BV(int width,
int value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and signed flag set as necessary. |
|
BV(int width,
long value)
Creates a BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
long value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and signed flag set as necessary. |
|
BV(int width,
short value)
Creates a BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
short value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension and signed flag set as necessary. |
|
BV(int width,
java.lang.String value)
Creates an unsigned BV of arbitrary width, with zero-padding as necessary. |
|
BV(int width,
java.lang.String value,
boolean sign_ext)
Creates a BV of arbitrary width, with appropriate sign extension as necessary. |
|
BV(java.lang.String value)
Creates an unsigned BV of width DETERMINE_FROM_STRING. |
|
BV(Wire w)
Creates an unsigned BV with value 0 and width of the wire argument. |
|
| Method Summary | |
static BV |
abs(BV in)
Returns a new BV with the absolute value of the argument, with default width. |
static BV |
abs(BV in,
BV out)
Changes the value of out to the absolute value of the argument, with default width. |
static BV |
abs(int width,
BV in)
Returns a new BV with the absolute value of the argument, with specified width. |
static BV |
abs(int width,
BV in,
BV out)
Changes the value of out to the absolute value of the argument, with specified width. |
static BV |
add(BV in1,
BV in2)
Returns a new BV containing the sum of in1 and in2 with default width. |
static BV |
add(BV in1,
BV in2,
boolean sign_ext)
Returns a new BV containing the sum of in1 and in2 with default width. |
static BV |
add(BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV containing the sum of in1 and in2 with default width. |
static BV |
add(BV in1,
BV in2,
BV out)
Changes value of out to the sum of in1 and in2, keeping existing width. |
static BV |
add(BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes value of out to the sum of in1 and in2, keeping existing width. |
static BV |
add(BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes value of out to the sum of in1 and in2, keeping existing width. |
static BV |
add(int width,
BV in1,
BV in2)
Returns a new BV containing the sum of in1 and in2 with specified width. |
static BV |
add(int width,
BV in1,
BV in2,
boolean sign_ext)
Returns a new BV containing the sum of in1 and in2 with specified width. |
static BV |
add(int width,
BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV containing the sum of in1 and in2 with specified width. |
static BV |
add(int width,
BV in1,
BV in2,
BV out)
Changes value of out to the sum of in1 and in2, resizing out to specified width. |
static BV |
add(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes value of out to the sum of in1 and in2, resizing out to specified width. |
static BV |
add(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes value of out to the sum of in1 and in2, resizing out to specified width. |
static BV |
and(BV in1,
BV in2)
Returns boolean and of the two arguments, with default width. |
static BV |
and(BV in1,
BV in2,
boolean sign_ext)
Returns boolean and of the two arguments, with default width. |
static BV |
and(BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns boolean and of the two arguments, with default width. |
static BV |
and(BV in1,
BV in2,
BV out)
Changes value of out to the boolean and of the two arguments, with original width. |
static BV |
and(BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes value of out to the boolean and of the two arguments, with original width. |
static BV |
and(BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes value of out to the boolean and of the two arguments, with original width. |
static BV |
and(int width,
BV in1,
BV in2)
Returns boolean and of the two arguments, with specified width. |
static BV |
and(int width,
BV in1,
BV in2,
boolean sign_ext)
Returns boolean and of the two arguments, with specified width. |
static BV |
and(int width,
BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns boolean and of the two arguments, with specified width. |
static BV |
and(int width,
BV in1,
BV in2,
BV out)
Changes value of out to the boolean and of the two arguments, with specified width. |
static BV |
and(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes value of out to the boolean and of the two arguments, with specified width. |
static BV |
and(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes value of out to the boolean and of the two arguments, with specified width. |
static BV |
barrelShiftLeft(BV in,
int amt)
Barrel shifts the BV left (moves bits from left end to the right) by amt places. |
static BV |
barrelShiftLeft(BV in,
int amt,
BV out)
Barrel shifts the BV left (moves bits from left end to the right) by amt places. |
static BV |
barrelShiftRight(BV in,
int amt)
Barrel shifts the BV right (moves bits from right end to the left) by amt places. |
static BV |
barrelShiftRight(BV in,
int amt,
BV out)
Barrel shifts the BV right (moves bits from right end to the left) by amt places. |
byte |
byteValue()
Returns the least significant 8 bits of the BV, zero-padded or sign-extended if needed as indicated by the signed flag. |
BV |
clearBit(int pos)
Clears value of bit in given position to 0. |
BV |
clearBits(int upper,
int lower)
Clears value of a range of bits to 0. |
java.lang.Object |
clone()
Returns a clone of this. |
int |
compare(BV bv2)
Returns integer representing relation between two bit vectors, default is sign extension if signed flag is set. |
int |
compare(BV bv2,
boolean sign_ext)
Returns integer representing relation between two bit vectors, according to sign_ext. |
static int |
compare(BV bv1,
BV bv2)
Returns integer representing relation between two bit vectors, default of sign extension. |
static int |
compare(BV bv1,
BV bv2,
boolean sign_ext)
Returns integer representing relation between two bit vectors, according to sign_ext. |
static int |
compare(BV bv1,
BV bv2,
boolean sign_ext1,
boolean sign_ext2)
Returns integer representing relation between two bit vectors, according to sign_ext. |
static BV |
decr(BV in)
Returns a new BV with value 1 less than in and default width. |
static BV |
decr(BV in,
boolean sign_ext)
Returns a new BV with value 1 less than in and default width. |
static BV |
decr(BV in,
BV out)
Changes the value of out to be one more than the value of in. |
static BV |
decr(BV in,
BV out,
boolean sign_ext)
Changes the value of out to be one more than the value of in. |
static BV |
decr(int width,
BV in)
Returns a new BV with value 1 less than in and default width. |
static BV |
decr(int width,
BV in,
boolean sign_ext)
Returns a new BV with value 1 less than in and default width. |
static BV |
decr(int width,
BV in,
BV out)
Changes the value of out to be one more than the value of in. |
static BV |
decr(int width,
BV in,
BV out,
boolean sign_ext)
Changes the value of out to be one more than the value of in. |
static BV |
div(BV in1,
BV in2)
Returns a new BV containing the quotient of in1 and in2 with default width. |
static BV |
div(BV in1,
BV in2,
boolean sign_ext)
Returns a new BV containing the quotient of in1 and in2 with default width. |
static BV |
div(BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV containing the quotient of in1 and in2 with default width. |
static BV |
div(BV in1,
BV in2,
BV out)
Changes value of out to the quotient of in1 and in2, keeping existing width. |
static BV |
div(BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes value of out to the quotient of in1 and in2, keeping existing width. |
static BV |
div(BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes value of out to the quotient of in1 and in2, keeping existing width. |
static BV |
div(int width,
BV in1,
BV in2)
Returns a new BV containing the quotient of in1 and in2 with specified width. |
static BV |
div(int width,
BV in1,
BV in2,
boolean sign_ext)
Returns a new BV containing the quotient of in1 and in2 with specified width. |
static BV |
div(int width,
BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV containing the quotient of in1 and in2 with specified width. |
static BV |
div(int width,
BV in1,
BV in2,
BV out)
Changes value of out to the quotient of in1 and in2, resizing out to specified width. |
static BV |
div(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes value of out to the quotient of in1 and in2, resizing out to specified width. |
static BV |
div(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes value of out to the quotient of in1 and in2, resizing out to specified width. |
double |
doubleValue()
Returns the closest double to the integral value of the BV. |
boolean |
eq(BV bv2)
Returns true iff this == bv2. |
boolean |
eq(BV bv2,
boolean sign_ext)
Returns true iff this == bv2. |
static boolean |
eq(BV bv1,
BV bv2)
Returns true iff bv1 == bv2. |
static boolean |
eq(BV bv1,
BV bv2,
boolean sign_ext)
Returns true iff bv1 == bv2. |
static boolean |
eq(BV bv1,
BV bv2,
boolean sign_ext1,
boolean sign_ext2)
Returns true iff bv1 == bv2. |
boolean |
equals(java.lang.Object obj)
Returns true iff obj is equivalent to this. |
float |
floatValue()
Returns the closest float to the integral value of the BV. |
boolean |
getBit(int pos)
Returns value of bit in given position. |
boolean |
getIsSigned()
Retrieves the current status of the signed flag of the BV. |
int |
getLSBOff()
Returns the position of the first zero bit, starting from the least significant position. |
static int |
getLSBOff(BV bv)
Returns the position of the first zero bit, starting from the least significant position. |
int |
getLSBOn()
Returns the position of the first non-zero bit, starting from the least significant position. |
static int |
getLSBOn(BV bv)
Returns the position of the first non-zero bit, starting from the least significant position. |
int |
getMSBOff()
Returns the position of the first zero bit, starting from the most significant position. |
static int |
getMSBOff(BV bv)
Returns the position of the first zero bit, starting from the most significant position. |
int |
getMSBOn()
Returns the position of the first non-zero bit, starting from the most significant position. |
static int |
getMSBOn(BV bv)
Returns the position of the first non-zero bit, starting from the most significant position. |
int |
getOffCount()
Returns a count of the number of bits that are currently 0. |
static int |
getOffCount(BV bv)
Returns a count of the number of bits that are currently 0. |
int |
getOnCount()
Returns a count of the number of bits that are currently 1. |
static int |
getOnCount(BV bv)
Returns a count of the number of bits that are currently 1. |
int |
getWidth()
Retrieves the width of the BV. |
boolean |
gt(BV bv2)
Returns true iff this > bv2. |
boolean |
gt(BV bv2,
boolean sign_ext)
Returns true iff this > bv2. |
static boolean |
gt(BV bv1,
BV bv2)
Returns true iff bv1 > bv2. |
static boolean |
gt(BV bv1,
BV bv2,
boolean sign_ext)
Returns true iff bv1 > bv2. |
static boolean |
gt(BV bv1,
BV bv2,
boolean sign_ext1,
boolean sign_ext2)
Returns true iff bv1 > bv2. |
boolean |
gteq(BV bv2)
Returns true iff this >= bv2. |
boolean |
gteq(BV bv2,
boolean sign_ext)
Returns true iff this >= bv2. |
static boolean |
gteq(BV bv1,
BV bv2)
Returns true iff bv1 >= bv2. |
static boolean |
gteq(BV bv1,
BV bv2,
boolean sign_ext)
Returns true iff bv1 >= bv2. |
static boolean |
gteq(BV bv1,
BV bv2,
boolean sign_ext1,
boolean sign_ext2)
Returns true iff bv1 >= bv2. |
int |
hashCode()
Returns a hash of this. |
static BV |
incr(BV in)
Returns a new BV with value 1 greater than in and default width. |
static BV |
incr(BV in,
boolean sign_ext)
Returns a new BV with value 1 greater than in and default width. |
static BV |
incr(BV in,
BV out)
Changes the value of out to be one more than the value of in. |
static BV |
incr(BV in,
BV out,
boolean sign_ext)
Changes the value of out to be one more than the value of in. |
static BV |
incr(int width,
BV in)
Returns a new BV with value 1 greater than in and specified width. |
static BV |
incr(int width,
BV in,
boolean sign_ext)
Returns a new BV with value 1 greater than in and default width. |
static BV |
incr(int width,
BV in,
BV out)
Changes the value of out to be one more than the value of in. |
static BV |
incr(int width,
BV in,
BV out,
boolean sign_ext)
Changes the value of out to be one more than the value of in. |
protected BV |
initFromString(int width,
java.lang.String value,
boolean sign_ext)
|
protected boolean |
initWidth(int width)
|
int |
intValue()
Returns the least significant 32 bits of the BV, zero-padded or sign-extended if needed as indicated by the signed flag. |
long |
longValue()
Returns the least significant 64 bits of the BV, zero-padded or sign-extended if needed as indicated by the signed flag. |
BV |
lowerBits(int amount)
Returns a BV that has the present value and width of the specified amount of the least significant bits of this. |
BV |
lowerBits(int amount,
BV out)
Changes given BV to have the present value and width of the specified amount of the least significant bits of this. |
boolean |
lt(BV bv2)
Returns true iff this < bv2. |
boolean |
lt(BV bv2,
boolean sign_ext)
Returns true iff this < bv2. |
static boolean |
lt(BV bv1,
BV bv2)
Returns true iff bv1 < bv2. |
static boolean |
lt(BV bv1,
BV bv2,
boolean sign_ext)
Returns true iff bv1 < bv2. |
static boolean |
lt(BV bv1,
BV bv2,
boolean sign_ext1,
boolean sign_ext2)
Returns true iff bv1 < bv2. |
boolean |
lteq(BV bv2)
Returns true iff this <= bv2. |
boolean |
lteq(BV bv2,
boolean sign_ext)
Returns true iff this <= bv2. |
static boolean |
lteq(BV bv1,
BV bv2)
Returns true iff bv1 <= bv2. |
static boolean |
lteq(BV bv1,
BV bv2,
boolean sign_ext)
Returns true iff bv1 <= bv2. |
static boolean |
lteq(BV bv1,
BV bv2,
boolean sign_ext1,
boolean sign_ext2)
Returns true iff bv1 <= bv2. |
static void |
main(java.lang.String[] argv)
|
static BV |
max(BV in1,
BV in2)
Returns a new BV with the maximum value of the two arguments, with default width. |
static BV |
max(BV in1,
BV in2,
boolean sign_ext)
Returns a new BV with the maximum value of the two arguments, with default width. |
static BV |
max(BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV with the maximum value of the two arguments, with default width. |
static BV |
max(BV in1,
BV in2,
BV out)
Changes the value of out to the maximum value of the two arguments, with default width. |
static BV |
max(BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes the value of out to the maximum value of the two arguments, with default width. |
static BV |
max(BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes the value of out to the maximum value of the two arguments, with default width. |
static BV |
max(int width,
BV in1,
BV in2)
Returns a new BV with the maximum value of the two arguments, with specified width. |
static BV |
max(int width,
BV in1,
BV in2,
boolean sign_ext)
Returns a new BV with the maximum value of the two arguments, with specified width. |
static BV |
max(int width,
BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV with the maximum value of the two arguments, with specified width. |
static BV |
max(int width,
BV in1,
BV in2,
BV out)
Changes the value of out to the maximum value of the two arguments, with specified width. |
static BV |
max(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes the value of out to the maximum value of the two arguments, with specified width. |
static BV |
max(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes the value of out to the maximum value of the two arguments, with specified width. |
static BV |
min(BV in1,
BV in2)
Returns a new BV with the minimum value of the two arguments, with default width. |
static BV |
min(BV in1,
BV in2,
boolean sign_ext)
Returns a new BV with the minimum value of the two arguments, with default width. |
static BV |
min(BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV with the minimum value of the two arguments, with default width. |
static BV |
min(BV in1,
BV in2,
BV out)
Changes the value of out to the minimum value of the two arguments, with default width. |
static BV |
min(BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes the value of out to the minimum value of the two arguments, with default width. |
static BV |
min(BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes the value of out to the minimum value of the two arguments, with default width. |
static BV |
min(int width,
BV in1,
BV in2)
Returns a new BV with the minimum value of the two arguments, with specified width. |
static BV |
min(int width,
BV in1,
BV in2,
boolean sign_ext)
Returns a new BV with the minimum value of the two arguments, with specified width. |
static BV |
min(int width,
BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV with the minimum value of the two arguments, with specified width. |
static BV |
min(int width,
BV in1,
BV in2,
BV out)
Changes the value of out to the minimum value of the two arguments, with specified width. |
static BV |
min(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes the value of out to the minimum value of the two arguments, with specified width. |
static BV |
min(int width,
BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes the value of out to the minimum value of the two arguments, with specified width. |
static BV |
mod(BV in1,
BV in2)
Returns a new BV containing the modulus of in1 and in2 with default width. |
static BV |
mod(BV in1,
BV in2,
boolean sign_ext)
Returns a new BV containing the modulus of in1 and in2 with default width. |
static BV |
mod(BV in1,
BV in2,
boolean sign_ext1,
boolean sign_ext2)
Returns a new BV containing the modulus of in1 and in2 with default width. |
static BV |
mod(BV in1,
BV in2,
BV out)
Changes value of out to the modulus of in1 and in2, keeping existing width. |
static BV |
mod(BV in1,
BV in2,
BV out,
boolean sign_ext)
Changes value of out to the modulus of in1 and in2, keeping existing width. |
static BV |
mod(BV in1,
BV in2,
BV out,
boolean sign_ext1,
boolean sign_ext2)
Changes value of out to the modulus of in1 and in2, keeping existing width. |
static BV |
mod(int width,
BV in1,
BV in2)
Returns a new BV containing the modulus of in1 and in2 with specified width. |
static BV |
mod(int width,
BV in1,
BV in2,
boolean sign_ext)
Returns a new BV containing the modulus of in1 and in2 with specified width. |
static | |