4450e07b6c984bbb8f8b2a014ed6bc7d07f8420e
[Mograsim.git] /
1 package net.mograsim.logic.model.am2900.components;
2
3 import net.mograsim.logic.model.am2900.machine.Am2900Machine;
4 import net.mograsim.logic.model.am2900.machine.Am2900MachineDefinition;
5 import net.mograsim.logic.model.model.LogicModelModifiable;
6 import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
7 import net.mograsim.logic.model.serializing.IdentifyParams;
8 import net.mograsim.logic.model.serializing.IndirectModelComponentCreator;
9 import net.mograsim.machine.standard.memory.ModelWordAddressableMemory;
10
11 public class ModelAm2900MainMemory extends ModelWordAddressableMemory<Am2900Machine>
12 {
13         public ModelAm2900MainMemory(LogicModelModifiable model, String name)
14         {
15                 super(model, Am2900MachineDefinition.getInstance().getMainMemoryDefinition(), name);
16         }
17
18         @Override
19         public String getIDForSerializing(IdentifyParams idParams)
20         {
21                 return "Am2900MainMemory";
22         }
23
24         static
25         {
26                 LogicCoreAdapter.addComponentAdapter(new ModelAm2900MainMemoryAdapter());
27                 IndirectModelComponentCreator.setComponentSupplier(ModelAm2900MainMemory.class.getCanonicalName(), (m, p, n) ->
28                 {
29                         return new ModelAm2900MainMemory(m, n);
30                 });
31         }
32 }