import net.mograsim.logic.model.modeladapter.CoreModelParameters;
import net.mograsim.logic.model.modeladapter.componentadapters.ComponentAdapter;
import net.mograsim.machine.standard.memory.CoreWordAddressableMemory;
-import net.mograsim.machine.standard.memory.WordAddressableMemory;
public class ModelAm2900MainMemoryAdapter implements ComponentAdapter<ModelAm2900MainMemory>
{
ReadWriteEnd data = logicWiresPerPin.get(modelComponent.getDataPin()).createReadWriteEnd();
ReadEnd address = logicWiresPerPin.get(modelComponent.getAddressPin()).createReadOnlyEnd();
ReadEnd mode = logicWiresPerPin.get(modelComponent.getReadWritePin()).createReadOnlyEnd();
- ReadEnd clock = logicWiresPerPin.get(modelComponent.getClockPin()).createReadOnlyEnd();
- CoreWordAddressableMemory mem = new CoreWordAddressableMemory(timeline, 2,
- new WordAddressableMemory(modelComponent.getDefinition()), data, mode, address, clock);
+ CoreWordAddressableMemory mem = new CoreWordAddressableMemory(timeline, 2, modelComponent.getMachine().getMainMemory(), data, mode,
+ address);
modelComponent.setCoreModelBinding(mem);
}
}