-
- Type Parameters:
E
- the entry type.A
- the address type.
- All Superinterfaces:
Buffer<E,A>
- All Known Implementing Classes:
CacheLine
,CacheSet
,CacheUnit
,RegisterMapping
public interface ReplaceableBuffer<E extends Struct<?>,A extends Address<?>> extends Buffer<E,A>
ReplaceableBuffer
represents a replaceable buffer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
allocEntry(A address)
Allocates an invalid entry in the buffer and associates it w/ the given address.boolean
evictEntry(ReplaceableBuffer<?,A> initiator, A address)
Evicts the entry associated w/ the given address from the buffer.Buffer<?,A>
getNext()
Returns the next-level buffer.ru.ispras.fortress.util.Pair<E,java.lang.Boolean>
readEntry(A address, boolean invalidate)
Reads the entry associated w/ the given address and, if required, invalidates it.-
Methods inherited from interface ru.ispras.microtesk.mmu.model.sim.Buffer
isHit, readEntry, resetState, writeEntry, writeEntry
-
-
-
-
Method Detail
-
allocEntry
void allocEntry(A address)
Allocates an invalid entry in the buffer and associates it w/ the given address.- Parameters:
address
- the address.
-
evictEntry
boolean evictEntry(ReplaceableBuffer<?,A> initiator, A address)
Evicts the entry associated w/ the given address from the buffer.- Parameters:
initiator
- the buffer that initiates the operation.address
- the address.- Returns:
true
iff the entry is not dirty or it has been synchronized w/ the storage.
-
readEntry
ru.ispras.fortress.util.Pair<E,java.lang.Boolean> readEntry(A address, boolean invalidate)
Reads the entry associated w/ the given address and, if required, invalidates it.- Parameters:
address
- the address.invalidate
- the invalidation flag.- Returns:
- the entry associated w/ the address w/ the dirty bit or
null
.
-
-