minAddrBits method
Method to determine the minimum number of address bits needed to address all registers in the block. This is based on the maximum register address offset.
Implementation
int minAddrBits() {
var maxAddr = 0;
for (final reg in registers) {
if (reg.addr > maxAddr) {
maxAddr = reg.addr;
}
}
return maxAddr.bitLength;
}