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.');
}
}