anchor.diff:           endcase             
       endrule
   
  +    rule update_nextFree_for_PUT;
  +        let x <- toGet(putFIFO).get;
  +        nextFree[temp] <= x;
  +    endrule
  +    
  +    rule update_nextFree_for_REM;
  +        let x <- toGet(remFIFO).get;
  +        nextFree[temp] <= x;
  +    endrule
  +
       interface Put request = toPut(requestFIFO);
       interface Get response = toGet(responseFIFO);
   endmodule
  
positive.code:                     if (nextFree[addrIdx] != 0)
                      begin
                          Bit#(3) index = priority_encoder(nextFree[addrIdx]);
                          nextFree[addrIdx] <= flip_bit_at_pos(index, addrIdx);
                          hTable[index].request.put(currReq);
                      end
                      else
  
negative.code:             if (res.tag == VALID && res.op == GET)    
                  responseFIFO.enq(res);
              else if (res.tag == VALID && res.op == REMOVE)
              begin
                  remFIFO.enq(flip_bit_at_pos(fromInteger(i), res.addrIdx));
                  temp <= res.addrIdx;
              end
          endrule
      end
  
  