Sum.ofLogics constructor
Computes a Sum across the provided logics
.
All logics
are always incrementing and controlled optionally by a single
enable
.
Implementation
factory Sum.ofLogics(
List<Logic> logics, {
dynamic initialValue = 0,
dynamic maxValue,
dynamic minValue = 0,
Logic? enable,
int? width,
bool saturates = false,
String name = 'sum',
}) =>
Sum(
logics
.map(
(e) => SumInterface(width: e.width, hasEnable: enable != null)
..amount.gets(e)
..enable?.gets(enable!))
.toList(),
initialValue: initialValue,
maxValue: maxValue,
minValue: minValue,
width: width,
saturates: saturates,
name: name);