anchor.diff:          endcase
       endrule
   
  -    rule handle_insert_req (insert_in_progress == 0);
  +    rule handle_insert_req;
          let v <- toGet(insert_req_fifo).get;
          node_to_insert <= v;
  -       insert_in_progress <= 1;
          let r = map(uncurry(compare), zip(readVReg(sorted_list), replicate(v)));
          priority_encoder.oht.put(pack(r));
       endrule
  
positive.code:         return head(readVReg(sorted_list));
      endmethod
  
      method Action deq() if (insert_in_progress == 0 && curr_size > 0);
          let v = append(tail(readVReg(sorted_list)), vec(defaultValue));
          writeVReg(sorted_list, v);
          curr_size <= curr_size - 1;
      endmethod
  
      method Action clear() if (insert_in_progress == 0 && curr_size > 0);
          writeVReg(sorted_list, defaultValue);
          curr_size <= 0;
      endmethod
  
negative.code: import Vector::*;
  import BuildVector::*;
  import FIFO::*;
  import FIFOF::*;
  import SpecialFIFOs::*;
  import GetPut::*;
  import DefaultValue::*;
  