1 package net.mograsim.machine.mi.components;
3 import net.mograsim.logic.model.model.LogicModelModifiable;
4 import net.mograsim.logic.model.model.wires.Pin;
5 import net.mograsim.logic.model.model.wires.PinUsage;
6 import net.mograsim.machine.Machine;
7 import net.mograsim.machine.ModelMemory;
8 import net.mograsim.machine.mi.MicroInstructionMemoryDefinition;
10 public abstract class ModelMicroInstructionMemory<M extends Machine> extends ModelMemory<M>
12 private final Pin addrPin, dataPin;
13 private CoreMicroInstructionMemory memory;
14 private final MicroInstructionMemoryDefinition definition;
16 public ModelMicroInstructionMemory(LogicModelModifiable model, MicroInstructionMemoryDefinition definition, String name)
18 super(model, 120, 150, name, "MPM", false);
19 this.definition = definition;
20 addPin(addrPin = new Pin(model, this, "A", definition.getMemoryAddressBits(), PinUsage.INPUT, getWidth(), 30));
21 addPin(dataPin = new Pin(model, this, "D", definition.getMicroInstructionDefinition().sizeInBits(), PinUsage.OUTPUT, getWidth(),
27 public MicroInstructionMemoryDefinition getDefinition()
32 public Pin getAddressPin()
37 public Pin getDataPin()
42 public CoreMicroInstructionMemory getCoreMemory()
47 public void setCoreModelBinding(CoreMicroInstructionMemory memory)