CacheInstIfc (in MIPS.bsv)
- put() -> rule doPut() //
- getRead()
- invalidate()
- getConfig()
- getResponse() //
- interface Master#
Who calls this module and what is the input?
iCache.put(req)
;req
of type CacheRequestInstT
.Where does it go?
iCache.put(req)
; see CacheCore.CacheResponseInstT resp <- iCache.getRead();
CacheResponseInstT instResp <- m.getInstruction()
;Where to fetch the tag and attach it to the instruction?
Reference 1
// Memory.bsv
mkConnection(iCache.memory, theMemMerge.slave[0]);
mkConnection(dCache.memory, theMemMerge.slave[1]);
FIFO#(CacheResponseInstT) preRsp_fifo <- mkLFIFO;
FIFO#(CheriPhyByteOffset) addrs <- mkLFIFO;
Reg#(CacheRequestInstT) reqInWire <- mkWire;
FIFOF#(Bool) nextFromCore <- mkLFIFOF;
//FIFOF#(Bool) returnNext <- mkUGSizedFIFOF(4); // Lots of room due to being unguarded.
FF#(CheriMemRequest, 2) memReqs <- mkUGFF();
FF#(CheriMemResponse, 2) memRsps <- mkUGFF(); // If this FIFO has capacity for less than 4 (the size of one burst response) the system can wedge on a SYNC when the data interface stalls waiting for all responses.
CacheCore#(2, Indices, 1) core <- mkCacheCore(cacheId, WriteThrough, OnlyReadResponses, InOrder, ICache,
zeroExtend(memReqs.remaining()),
ff2fifof(memReqs), ff2fifof(memRsps));
Reg#(CheriTransactionID) transactionNum <- mkReg(0);
Reg#(PhyAddress) lastInvalidate <- mkRegU;
method ActionValue#(CacheResponseInstT) getRead()
preRsp_fifo
addrs
debug with icache
tagcontroller
taglookup
first instruction from start: 0x4000.0000; line number (cut 5-bits): 0x0200.0000
icache-> flit=BYTE_4, l2cache->tagcontroller-> taglookup & memory <- MemoryResponse with tag and 64-bit data.
byte addr | line num | offset | tagTb byte addr | tagTb line num | offset |
---|---|---|---|---|---|
0x4000.0000 | 0x0200.0000 | 00 | 0x3fff.f000 | 0x0.01ff.ff80 | 00 |
received request Read MemoryRequest
; Injecting request from tag lookup engine
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?