Class Segment<D,A extends Address>
- java.lang.Object
-
- ru.ispras.microtesk.mmu.model.sim.Segment<D,A>
-
- All Implemented Interfaces:
Buffer<D,A>
,BufferObserver
public abstract class Segment<D,A extends Address> extends java.lang.Object implements Buffer<D,A>, BufferObserver
-
-
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 D
getData(A va)
Returns the data associated with the given address.boolean
isHit(A address)
Checks whether the given address causes a hit.boolean
isHit(ru.ispras.fortress.data.types.bitvector.BitVector value)
Checks whether the given address causes a hit.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.D
setData(A address, D data)
Updates the data associated with the given address.
-
-
-
Method Detail
-
isHit
public boolean isHit(A address)
Description copied from interface:Buffer
Checks whether the given address causes a hit.
-
isHit
public boolean isHit(ru.ispras.fortress.data.types.bitvector.BitVector value)
Description copied from interface:BufferObserver
Checks whether the given address causes a hit.- Specified by:
isHit
in interfaceBufferObserver
- Parameters:
value
- Address to be checked.- Returns:
true
if the address causes a hit;false
otherwise.
-
getData
public D getData(A va)
Description copied from interface:Buffer
Returns the data associated with the given address.
-
setData
public D setData(A address, D data)
Description copied from interface:Buffer
Updates the data associated with the given address.
-
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.
-
-