Interface Memory

  • All Superinterfaces:
    Plugin
    All Known Implementing Classes:
    AbstractMemory

    public interface Memory
    extends Plugin
    Memory plugin root interface.

    Memory can define a "memory context", which can enable additional non-standard functionality, which can be used by other plugins.

    See Also:
    MemoryContext
    • Method Detail

      • setProgramLocation

        void setProgramLocation​(int location)
        Sets program start address.

        This method is called by main module when compiler finishes compilation process and return known start address of compiled program. This start address is then used by CPU, in reset operation - PC (program counter, or something similar) should be set to this address, accessible via IMemoryContext.getProgramStart() method.

        Parameters:
        location - starting memory position (address) of a program
      • getSize

        int getSize()
        Gets size of memory.

        If memory uses some techniques as banking, real size of the memory is not computed. It is only returned a value set in architecture configuration.

        Returns:
        basic size of the memory
      • getProgramLocation

        int getProgramLocation()
        Gets program's start address.

        The start address is set invoking memory's method Memory.setProgramStart() by main module when compiler finishes compilation process of a program and if the compiler know the starting address. This address is used by main module for CPU reset process.

        Returns:
        program's start address in memory