Exemple #1
0
    def __init__(self, *args, **kwargs):
        """
		Define the MU0 system's memory, registers etc.
		"""
        AckieHostable.__init__(self, *args, **kwargs)

        self.name = "MU0"

        self.word_width_bits = 16

        self.memory = Memory(
            0,  # The zeroth and only memory
            ["Memory", "Mem", "memory", "mem"],  # Names for the main/only memory
            12,  # 12-bit addresses
            16,  # 16-bit memory words
            [MU0Assembler()],  # Use the MU0 assembler
            [MU0Disassembler()],
        )  # Use the MU0 disassembler

        self.memories.append(self.memory)

        self._define_all_registers()
Exemple #2
0
	def __init__(self, cpu_type, cpu_subtype):
		"""
		Define the STUMP system's memory, registers etc.
		"""
		AckieHostable.__init__(self, cpu_type, cpu_subtype)
		
		self.name = "STUMP"
		
		self.word_width_bits = 16
		
		self.memory = Memory(
			0,                   # The zeroth and only memory
			["Memory", "Mem",
			 "memory", "mem"],     # Names for the main/only memory
			16,                    # 16-bit address bus
			16,                    # 16-bit memory words
			[STUMPAssembler()],    # Use the STUMP assembler
			[STUMPDisassembler()]) # Use the STUMP disassembler
		
		self.memories.append(self.memory)
		
		self._define_all_registers()