anchor.diff:        if (dtpEventInFifo.notEmpty) begin
            let v <- toGet(dtpEventInFifo).get;
            if ((v.e == init_type)) begin
  -            initTimestampFifo.enq(v.t);
               let parity = ^(v.t);
  -            initParityFifo.enq(parity);
  +            if (initTimestampFifo.notFull && initParityFifo.notFull) begin
  +               initTimestampFifo.enq(v.t);
  +               initParityFifo.enq(parity);
  +            end
               if(verbose) $display("%d: %d DtpTx init_rcvd %h %d", cycle, id, v.e, v.t);
               init_rcvd_next = True;
            end
            else if (v.e == ack_type) begin
               ack_rcvd_next = True;
               // append received timestamp to fifo
  -            ackTimestampFifo.enq(v.t);
  +            if (ackTimestampFifo.notFull)
  +               ackTimestampFifo.enq(v.t);
               if(verbose) $display("%d: %d DtpTx ack_rcvd %h %d", cycle, id, v.e, v.t);
            end
            else if (v.e == beacon_type) begin
  
positive.code:          tx_mux_sel <= ack_type;
           if(verbose) $display("%d: %d, send ack, type %d", cycle, id, ack_type);
        end
        else if (timeout_count_init > init_timeout) begin
           if (is_idle) begin
              timeout_count_init <= 0;
              tx_mux_sel <= init_type;
  
negative.code: 
        // compute delay
        if (ack_rcvd) begin
           let temp <- toGet(ackTimestampFifo).get;
           delay <= (c_local - temp - (rxtx_delay << 1) - 1) >> 1;
           if(verbose) $display("%d: %d update delay=%d, %d, %d", cycle, id, c_local, temp, (c_local-temp-(rxtx_delay<<1)-1)>>1);
        end
     endrule
  
  