Class Ram


public class Ram extends BaseMemory
Wraps a CircuitSim RAM component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ram(com.ra4king.circuitsim.simulator.components.memory.RAM ram, Subcircuit subcircuit)
    Creates a new Ram which wraps the provided RAM component and which lives in the provided Subcircuit.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.ra4king.circuitsim.simulator.components.memory.RAM
    Returns the internal CircuitSim RAM component this object wraps.
    Returns the Subcircuit, a wrapper around a CircuitSim CircuitBoard 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Ram

      public Ram(com.ra4king.circuitsim.simulator.components.memory.RAM ram, Subcircuit subcircuit)
      Creates a new Ram which wraps the provided RAM component and which lives in the provided Subcircuit.
      Parameters:
      ram - RAM component to wrap
      subcircuit - 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 class BaseMemory
      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 class BaseMemory
      Parameters:
      address - The memory address to store to
      value - The value to store
    • getRAM

      public com.ra4king.circuitsim.simulator.components.memory.RAM getRAM()
      Returns the internal CircuitSim RAM component this object wraps.

      This exposes an internal CircuitSim API. Do not use unless you know what you are doing.

      Returns:
      the CircuitSim RAM component wrapped by this object.
    • getSubcircuit

      public Subcircuit getSubcircuit()
      Returns the Subcircuit, a wrapper around a CircuitSim CircuitBoard where this Pin lives.
      Returns:
      the Subcircuit where this pin lives