getEncoding method
- int row
Retrieve the Booth encoding for the row
Implementation
RadixEncode getEncoding(int row) {
if (row >= rows) {
throw RohdHclException('row $row is not < number of encoding rows $rows');
}
final base = row * (_sliceWidth - 1);
final multiplierSlice = [
if (row > 0)
_extendedMultiplier.slice(base + _sliceWidth - 2, base - 1)
else
[_extendedMultiplier.slice(base + _sliceWidth - 2, base), Const(0)]
.swizzle()
];
return _encoder.encode(multiplierSlice.first);
}