anchor.diff:  import Vector::*;
   import BuildVector::*;
   import FIFO::*;
  +import FIFOF::*;
   import SpecialFIFOs::*;
   import GetPut::*;
   import DefaultValue::*;
  
positive.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);
      Reg#(Bit#(1)) insert_in_progress <- mkReg(0);
      FIFO#(void) insert_res_fifo <- mkBypassFIFO;
      FIFO#(Node#(Bit#(size_t), Bit#(size_t))) insert_req_fifo <- mkSizedFIFO(4);
  
      rule insert (insert_in_progress == 1);
          let x <- toGet(priority_encoder.bin).get;
          $display("get from pe %h", x);
          case (x) matches
  
negative.code:         endcase
      endrule
  
      rule handle_insert_req;
         let v <- toGet(insert_req_fifo).get;
         node_to_insert <= v;
         let r = map(uncurry(compare), zip(readVReg(sorted_list), replicate(v)));
         priority_encoder.oht.put(pack(r));
      endrule
  