Implements an adder-subtractor that operates on bit patterns. AddSub nodes may be cascaded and pipelined to achieve higher throughput rates. This node supports scalar Boolean values, arrays of Boolean values, and scalar values of integer and fixed-point data types.
carry in/inverted borrow in
A Boolean that determines whether this node accounts for an additional LSB. For example, the LSB could come from the bit pattern of the carry out/inverted borrow out output of an upstream AddSub node. If sub? is FALSE and carry in/inverted borrow in is TRUE, this node adds one extra LSB to x + y. If sub? is TRUE and carry in/inverted borrow in is FALSE, this function subtracts one extra LSB from x – y.
A Boolean that determines whether this node ignores the value you wire to x. Use this Boolean to remove x from the expression this node calculates. For example, use this Boolean to return –y instead of x – y.
A Boolean that determines whether this node performs subtraction or addition. Use this Boolean to change the operation of this node programmatically.
||The node calculates x - y.
||The node calculates x + y.
An input to this node. If x is a fixed-size Boolean array, the first array element represents the least-significant bit (LSB) and the last element represents the most-significant bit (MSB).
An input to this node. If y is a fixed-size Boolean array, the first array element represents the LSB and the last element represents the MSB.
A Boolean that indicates if the theoretical computed value of the sum exceeds the valid range of the data type of the sum.
||This function wraps the value of sum.
||This function does not wrap the value of sum.
If you cascade functions, you must use unsigned functions in the intermediate operations. Then set the encoding of the final function to the encoding you want for the entire cascaded operation.
The result this node computes. The result depends on not only the values of x and y, but also the values of any Boolean inputs. This node applies the Wrap overflow mode to sum in the following situations: sub? is TRUE and carry out/inverted borrow out returns FALSE, sub? is FALSE and carry out/inverted borrow out returns TRUE.