ParallelPrefixOrScan constructor

ParallelPrefixOrScan(
  1. Logic inp, {
  2. ParallelPrefix ppGen(
    1. List<Logic>,
    2. Logic (
      1. Logic,
      2. Logic
      )
    ) = KoggeStone.new,
  3. String name = 'parallel_prefix_orscan',
})

OrScan constructor

Implementation

ParallelPrefixOrScan(Logic inp,
    {ParallelPrefix Function(List<Logic>, Logic Function(Logic, Logic))
        ppGen = KoggeStone.new,
    super.name = 'parallel_prefix_orscan'}) {
  inp = addInput('inp', inp, width: inp.width);
  final u = ppGen(inp.elements, (a, b) => a | b);
  addOutput('out', width: inp.width) <= u.val.rswizzle();
}