Added Am2900 MainMemory and MicroInstructionMemory Core/Model Components
[Mograsim.git] / net.mograsim.logic.model.am2900 / src / net / mograsim / logic / model / am2900 / components / ModelAm2900MicroInstructionMemory.java
1 package net.mograsim.logic.model.am2900.components;
2
3 import net.mograsim.logic.model.am2900.machine.Am2900MachineDefinition;
4 import net.mograsim.logic.model.model.LogicModelModifiable;
5 import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
6 import net.mograsim.logic.model.serializing.IdentifyParams;
7 import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
8 import net.mograsim.machine.mi.components.ModelMicroInstructionMemory;
9
10 public class ModelAm2900MicroInstructionMemory extends ModelMicroInstructionMemory
11 {
12         public ModelAm2900MicroInstructionMemory(LogicModelModifiable model, String name)
13         {
14                 super(model, Am2900MachineDefinition.getInstance().getMicroInstructionMemoryDefinition(), name);
15         }
16
17         static
18         {
19                 LogicCoreAdapter.addComponentAdapter(new ModelAm2900MicroInstructionMemoryAdapter());
20                 IndirectModelComponentCreator.setComponentSupplier(ModelAm2900MicroInstructionMemory.class.getCanonicalName(), (m, p, n) ->
21                 {
22                         return new ModelAm2900MicroInstructionMemory(m, n);
23                 });
24         }
25
26         @Override
27         public String getIDForSerializing(IdentifyParams idParams)
28         {
29                 return "Am2900MicroInstructionMemory";
30         }
31 }