Class MmuBuffer

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MmuBuffer.Kind
      Describes buffer type.
    • Constructor Summary

      Constructors 
      Constructor Description
      MmuBuffer​(java.lang.String name, MmuBuffer.Kind kind, long ways, long sets, MmuAddressInstance address, ru.ispras.fortress.expression.Node tagExpression, ru.ispras.fortress.expression.Node indexExpression, ru.ispras.fortress.expression.Node offsetExpression, java.util.Collection<MmuBinding> matchBindings, boolean replaceable, MmuBuffer parent)  
    • Constructor Detail

      • MmuBuffer

        public MmuBuffer​(java.lang.String name,
                         MmuBuffer.Kind kind,
                         long ways,
                         long sets,
                         MmuAddressInstance address,
                         ru.ispras.fortress.expression.Node tagExpression,
                         ru.ispras.fortress.expression.Node indexExpression,
                         ru.ispras.fortress.expression.Node offsetExpression,
                         java.util.Collection<MmuBinding> matchBindings,
                         boolean replaceable,
                         MmuBuffer parent)
    • Method Detail

      • getKind

        public final MmuBuffer.Kind getKind()
        Returns buffer kind (whether it is stand-alone, mapped to memory/register).
        Returns:
        buffer kind.
      • getWays

        public final long getWays()
        Returns the number of ways (associativity).
        Returns:
        the number of ways.
      • getSets

        public final long getSets()
        Returns the number of sets.
        Returns:
        the number of sets.
      • getAddress

        public final MmuAddressInstance getAddress()
        Returns the input parameter.
        Returns:
        the input parameter.
      • getAddress

        public final ru.ispras.fortress.data.types.bitvector.BitVector getAddress​(ru.ispras.fortress.data.types.bitvector.BitVector tag,
                                                                                  ru.ispras.fortress.data.types.bitvector.BitVector index,
                                                                                  ru.ispras.fortress.data.types.bitvector.BitVector offset)
        Returns the address for the given tag, index and offset.
        Parameters:
        tag - the tag.
        index - the index.
        offset - the offset.
        Returns:
        the value of the address.
      • getTagExpression

        public final ru.ispras.fortress.expression.Node getTagExpression()
        Returns the tag calculation function.
        Returns:
        the tag calculation function.
      • getIndexExpression

        public final ru.ispras.fortress.expression.Node getIndexExpression()
        Returns the index calculation function.
        Returns:
        the index calculation function.
      • getOffsetExpression

        public final ru.ispras.fortress.expression.Node getOffsetExpression()
        Returns the offset calculation function.
        Returns:
        the offset calculation function.
      • getMatchBindings

        public final java.util.Collection<MmuBinding> getMatchBindings()
      • setMatchBindings

        protected final void setMatchBindings​(java.util.Collection<MmuBinding> matchBindings)
      • getAddressView

        public final AddressView<ru.ispras.fortress.data.types.bitvector.BitVector> getAddressView()
        Returns the address view.
        Returns:
        the address view.
      • getTag

        public final ru.ispras.fortress.data.types.bitvector.BitVector getTag​(ru.ispras.fortress.data.types.bitvector.BitVector address)
        Returns the address tag.
        Parameters:
        address - the address.
        Returns:
        the value of the tag.
      • getIndex

        public final ru.ispras.fortress.data.types.bitvector.BitVector getIndex​(ru.ispras.fortress.data.types.bitvector.BitVector address)
        Returns the address index.
        Parameters:
        address - the address.
        Returns:
        the value of the index.
      • getOffset

        public final ru.ispras.fortress.data.types.bitvector.BitVector getOffset​(ru.ispras.fortress.data.types.bitvector.BitVector address)
        Returns the address offset.
        Parameters:
        address - the address.
        Returns:
        the value of the offset.
      • getTagMask

        public final ru.ispras.fortress.data.types.bitvector.BitVector getTagMask()
      • getIndexMask

        public final ru.ispras.fortress.data.types.bitvector.BitVector getIndexMask()
      • getOffsetMask

        public final ru.ispras.fortress.data.types.bitvector.BitVector getOffsetMask()
      • isFake

        public final boolean isFake()
      • isReplaceable

        public final boolean isReplaceable()
        Checks whether the buffer support data replacement.
        Returns:
        true if the buffer supports data replacement; false otherwise.
      • isView

        public final boolean isView()
      • getParent

        public final MmuBuffer getParent()
      • isParent

        public final boolean isParent()
      • getChildren

        public final java.util.List<MmuBuffer> getChildren()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class MmuStruct