1 package net.mograsim.machine.mi.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;
13 public class MPROMAdapter implements ComponentAdapter<ModelMPROM>
16 public Class<ModelMPROM> getSupportedClass()
18 return ModelMPROM.class;
22 public void createAndLinkComponent(Timeline timeline, CoreModelParameters params, ModelMPROM modelComponent,
23 Map<Pin, CoreWire> logicWiresPerPin)
25 ReadWriteEnd data = logicWiresPerPin.get(modelComponent.getDataPin()).createReadWriteEnd();
26 ReadEnd address = logicWiresPerPin.get(modelComponent.getAddressPin()).createReadOnlyEnd();
27 CoreMPROM mem = new CoreMPROM(timeline, 2, modelComponent.getDefinition(), data, address);
28 modelComponent.setCoreModelBinding(mem);