Class Rom
java.lang.Object
io.zucchini.circuitsimtester.api.BaseMemory
io.zucchini.circuitsimtester.api.Rom
-
Constructor Summary
ConstructorsConstructorDescriptionRom(com.ra4king.circuitsim.simulator.components.memory.ROM rom, Subcircuit subcircuit) Creates a new Rom which wraps the providedROMcomponent and which lives in the providedSubcircuit. -
Method Summary
Modifier and TypeMethodDescriptioncom.ra4king.circuitsim.simulator.components.memory.ROMgetROM()Returns the internal CircuitSimROMcomponent this object wraps.Returns theSubcircuit, a wrapper around a CircuitSimCircuitBoardwhere this Pin lives.intload(int address) Reads a word from this RAM/ROM.voidstore(int address, int value) Writes a word to this RAM/ROM.Methods inherited from class io.zucchini.circuitsimtester.api.BaseMemory
load
-
Constructor Details
-
Rom
Creates a new Rom which wraps the providedROMcomponent and which lives in the providedSubcircuit.- Parameters:
rom-ROMcomponent to wrapsubcircuit- where this pin lives
-
-
Method Details
-
load
public int load(int address) Description copied from class:BaseMemoryReads a word from this RAM/ROM.- Specified by:
loadin classBaseMemory- Parameters:
address- The memory address to load from- Returns:
- value at this address
-
store
public void store(int address, int value) Description copied from class:BaseMemoryWrites a word to this RAM/ROM.- Specified by:
storein classBaseMemory- Parameters:
address- The memory address to store tovalue- The value to store
-
getROM
public com.ra4king.circuitsim.simulator.components.memory.ROM getROM()Returns the internal CircuitSimROMcomponent this object wraps.This exposes an internal CircuitSim API. Do not use unless you know what you are doing.
- Returns:
- the CircuitSim
ROMcomponent wrapped by this object.
-
getSubcircuit
Returns theSubcircuit, a wrapper around a CircuitSimCircuitBoardwhere this Pin lives.- Returns:
- the
Subcircuitwhere this pin lives
-