Class Segment<PA extends Address<?>,​VA extends Address<?>>

  • All Implemented Interfaces:
    Buffer<PA,​VA>

    public abstract class Segment<PA extends Address<?>,​VA extends Address<?>>
    extends java.lang.Object
    implements Buffer<PA,​VA>
    • Constructor Summary

      Constructors 
      Constructor Description
      Segment​(ru.ispras.fortress.data.types.bitvector.BitVector start, ru.ispras.fortress.data.types.bitvector.BitVector end)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isHit​(VA address)
      Checks whether the given address hits the buffer.
      PA readEntry​(VA va)
      Reads the entry associated w/ the given address from the buffer.
      void resetState()
      Resets the state of the buffer.
      void writeEntry​(VA address, int lower, int upper, ru.ispras.fortress.data.types.bitvector.BitVector newData)
      Writes the data associated w/ the given address into the given field of the entry.
      void writeEntry​(VA address, ru.ispras.fortress.data.types.bitvector.BitVector entry)
      Writes the entry associated w/ the given address into the buffer.
      • Methods inherited from class java.lang.Object

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

      • Segment

        public Segment​(ru.ispras.fortress.data.types.bitvector.BitVector start,
                       ru.ispras.fortress.data.types.bitvector.BitVector end)
    • Method Detail

      • isHit

        public boolean isHit​(VA address)
        Description copied from interface: Buffer
        Checks whether the given address hits the buffer.
        Specified by:
        isHit in interface Buffer<PA extends Address<?>,​VA extends Address<?>>
        Parameters:
        address - the address.
        Returns:
        true iff the address hits the buffer.
      • readEntry

        public PA readEntry​(VA va)
        Description copied from interface: Buffer
        Reads the entry associated w/ the given address from the buffer.
        Specified by:
        readEntry in interface Buffer<PA extends Address<?>,​VA extends Address<?>>
        Parameters:
        va - the address.
        Returns:
        the entry associated w/ the address or null.
      • writeEntry

        public void writeEntry​(VA address,
                               ru.ispras.fortress.data.types.bitvector.BitVector entry)
        Description copied from interface: Buffer
        Writes the entry associated w/ the given address into the buffer.

        Note that an incoming entry is not necessarily of the E type. It may be returned from the previous- or next-level cache unit (thus, be different). It is the method's responsibility to convert the entry to the specified type.

        Specified by:
        writeEntry in interface Buffer<PA extends Address<?>,​VA extends Address<?>>
        Parameters:
        address - the address.
        entry - the new entry.
      • writeEntry

        public void writeEntry​(VA address,
                               int lower,
                               int upper,
                               ru.ispras.fortress.data.types.bitvector.BitVector newData)
        Description copied from interface: Buffer
        Writes the data associated w/ the given address into the given field of the entry.
        Specified by:
        writeEntry in interface Buffer<PA extends Address<?>,​VA extends Address<?>>
        Parameters:
        address - the address.
        lower - the lower bit.
        upper - the upper bit.
        newData - the new data.
      • resetState

        public void resetState()
        Description copied from interface: Buffer
        Resets the state of the buffer.
        Specified by:
        resetState in interface Buffer<PA extends Address<?>,​VA extends Address<?>>