ErrorCheckingTransmitter constructor
Creates a transmitter for data
.
Implementation
ErrorCheckingTransmitter(Logic data,
{required int codeWidth, required super.name, super.definitionName}) {
this.data = addInput('data', data, width: data.width);
addOutput('code', width: codeWidth);
addOutput('transmission', width: codeWidth + data.width) <=
[code, this.data].swizzle();
code <= calculateCode();
}