Divider
Library: |
Arithmetic |
Introduced: |
2.0 Beta 22 |
Appearance: |
|
Behavior
This component divides two values coming in via the west inputs and
outputs the quotient on the east output. The component is designed so
that it can be cascaded with other dividers to provide support a
dividend with more bits than
is possible with a single divider: The upper input provides the
upper bitWidth bits of the dividend (if it is specified at
all), and the rem bits provide the remainder, which can be
fed as the upper input into another divider.
If the divisor is 0, then no division is performed (i.e., the divisor
is assumed to be 1).
The divider essentially performs unsigned division. That is, the
remainder will always be between 0 and divisor-1. The
quotient will always be an integer so that
quotient * divisor + remainder
= dividend .
If, however, the quotient does not fit into
bitWidth bits, then only the lower bitWidth bits
will be reported. The component does not provide any method for
accessing the upper bitWidth bits.
If either of the operands contains some floating bits or some error
bits, then the component's outputs will be either entirely floating or
entirely error values.
Pins
- West edge, north end (input, bit width matches Bit Width attribute)
- The lower bitWidth bits of the dividend (that is, the
first operand for the division).
- West edge, south end (input, bit width matches Bit Width attribute)
- The divisor (that is, the second operand for the division)
- North edge, labeled upper (input, bit width matches Bit
Width attribute)
- The upper bitWidth bits of the dividend (that is, the
first operand for the division).
- East edge (output, bit width matches Bit Width attribute)
- The lower bitWidth bits of the quotient, as specified
above.
- South edge, labeled rem (output, bit width 1)
- The remainder of the division. This value will always be between 0
and divisor-1.
Attributes
- Bit Width
- The bit width of the values to be divided and of the result.
Poke Tool Behavior
None.
Text Tool Behavior
None.
Back to Library Reference