anchor.diff:                      read_stale = False;
                   end
                   // combine everything together
  -                return valid && computed && younger && overlap && read_stale;
  +                return valid && younger && overlap && read_stale;
               endfunction
               Vector#(LdQSize, Bool) killLds = map(needKill, idxVec);
               if(findOldestLd(killLds) matches tagged Valid .killTag) begin
  
positive.code:             Vector#(LdStQSize, Integer) idxVec = genVector;
              joinActions(map(correctSpec, idxVec));
              // clear spec bits for issueQ and killQ
              issueQ.specUpdate.correctSpeculation(mask);
              killQ.specUpdate.correctSpeculation(mask);
          endmethod
  
          method Action incorrectSpeculation(SpecTag st);
              // idx vec
              Vector#(LdStQSize, LdStQTag) idxVec = genWith(fromInteger);
  
              // clear wrong path LSQ entries & set wrong path load filter
              function Action incorrectSpec(LdStQTag i);
              action
                  if(specBits[i][sb_wrongSpec_port][st] == 1) begin
                      valid[i][valid_wrongSpec_port] <= False;
                      // set wrong path load resp filter
                      if(valid[i][valid_wrongSpec_port] && state[i][state_wrongSpec_port] == Executing) begin
                          waitWPResp[i] <= True;
                          doAssert(memInst[i].mem_func == Ld, "only load resp can be wrong path");
                      end
                  end
              endaction
              endfunction
              joinActions(map(incorrectSpec, idxVec));
  
              // kill entries in issueQ and killQ
              issueQ.specUpdate.incorrectSpeculation(st);
              killQ.specUpdate.incorrectSpeculation(st);
  
              // change enqP: make valid entries always consecutive
              // search for the oldest **VALID** entry being killed
              function Bool killValid(LdStQTag i);
                  return valid[i][valid_wrongSpec_port] && specBits[i][sb_wrongSpec_port][st] == 1;
              endfunction
              Vector#(LdStQSize, Bool) isKillValid = map(killValid, idxVec);
              // start finding the oldest valid entry being killed
              Maybe#(LdStQTag) killTag; 
  `ifdef LSQ_VTAG
              // use virtual tag: find the oldest (note that we search for valid entry)
              killTag = findOldest(isKillValid);
  `else
              // normal search, do two rounds
              // first search smallest tag among entries >= deqP
              LdStQTag curDeqP = deqP[deqP_wrongSpec_port];
              function Bool killValidFirst(LdStQTag i);
                  return i >= curDeqP && isKillValid[i];
              endfunction
              Maybe#(LdStQTag) killFirst = find(killValidFirst, idxVec);
              // next search smallest tag among all entries
              function Bool killValidNext(LdStQTag i) = isKillValid[i];
              Maybe#(LdStQTag) killNext = find(killValidNext, idxVec);
              // merge
              killTag = isValid(killFirst) ? killFirst : killNext;
  `endif
              // new enqP should be the oldest killing entry, otherwise remain the same (no entry killed)
              if(killTag matches tagged Valid .t) begin
                  enqP <= t;
              end
  
              // make conflict with others
  
negative.code:             wrongSpec_update_conflict.wset(?);
              wrongSpec_issue_conflict.wset(?);
              wrongSpec_respLd_conflict.wset(?);
              wrongSpec_deqLd_conflict.wset(?);
              wrongSpec_deqSt_conflict.wset(?);
              wrongSpec_verify_conflict.wset(?);
              wrongSpec_cacheEvict_conflict.wset(?);
              wrongSpec_wakeBySB_conflict.wset(?);
          endmethod
      endinterface
  