1 package net.mograsim.logic.model.am2900.components;
5 import net.mograsim.logic.core.timeline.Timeline;
6 import net.mograsim.logic.core.wires.CoreWire;
7 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
8 import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
9 import net.mograsim.logic.model.model.wires.Pin;
10 import net.mograsim.logic.model.modeladapter.CoreModelParameters;
11 import net.mograsim.logic.model.modeladapter.componentadapters.ComponentAdapter;
12 import net.mograsim.machine.mi.components.CoreMicroInstructionMemory;
14 public class ModelAm2900MicroInstructionMemoryAdapter implements ComponentAdapter<ModelAm2900MicroInstructionMemory>
18 public Class<ModelAm2900MicroInstructionMemory> getSupportedClass()
20 return ModelAm2900MicroInstructionMemory.class;
24 public void createAndLinkComponent(Timeline timeline, CoreModelParameters params, ModelAm2900MicroInstructionMemory modelComponent,
25 Map<Pin, CoreWire> logicWiresPerPin)
27 ReadWriteEnd data = logicWiresPerPin.get(modelComponent.getDataPin()).createReadWriteEnd();
28 ReadEnd address = logicWiresPerPin.get(modelComponent.getAddressPin()).createReadOnlyEnd();
29 CoreMicroInstructionMemory mem = new CoreMicroInstructionMemory(timeline, 2,
30 modelComponent.getMachine().getMicroInstructionMemory(), data, address);
31 modelComponent.setCoreModelBinding(mem);