Scheduler.bsv


Q&A

  • Who calls this module and what is the input?

  • Where does it go?


Reference 1

//cheri/trunk/Scheduler.bsv

// The mkScheduler module does a "pre-decode" of the instruction to find which
// register numbers may be fetched and to classify the branch behaviour of the
// instruction for the branch predictor.
module mkScheduler#(
  // The scheduler needs the branch interface so that it can report the branch type
  // for the next prediction.  This saves the branch predictor from having to guess
  // if the next instruction is a branch or not.
  BranchIfc branch,
  // The scheduler needs the register file interface because it submits the
  // register fetches that are retrieved in the decode stage.
  MIPSRegFileIfc theRF,
  // The scheduler needs the CP0 interface because it also submits potential register
  // reads to the CP0 interface, which are also retrieved in the decode stage.
  CP0Ifc cp0,
  CoProIfc cop1,
  `ifdef USECAP
    CapCopIfc capCop,
  `endif
  // The scheduler needs the instruction memory interface because it pulls the next
  // instruction out of the instruction memory to begin pre-decode analysis.
  InstructionMemory m
  // The scheduler exports a PipeStageIfc interface, (a FIFO#(ControlTokenT) interface),
  // for integration with the pipeline.
  `ifdef STATCOUNTERS
  , StatCounters statCounters
  `endif
)(PipeStageIfc);

Methods:

  • enq …
  • first = outQ.first;
  • deq = outQ.deq;
  • clear = noAction

method Action enq(ControlTokenT cti)

  • Input: ControlTokenT cti
  • Output: ControlTokenT cto: // outQ.enq(cto)

    • CapInst goes to CapCop
    • -
  • call sites:

    • cheri/trunk/MIPSTop.bsv: 398: (in rule fromFetchToScheduler) toScheduler.enq(ct)

case(cit.inst) can be: tagged Immediate/Jump/Register/Coprocessor/

For Coprocessor (ci) case:

case(ci.op) -> {COP2, LWC2, LDC2, SWC2, SDC2}.

  • COP2: includes ci.cOp:{COffset, CCompare, MFC, MTC, CSetBounds, CRelBase, CJR, CJALR, CBTS, CBTU, CBEZ, CBNZ, CSeal, CUnseal, Check, CCall, CReturn, CClear, CLLSC}

  1. reference ↩
Created Apr 4, 2020 // Last Updated May 18, 2021

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

... what would you change?