getBackdoorPortsByName method
Accessor to the backdoor ports of a particular register reg
within the block block
.
Implementation
CsrBackdoorInterface getBackdoorPortsByName(String block, String reg) {
final idx = _config.blocks.indexOf(_config.getBlockByName(block));
if (idx >= 0 && idx < backdoorInterfaces.length) {
final idx1 = _config.blocks[idx].registers
.indexOf(_config.blocks[idx].getRegisterByName(reg));
if (_backdoorIndexMaps[idx].containsKey(idx1)) {
return backdoorInterfaces[idx][_backdoorIndexMaps[idx][idx1]!];
} else {
throw Exception('Register $reg in block $block could not be found.');
}
} else {
throw Exception('Block $block could not be found.');
}
}