protected bool is_row_hit(Req req) { return(meta_mctrl.is_row_hit(req)); }
private Req __find_best_req(int r, int b) { //no need to search for request, already outstanding commands if (cmdqs[r, b].Count > 0) { return(null); } /*** find best request ***/ List <Req> rq = readqs[r, b]; List <Req> wq = writeqs[r, b]; if (rq.Count == 0 && wq.Count == 0) { return(null); } Req best_req = null; Cmd cmd = null; //find best writeback request if (wb_mode) { best_req = meta_mctrl.find_best_wb_req(wq); if (best_req != null) { //check if best writeback request is schedulable cmd = decode_req(best_req)[0]; if (!can_schedule_cmd(cmd)) { return(null); } return(best_req); } //writeq is empty: should we let reads bypass? if (!Config.mctrl.read_bypass) { return(null); } } //find best read request best_req = meta_mctrl.find_best_rd_req(rq); /*** row-hit bypass ***/ if (Config.mctrl.row_hit_bypass) { Req hit_req = rh_finder.find_best_req(rq); if (!meta_mctrl.is_row_hit(best_req) && hit_req != null) { Bank2 bank = chan.ranks[r].banks[b]; Dbg.Assert(bank.ts_act != -1); long ts_pre = bank.ts_act + timing.tRAS; long speculative_ts_pre = cycles + timing.tRTP; if (speculative_ts_pre <= ts_pre) { best_req = hit_req; } } } if (best_req == null) { return(null); } //check if best request is schedulable cmd = decode_req(best_req)[0]; if (!can_schedule_cmd(cmd)) { return(null); } return(best_req); }