ReductionTreeGenerator class
Reduction Tree Generator that produces a recursive tree computation inline so that the operation can access global signals.
Constructors
-
ReductionTreeGenerator.new(List<
Logic> sequence, Logic operation(List<Logic> inputs, {Logic? control, int depth, String name}), {int radix = 2, dynamic signExtend, int? depthBetweenFlops, Logic? control, Logic? clk, Logic? enable, Logic? reset}) -
Generate a tree based on dividing the input
sequence
of a node into segments, recursively constructingradix
child nodes to operate on each segment.
Properties
- clk → Logic?
-
Optional clk input to create pipeline.
final
- control → Logic?
-
Optional control input to input to operation.
final
- controlOut ↔ Logic?
-
The control output of the tree computation.
latefinal
- depth → int
-
The depth of the tree from the output to the leaves.
no setter
- depthBetweenFlops → int?
-
Specified depth of nodes at which to flop (requires clk).
final
- enable → Logic?
-
Optional enable input to enable pipeline.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- latency → int
-
The number of flops from the output to the leaves.
no setter
-
operation
→ Logic Function(List<
Logic> inputs, {Logic? control, int depth, String name}) -
Operation to be performed at each node. Note that operation can widen
the output. The logic function must support the operation for 2 and up to
radix inputs. The depth input is the depth of the current node in the
tree to the leaves. For sequences that are not powers of radix, the
depth is the maximum depth to the leaves from this node in the tree. The
depth can be used to index the control Logic to change behavior at
each depth of the tree.
final
- out ↔ Logic
-
The final output of the tree computation.
latefinal
- radix → int
-
Specified width of input to each reduction node (e.g., binary: radix=2)
final
- reset → Logic?
-
Optional reset input to reset pipeline.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sequence
↔ List<
Logic> -
The input sequence
latefinal
- signExtensionParameter ↔ StaticOrRuntimeParameter
-
Configuration for signed extension of values in the tree.
latefinal
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited