def test_memory_write(self): """ Test WriteUnit """ access_unit = std_unit.MemoryAccessUnit() write_unit = std_unit.WriteUnit(8, access_unit) self.block_space.add_unit(write_unit)
def test_memory_read(self): """ Test read unit """ access_unit = std_unit.MemoryAccessUnit() read_unit = std_unit.ReadUnit(8, access_unit) self.block_space.add_unit(read_unit)
def test_read_write_shared(self): """ Test the read and the write sharing the same memory box. """ access_unit = std_unit.MemoryAccessUnit() write_unit = std_unit.WriteUnit(8, access_unit) read_unit = std_unit.ReadUnit(8, access_unit) self.block_space.add_unit(access_unit) self.block_space.add_unit(write_unit) self.block_space.add_unit(read_unit)
def test_basic_screen(self): screen_access = std_unit.MemoryAccessUnit( (16, 1, 16), (6, 1, 8), cbac.schematics.screen.BLACK_SCREEN_128x128) screen = std_unit.ScreenUnit(cbac.schematics.charsets.ASCII, screen_access) incrementer = std_unit.IncrementUnit(8) filler = Filler(8, incrementer, screen) self.block_space.add_unit(filler) self.block_space.add_unit(incrementer) self.block_space.add_unit(screen_access) self.block_space.add_unit(screen)
def test_weird_memory_shared(self): access_unit = std_unit.MemoryAccessUnit((4, 1, 2), (4, 1, 4)) self.block_space.add_unit(access_unit)
def test_memory_access(self): self.block_space.add_unit(std_unit.MemoryAccessUnit())