def findRegisters(self, address, length):
sreg = sorted(self.rmap.items(), key=lambda reg: reg[<NUM_LIT:0>])<EOL>regs = []<EOL>for key, reg in sreg:<EOL><INDENT>if (address + length) > reg.addr and ((address)<EOL>< (reg.addr + reg.length)):<EOL><INDENT>regs.append(reg)<EOL><DEDENT>elif (address >= reg.addr) and (address < (reg.addr + reg.length)):<EOL><INDENT>regs.append(reg)<EOL><DEDENT><DEDENT>return regs<EOL>
return a list of registers, that overlap with the map the access pattern
use an interval tree to handle this with full speed eventually