Merge.bsv


Q&A

  • Who calls this and what is the input?

    • i/dcache requests goes through here and being forwarded to l2cache;
    • l2cache response being sent back here and forwarded to i/dcache;
  • Where does this go?

    • forward request to l2cache memory; Memory.bsv: mkConnection(theMemMerge.merged, l2Cache.cache)
    • return response to icache/dcache via slaves[i]

file: cheri/trunk/Merge.bsv

module mkMergeFast

module mkMergeFast(MergeIfc#(numIfc));

numIfc = 2 in Memory.bsv

Connections:

// Memory.bsv
mkConnection(iCache.memory, theMemMerge.slave[0]);
mkConnection(dCache.memory, theMemMerge.slave[1]);

States

FIFOF#(CheriMemRequest) nextReq <- mkBypassFIFOF; FIFOF#(CheriMemResponse) rsp_fifo <- mkBypassFIFOF; Vector#(numIfc, Wire#(Bool)) fired <- replicateM(mkDWire(False)); Vector#(numIfc, Bool) block;

Interface MergeIfc

  • interface Master#(CheriMemRequest, CheriMemResponse) merged;
  • interface Vector#(numIfc, Slave#(CheriMemRequest, CheriMemResponse)) slave;

Slave interface

Vector#(numIfc, Slave#(CheriMemRequest, CheriMemResponse)) slaves;

interface slave = slaves;

  • subinterface response;
  • subinterface request;

Response: check rsp_fifo.first.masterID, only return response when masterID matches icache (0) or dcache(1).

Request: put req to nextReq: nextReq.enq(req). Set fired[i] to true,

Master interface merged

  • interface CheckedGet request = toCheckedGet(nextReq);
  • interface CheckedPut response = toCheckedPut(rsp_fifo);

rule debugRule

print time and rsp_fifp status .notFull

Reference 1


  1. github/beri ↩
Created May 6, 2020 // Last Updated Jun 1, 2020

If you could revise
the fundmental principles of
computer system design
to improve security...

... what would you change?