decodeWord method
- Logic protectedWord
Decodes a packed protected word one lane at a time.
Implementation
Logic decodeWord(Logic protectedWord) {
if (protectedWord.width != protectedWidth) {
throw RohdHclException(
'Protected word width must equal $protectedWidth bits.');
}
final bits = protectedWord.packed;
final lanes = [
for (var lane = 0; lane < laneCount; lane++)
laneCodec.decode(bits.slice((lane + 1) * laneCodec.protectedWidth - 1,
lane * laneCodec.protectedWidth)),
];
return lanes.reversed.toList().concat();
}