anchor.diff:  import Vector::*;
   import BuildVector::*;
   import FIFO::*;
  +import FIFOF::*;
   import SpecialFIFOs::*;
   import GetPut::*;
   import DefaultValue::*;
  
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:                    sorted_list <- replicateM(mkReg(defaultValue));
      Reg#(Node#(Bit#(size_t), Bit#(size_t))) node_to_insert <- mkReg(defaultValue);
      Reg#(Bit#(TLog#(SIZE))) curr_size <- mkReg(0);
      FIFO#(void) insert_res_fifo <- mkBypassFIFO;
      FIFOF#(Node#(Bit#(size_t), Bit#(size_t))) insert_req_fifo <- mkSizedBypassFIFOF(4);
  
      rule insert;
          let x <- toGet(priority_encoder.bin).get;
          $display("get from pe %h", x);
          case (x) matches
  