1 package net.mograsim.logic.model.am2900.machine;
3 import java.util.Objects;
6 import net.mograsim.machine.ISASchema;
7 import net.mograsim.machine.Machine;
8 import net.mograsim.machine.MachineDefinition;
9 import net.mograsim.machine.MachineRegistry;
10 import net.mograsim.machine.MainMemoryDefinition;
11 import net.mograsim.machine.Register;
12 import net.mograsim.machine.mi.MicroInstructionMemoryDefinition;
14 public class Am2900MachineDefinition implements MachineDefinition
16 private MainMemoryDefinition memoryDefinition = new Am2900MainMemoryDefinition();
17 private MicroInstructionMemoryDefinition microInstMemoryDefinition = new Am2900MicroInstructionMemoryDefinition();
18 private final static Am2900MachineDefinition instance = new Am2900MachineDefinition();
20 public static Am2900MachineDefinition getInstance()
22 return Objects.requireNonNullElseGet((Am2900MachineDefinition) MachineRegistry.getinstalledMachines().get("Am2900"),
27 public Machine createNew()
29 return new Am2900Machine(this);
33 public ISASchema getISASchema()
35 // TODO Auto-generated method stub
40 public Set<Register> getRegisters()
42 // TODO Auto-generated method stub
47 public int getAddressBits()
53 public MainMemoryDefinition getMainMemoryDefinition()
55 return memoryDefinition;
59 public MicroInstructionMemoryDefinition getMicroInstructionMemoryDefinition()
61 return microInstMemoryDefinition;