Class: AddSub

AddSub(control, wordIn1, wordIn2, cIn)

Takes in two arrays of Tri objects and a carry in VALUE and computes the result and carry out value of addition or substraction depending on the setting of the control signal.

Constructor

new AddSub(control, wordIn1, wordIn2, cIn)

Create a new AddSub device with the specified input busses, carry in
Parameters:
Name Type Description
control Tri
wordIn1 IOBus
wordIn2 IOBus
cIn Tri
Properties:
Name Type Description
cIn Tri the carry in VALUE
adder WordAdder the internal adder device
control Tri the control signal for addition or subtraction
carry Tri the carry out VALUE
Source:

Extends

Classes

AddSub

Methods

compute()

Compute the result of the addition or subtraction of the two input busses with carries
Source: