Interface Buffer<D,A>
-
- Type Parameters:
D
- the data type.A
- the address type.
- All Known Implementing Classes:
Cache
,Line
,Memory
,Mmu
,MmuMapping
,RegisterMapping
,Segment
,Set
public interface Buffer<D,A>
This is a generic interface of a buffer (i.e., a component that stores addressable data).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description D
getData(A address)
Returns the data associated with the given address.boolean
isHit(A address)
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
boolean isHit(A address)
Checks whether the given address causes a hit.- Parameters:
address
- the data address.- Returns:
true
if the address causes a hit;false
otherwise.
-
getData
D getData(A address)
Returns the data associated with the given address.- Parameters:
address
- the data address.- Returns:
- the data object if the address causes a hit;
null
otherwise.
-
setData
D setData(A address, D data)
Updates the data associated with the given address.- Parameters:
address
- the data address.data
- the new data.- Returns:
- the old data if they exist;
null
otherwise.
-
seeData
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.- Parameters:
index
- Set index.way
- Line index.- Returns:
- Pair(Address, Data) or
null
if it is not found.
-
-