minAddrBits method
Method to determine the minimum number of address bits needed to address all registers across all blocks. This is based on the maximum block base address. Note that we independently validate the block offset width relative to the base addresses so we can trust the simpler analysis here.
Implementation
int minAddrBits() {
var maxAddr = 0;
for (final block in blocks) {
if (block.baseAddr > maxAddr) {
maxAddr = block.baseAddr;
}
}
return maxAddr.bitLength;
}