Interface Buffer<E,A>
-
- Type Parameters:
E
- the entry type.A
- the address type.
- All Known Subinterfaces:
ReplaceableBuffer<E,A>
- All Known Implementing Classes:
BufferInstanceProxy
,CacheLine
,CacheSet
,CacheUnit
,Memory
,Mmu
,MmuMapping
,RegisterMapping
,Segment
public interface Buffer<E,A>
Buffer
represents a buffer that stores addressable entries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isHit(A address)
Checks whether the given address hits the buffer.E
readEntry(A address)
Reads the entry associated w/ the given address from the buffer.void
resetState()
Resets the state of the buffer.void
writeEntry(A 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(A address, ru.ispras.fortress.data.types.bitvector.BitVector newEntry)
Writes the entry associated w/ the given address into the buffer.
-
-
-
Method Detail
-
isHit
boolean isHit(A address)
Checks whether the given address hits the buffer.- Parameters:
address
- the address.- Returns:
true
iff the address hits the buffer.
-
readEntry
E readEntry(A address)
Reads the entry associated w/ the given address from the buffer.- Parameters:
address
- the address.- Returns:
- the entry associated w/ the address or
null
.
-
writeEntry
void writeEntry(A address, ru.ispras.fortress.data.types.bitvector.BitVector newEntry)
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.- Parameters:
address
- the address.newEntry
- the new entry.
-
writeEntry
void writeEntry(A 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.- Parameters:
address
- the address.lower
- the lower bit.upper
- the upper bit.newData
- the new data.
-
resetState
void resetState()
Resets the state of the buffer.
-
-