Class Ram
java.lang.Object
io.zucchini.circuitsimtester.api.BaseMemory
io.zucchini.circuitsimtester.api.Ram
-
Constructor Summary
ConstructorsConstructorDescriptionRam(com.ra4king.circuitsim.simulator.components.memory.RAM ram, Subcircuit subcircuit) Creates a new Ram which wraps the providedRAMcomponent and which lives in the providedSubcircuit. -
Method Summary
Modifier and TypeMethodDescriptioncom.ra4king.circuitsim.simulator.components.memory.RAMgetRAM()Returns the internal CircuitSimRAMcomponent 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
-
Ram
Creates a new Ram which wraps the providedRAMcomponent and which lives in the providedSubcircuit.- Parameters:
ram-RAMcomponent 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
-
getRAM
public com.ra4king.circuitsim.simulator.components.memory.RAM getRAM()Returns the internal CircuitSimRAMcomponent this object wraps.This exposes an internal CircuitSim API. Do not use unless you know what you are doing.
- Returns:
- the CircuitSim
RAMcomponent wrapped by this object.
-
getSubcircuit
Returns theSubcircuit, a wrapper around a CircuitSimCircuitBoardwhere this Pin lives.- Returns:
- the
Subcircuitwhere this pin lives
-