SHARE
TWEET

Untitled

a guest Dec 11th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         // inputs to set
  2.         // eInst ?? (not rly, used intermediately)
  3.         // e2w
  4.         // dataE
  5.         // dstE
  6.         // dCache.req  ...
  7.         // e/dstall????
  8.         // annul
  9.         // redirectPC
  10.  
  11.         // outputs to read
  12.         // d2e
  13.        
  14.  
  15.  
  16.         if (isValid(d2e)) begin
  17.             let d2e_v = fromMaybe(?, d2e);
  18.             let eInst = execute(d2e_v.dInst, d2e_v.rVal1, d2e_v.rVal2, d2e_v.pc);
  19.             let is_load = eInst.iType == LOAD;
  20.             let is_store = eInst.iType == STORE;
  21.             let req_enabled = dCache.reqEnabled;
  22.             let e_to_writeback = E2W{pc: d2e_v.pc, iType: eInst.iType, dst: eInst.dst, data: eInst.data};
  23.             let need_to_annul = (eInst.nextPc != d2e_v.pc + 4)
  24.             let data = is_load ? ? : eInst.data;
  25.             let memrequest = Valid(MemReq{addr: eInst.addr, op: Ld, data: data}
  26.             dCache.req = dStall ? Invalid : (is_load ? (req_enabled ? memrequest) : Invalid) : (is_store ? (req_enabled ? memrequest) : Invalid) : Invalid));
  27.             eStall = dstall? True : (is_load ? (req_enabled ? False : True) : (is_store ? (req_enabled ? False : True) : False));
  28.             //eStall =
  29.             e2w <= dStall ? e2w : Valid(e_to_writeback);
  30.             dstE = dStall ? Invalid : Valid(fromMaybe(?, eInst.dst));
  31.             annul = dStall ? False : (need_to_annul ? True: False)
  32.             redirectPC = dStall ? eInst.nextPc : (need_to_annul ? eInst.nextPc : eInst.nextPc ); // arbitrary setting it everywhere to same thing
  33.        
  34.         end else begin
  35.             e2w <= Invalid;
  36.         end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top