splitSelectAdderAlgorithm4Bit static method
- int adderWidth
Adder ripple-carry block size computation algorithm.
Generates 4 bit carry-select blocks with 1st entry width adjusted down.
Return list of carry-ripple block sizes starting from
the LSB connected one.
adderWidth
is a whole width of adder.
Implementation
static List<int> splitSelectAdderAlgorithm4Bit(int adderWidth) {
final blockNb = (adderWidth / 4.0).ceil();
final firstBlockSize = adderWidth - (blockNb - 1) * 4;
final splitData = <int>[firstBlockSize];
for (var i = 1; i < blockNb; ++i) {
splitData.add(4);
}
return splitData;
}