def test_x(self): ramrgn = RamRegion(name='core0 ram', start=0x1fffa000, length=0x18000) assert ramrgn.containsRange(0x1fffc9f8, end=0x1fffc9fc) assert ramrgn.intersectsRange(0x1fffc9f8, end=0x1fffc9fc) dualMap = MemoryMap( FlashRegion(name='flash', start=0, length=0x80000, blocksize=0x800, isBootMemory=True), RomRegion(name='core1 imem alias', start=0x1d200000, length=0x40000), ramrgn, RomRegion(name='core1 imem', start=0x2d200000, length=0x40000), RamRegion(name='core1 dmem', start=0x2d300000, length=0x8000), RamRegion(name='usb ram', start=0x40100000, length=0x800) ) rgns = dualMap.getIntersectingRegions(0x1fffc9f8, end=0x1fffc9fc) assert len(rgns) > 0
def test_x(self): ramrgn = RamRegion(name='core0 ram', start=0x1fffa000, length=0x18000) assert ramrgn.containsRange(0x1fffc9f8, end=0x1fffc9fc) assert ramrgn.intersectsRange(0x1fffc9f8, end=0x1fffc9fc) dualMap = MemoryMap( FlashRegion(name='flash', start=0, length=0x80000, blocksize=0x800, isBootMemory=True), RomRegion(name='core1 imem alias', start=0x1d200000, length=0x40000), ramrgn, RomRegion(name='core1 imem', start=0x2d200000, length=0x40000), RamRegion(name='core1 dmem', start=0x2d300000, length=0x8000), RamRegion(name='usb ram', start=0x40100000, length=0x800)) rgns = dualMap.getIntersectingRegions(0x1fffc9f8, end=0x1fffc9fc) assert len(rgns) > 0
def ram2(): return RamRegion(start=0x20000400, length=1 * 1024, name='ram2', isCacheable=False)
def ram1(): return RamRegion(start=0x20000000, length=1 * 1024, name='ram')