memoryLayeredMinSumLdpcDecoderCoreFunctor function

LdpcDecoderCoreFunctor memoryLayeredMinSumLdpcDecoderCoreFunctor({
  1. required int parallelism,
  2. required int maxIterations,
  3. int normalizationNumerator = 1,
  4. int normalizationShift = 0,
  5. int offset = 0,
  6. QcLdpcDecoderStateFunctor stateFunctor = registerQcLdpcDecoderStateFunctor,
})

Builds a synchronous-memory-backed layered QC-LDPC decoder functor.

Implementation

LdpcDecoderCoreFunctor memoryLayeredMinSumLdpcDecoderCoreFunctor({
  required int parallelism,
  required int maxIterations,
  int normalizationNumerator = 1,
  int normalizationShift = 0,
  int offset = 0,
  QcLdpcDecoderStateFunctor stateFunctor = registerQcLdpcDecoderStateFunctor,
}) =>
    LdpcDecoderCoreFunctor(
      identity: 'memoryLayeredMinSumP${parallelism}I${maxIterations}_'
          'A${normalizationNumerator}S${normalizationShift}O${offset}_'
          '${stateFunctor.identity}',
      contract: LdpcDecoderContract.minSum(
        schedule: LdpcDecoderScheduleKind.layered,
        stateStorage: LdpcDecoderStateStorageKind.synchronousMemory,
        maximumIterations: maxIterations,
        checkParallelism: parallelism,
      ),
      build: <Input extends Logic, Output extends Logic>({
        required clk,
        required reset,
        required code,
        required llrWidth,
        required accept,
        required inputFrame,
        required resultSchema,
        required consumeResult,
        required name,
      }) {
        if (code is! QcLdpcCode) {
          throw ArgumentError.value(
            code,
            'code',
            'The memory-backed layered implementation requires QcLdpcCode.',
          );
        }
        return QcLdpcMemoryLayeredMinSumDecoderCore<Input, Output>(
          clk: clk,
          reset: reset,
          code: code,
          schedule: QcLdpcLayerSchedule(code: code, parallelism: parallelism),
          llrWidth: llrWidth,
          maxIterations: maxIterations,
          accept: accept,
          inputFrame: inputFrame,
          resultSchema: resultSchema,
          consumeResult: consumeResult,
          normalizationNumerator: normalizationNumerator,
          normalizationShift: normalizationShift,
          offset: offset,
          stateFunctor: stateFunctor,
          name: name,
        );
      },
    );