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 providedROM
component and which lives in the providedSubcircuit
. -
Method Summary
Modifier and TypeMethodDescriptioncom.ra4king.circuitsim.simulator.components.memory.ROM
getROM()
Returns the internal CircuitSimROM
component this object wraps.Returns theSubcircuit
, a wrapper around a CircuitSimCircuitBoard
where this Pin lives.int
load
(int address) Reads a word from this RAM/ROM.void
store
(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 providedROM
component and which lives in the providedSubcircuit
.- Parameters:
rom
-ROM
component to wrapsubcircuit
- where this pin lives
-
-
Method Details
-
load
public int load(int address) Description copied from class:BaseMemory
Reads a word from this RAM/ROM.- Specified by:
load
in 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:BaseMemory
Writes a word to this RAM/ROM.- Specified by:
store
in 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 CircuitSimROM
component this object wraps.This exposes an internal CircuitSim API. Do not use unless you know what you are doing.
- Returns:
- the CircuitSim
ROM
component wrapped by this object.
-
getSubcircuit
Returns theSubcircuit
, a wrapper around a CircuitSimCircuitBoard
where this Pin lives.- Returns:
- the
Subcircuit
where this pin lives
-