Class Mmu<A extends Address & Data>

  • All Implemented Interfaces:
    Buffer<ru.ispras.fortress.data.types.bitvector.BitVector,​A>, MemoryDevice

    public abstract class Mmu<A extends Address & Data>
    extends java.lang.Object
    implements Buffer<ru.ispras.fortress.data.types.bitvector.BitVector,​A>, MemoryDevice
    • Constructor Summary

      Constructors 
      Constructor Description
      Mmu()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isHit​(A address)
      Checks whether the given address causes a hit.
      boolean isInitialized​(ru.ispras.fortress.data.types.bitvector.BitVector address)
      Checks whether the specified address location has been initialized.
      ru.ispras.fortress.data.types.bitvector.BitVector load​(ru.ispras.fortress.data.types.bitvector.BitVector address)
      Loads data from the given address.
      protected abstract A newAddress()  
      ru.ispras.fortress.util.Pair<ru.ispras.fortress.data.types.bitvector.BitVector,​ru.ispras.fortress.data.types.bitvector.BitVector> seeData​(ru.ispras.fortress.data.types.bitvector.BitVector index, ru.ispras.fortress.data.types.bitvector.BitVector way)
      Returns data and associated address without changing the state.
      void store​(ru.ispras.fortress.data.types.bitvector.BitVector address, int offset, ru.ispras.fortress.data.types.bitvector.BitVector data)
      Stores the specified data at the given address.
      void store​(ru.ispras.fortress.data.types.bitvector.BitVector address, ru.ispras.fortress.data.types.bitvector.BitVector data)
      Stores the specified data at the given address.
      • Methods inherited from class java.lang.Object

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

      • Mmu

        public Mmu()
    • Method Detail

      • isInitialized

        public boolean isInitialized​(ru.ispras.fortress.data.types.bitvector.BitVector address)
        Description copied from interface: MemoryDevice
        Checks whether the specified address location has been initialized.
        Specified by:
        isInitialized in interface MemoryDevice
        Parameters:
        address - Address to be checked.
        Returns:
        true is the address location is initialized or false otherwise.
      • isHit

        public boolean isHit​(A address)
        Description copied from interface: Buffer
        Checks whether the given address causes a hit.
        Specified by:
        isHit in interface Buffer<ru.ispras.fortress.data.types.bitvector.BitVector,​A extends Address & Data>
        Parameters:
        address - the data address.
        Returns:
        true if the address causes a hit; false otherwise.
      • load

        public ru.ispras.fortress.data.types.bitvector.BitVector load​(ru.ispras.fortress.data.types.bitvector.BitVector address)
        Description copied from interface: MemoryDevice
        Loads data from the given address.
        Specified by:
        load in interface MemoryDevice
        Parameters:
        address - Load address.
        Returns:
        Data of size equal to returned by MemoryDevice.getDataBitSize().
      • store

        public void store​(ru.ispras.fortress.data.types.bitvector.BitVector address,
                          int offset,
                          ru.ispras.fortress.data.types.bitvector.BitVector data)
        Description copied from interface: MemoryDevice
        Stores the specified data at the given address.
        Specified by:
        store in interface MemoryDevice
        Parameters:
        address - Store address.
        offset - Data offset in bits.
        data - Data of size equal to MemoryDevice.getDataBitSize() - offset.
      • store

        public void store​(ru.ispras.fortress.data.types.bitvector.BitVector address,
                          ru.ispras.fortress.data.types.bitvector.BitVector data)
        Description copied from interface: MemoryDevice
        Stores the specified data at the given address.
        Specified by:
        store in interface MemoryDevice
        Parameters:
        address - Store address.
        data - Data of size equal to returned by MemoryDevice.getDataBitSize().
      • seeData

        public ru.ispras.fortress.util.Pair<ru.ispras.fortress.data.types.bitvector.BitVector,​ru.ispras.fortress.data.types.bitvector.BitVector> seeData​(ru.ispras.fortress.data.types.bitvector.BitVector index,
                                                                                                                                                               ru.ispras.fortress.data.types.bitvector.BitVector way)
        Description copied from interface: Buffer
        Returns data and associated address without changing the state.
        Specified by:
        seeData in interface Buffer<ru.ispras.fortress.data.types.bitvector.BitVector,​A extends Address & Data>
        Parameters:
        index - Set index.
        way - Line index.
        Returns:
        Pair(Address, Data) or null if it is not found.
      • newAddress

        protected abstract A newAddress()