anchor.diff:          return pred[tag] ? Valid (tag) : Invalid;
       endfunction
   
  +    // find oldest SQ entry that satisfy a constraint (i.e. smallest tag)
  +    function Maybe#(StQTag) findOldestSt(Vector#(StQSize, Bool) pred);
  +        function StQTag getOlder(StQTag a, StQTag b);
  +            if(!pred[a]) begin
  +                return b;
  +            end
  +            else if(!pred[b]) begin
  +                return a;
  +            end
  +            else begin
  +                return stVirTags[a] < stVirTags[b] ? a : b;
  +            end
  +        endfunction
  +        Vector#(StQSize, StQTag) idxVec = genWith(fromInteger);
  +        StQTag tag = fold(getOlder, idxVec);
  +        return pred[tag] ? Valid (tag) : Invalid;
  +    endfunction
  +
       // find youngest SQ entry that satisfy a constraint (i.e. largest tag)
       function Maybe#(StQTag) findYoungestSt(Vector#(StQSize, Bool) pred);
           function StQTag getYounger(StQTag a, StQTag b);
  
positive.code:                     read_stale = False;
                  end
                  // combine everything together
                  return valid && computed && younger && overlap && read_stale;
              endfunction
              Vector#(LdQSize, Bool) killLds = map(needKill, idxVec);
              if(findOldestLd(killLds) matches tagged Valid .killTag) begin
  
negative.code:             ld_valid_getKill[tag] &&
              ld_computed_getKill[tag] &&
              ld_killed_getKill[tag] &&
              ld_executing_getKill[tag] &&
              ld_memFunc[tag] == Ld,
              "killed load must be valid, computed, killed and executing/done"
          );
          return LSQKillLdInfo {
              instTag: ld_instTag[tag],
              specTag: ld_specTag_getKill[tag]
          };
      endmethod
  
  `ifdef TSO_MM
      method ActionValue#(LSQKillLdInfo) getLdKilledByCache;
          killByCacheQ.deq;
          let tag = killByCacheQ.first.data;
          doAssert(
              ld_valid_getKill[tag] &&
              ld_computed_getKill[tag] &&
              ld_killed_getKill[tag] &&
              ld_executing_getKill[tag] &&
              ld_memFunc[tag] == Ld,
              "killed load must be valid, computed, killed and executing/done"
          );
          return LSQKillLdInfo {
              instTag: ld_instTag[tag],
              specTag: ld_specTag_getKill[tag]
          };
      endmethod
  `endif
  
      method ActionValue#(LSQRespLdResult) respLd(LdQTag t, Data alignedData);
          let res = LSQRespLdResult {
  