CompressTerm constructor

CompressTerm(
  1. CompressTermType type,
  2. Logic logic,
  3. List<CompressTerm> inputs,
  4. int row,
  5. int col,
)

CompressTerm constructor

Implementation

CompressTerm(this.type, this.logic, this.inputs, this.row, this.col) {
  delay = 0.0;
  final deltaDelay = switch (type) {
    CompressTermType.carry => carryDelay,
    CompressTermType.sum => sumDelay,
    CompressTermType.pp => 0.0
  };
  for (final i in inputs) {
    if (i.delay + deltaDelay > delay) {
      delay = i.delay + deltaDelay;
    }
  }
}