anchor.diff:      // //   deq < search < enq
       // method Bool search(searchType x) if (!isValid(enqReq[0]));
       //     // compute dataPostDeq by considering deqReq[1]
  -    //     List#(Maybe#(dataType)) dataPostDeq = map(readReg, data);
  +    //     Vector#(size, Maybe#(dataType)) dataPostDeq = readVReg(data);
       //     if (deqReq[1]) begin
       //         dataPostDeq[deqP] = tagged Invalid;
       //     end
  
positive.code: 
  // search < {enq , deq} < clear
  // first < deq
  module mkSFIFO#(Integer size, function Bool isMatch(searchType s, dataType d))(SFIFO#(dataType, searchType)) provisos (Bits#(dataType, dataSize));
      // use valid bits to make search logic smaller
      List#(Reg#(Maybe#(dataType))) data <- List::replicateM(size, mkRegU);
      Reg#(Bit#(TLog#(`MAX_SFIFO_SIZE))) enqP <- mkReg(0);
      Reg#(Bit#(TLog#(`MAX_SFIFO_SIZE))) deqP <- mkReg(0);
      Reg#(Bool) full <- mkReg(False);
      Reg#(Bool) empty <- mkReg(True);
      // EHRs to avoid conflicts between enq and deq
  
negative.code:         return fromMaybe(?, data[deqP]);
      endmethod
      method Action clear;
          writeVReg(data, replicate(tagged Invalid));
          enqP <= 0;
          deqP <= 0;
          full <= False;
  