PartialProductGenerator class abstract
A PartialProductGenerator class that generates a set of partial products. Essentially a set of shifted rows of Logic addends generated by Booth recoding and manipulated by sign extension, before being compressed
- Inheritance
-
- Object
- PartialProductArray
- PartialProductGenerator
- Implementers
Constructors
- PartialProductGenerator(Logic multiplicand, Logic multiplier, RadixEncoder radixEncoder, {bool signed = false, Logic? selectSigned})
- Construct a PartialProductGenerator -- the partial product matrix
Properties
- encoder ↔ MultiplierEncoder
-
Encoder for the full multiply operand
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSignExtended ↔ bool
-
Used to avoid sign extending more than once
getter/setter pair
- multiplicand → Logic
-
The multiplicand term
no setter
- multiplier → Logic
-
The multiplier term
no setter
-
partialProducts
↔ List<
List< Logic> > -
Partial Products output. Generated by selector and extended by sign
extension routines
latefinalinherited
- rows → int
-
rows of partial products
no setterinherited
-
rowShift
→ List<
int> -
The actual shift in each row. This value will be modified by the
sign extension routine used when folding in a sign bit from another
row
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selector ↔ MultiplicandSelector
-
Selector for the multiplicand which uses the encoder to index into
multiples of the multiplicand and generate partial products
latefinal
- selectSigned ↔ Logic?
-
If not null, use this signal to select between signed and unsigned
operation.
latefinal
- shift → int
-
Get the shift increment between neighboring product rows
no setter
- signed ↔ bool
-
Operands are signed
latefinal
Methods
-
addStopSign(
List< Logic> addend, SignBit sign) → void -
Helper function for sign extension routines:
For signed operands, set the MSB to
sign
, otherwise add thissign
bit. -
addStopSignFlip(
List< Logic> addend, SignBit sign) → void -
Helper function for sign extension routines:
For signed operands, flip the MSB, otherwise add this
sign
bit. -
getAbsolute(
int row, int col) → Logic -
Return the Logic at the absolute position (
row
,col
).inherited -
getAbsoluteAll(
int row, List< int> columns) → List<Logic> -
Return the List
at the absolute position ( row
, Listcolumns
.inherited -
insertAbsolute(
int row, int col, Logic val) → void -
Set a Logic
val
at the absolute position (row
,col
)inherited -
insertAbsoluteAll(
int row, int col, List< Logic> list) → void -
Set the values of the row, starting at absolute position (
row
,col
) to thelist
of valuesinherited -
maxWidth(
) → int -
Return the actual largest width of all rows
inherited
-
muxAbsolute(
int row, int col, Logic condition, Logic val) → void -
Mux the Logic at absolute position (
row
,col
) conditionally bycondition
toval
.inherited -
muxAbsoluteAll(
int row, int col, Logic condition, List< Logic> list) → void -
Mux the range of values into the row starting at absolute position
(
row
,col
) usingcondition
to select the new valueinherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAbsolute(
int row, int col, Logic val) → void -
Set the Logic at absolute position (
row
,col
) toval
.inherited -
setAbsoluteAll(
int row, int col, List< Logic> list) → void -
Set the range at absolute position (
row
,col
) tolist
.inherited -
signExtend(
) → void - Perform sign extension (defined in child classes)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited