1 package net.mograsim.logic.model.am2900.machine;
3 import java.util.Objects;
6 import net.mograsim.logic.model.model.LogicModelModifiable;
7 import net.mograsim.machine.ISASchema;
8 import net.mograsim.machine.MachineDefinition;
9 import net.mograsim.machine.MachineRegistry;
10 import net.mograsim.machine.Register;
12 public class Am2900MachineDefinition implements MachineDefinition
14 private Am2900MainMemoryDefinition memoryDefinition = new Am2900MainMemoryDefinition();
15 private Am2900MicroInstructionMemoryDefinition microInstMemoryDefinition = new Am2900MicroInstructionMemoryDefinition();
16 private final static Am2900MachineDefinition instance = new Am2900MachineDefinition();
18 public static Am2900MachineDefinition getInstance()
20 return Objects.requireNonNullElseGet((Am2900MachineDefinition) MachineRegistry.getinstalledMachines().get("Am2900"),
25 public Am2900Machine createNew()
27 return createNew(new LogicModelModifiable());
30 public Am2900Machine createNew(LogicModelModifiable model)
32 return new Am2900Machine(model, this);
36 public ISASchema getISASchema()
38 // TODO Auto-generated method stub
43 public Set<Register> getRegisters()
45 // TODO Auto-generated method stub
50 public int getAddressBits()
56 public Am2900MainMemoryDefinition getMainMemoryDefinition()
58 return memoryDefinition;
62 public Am2900MicroInstructionMemoryDefinition getMicroInstructionMemoryDefinition()
64 return microInstMemoryDefinition;