anchor.diff:          // dequeue logic
           if (deqReq[2] == True) begin
               dequeued = True;
  -            nextDeqP = (deqP == fromInteger(size - 1)) ? 0 : deqP + 1;
  +            nextDeqP = (deqP == fromInteger(valueOf(size) - 1)) ? 0 : deqP + 1;
               // perform state updates
               deqP <= nextDeqP;
               data[deqP] <= tagged Invalid;
  
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:     // //   deq < search < enq
      // method Bool search(searchType x) if (!isValid(enqReq[0]));
      //     // compute dataPostDeq by considering deqReq[1]
      //     Vector#(size, Maybe#(dataType)) dataPostDeq = readVReg(data);
      //     if (deqReq[1]) begin
      //         dataPostDeq[deqP] = tagged Invalid;
      //     end
  