anchor.diff:              if(verbose) $display("%d: %d, Enqueued outgoing ack %d", cycle, id, init_timestamp);
            end
            else if (sel == beacon_type) begin
  -            encodeOut = {c_local+1, parity, beacon_type, block_type};
  +            Bit#(53) tmp;
  +            if (is_switch_mode) begin
  +                tmp = dtpGlobal_wires + 1;
  +            end
  +            else begin
  +                tmp = c_local+1;
  +            end
  +            encodeOut = {tmp, parity, beacon_type, block_type};
  +            if(verbose) $display("%d: %d, Enqueued outgoing beacon %d", cycle, id, c_local+1);
            end
            else begin
               encodeOut = v; //should never happen
  
positive.code:       end
        else begin
           c_local_next <= v_local + 1;
           err = True;
        end
  
        if (err) begin
  
negative.code:       if(verbose) $display("%d: isGR=%d, isGL=%d, isLR=%d, isLG=%d, isRG=%d, isRL=%d", cycle, isGR, isGL, isLR, isLG, isRG, isRL);
        if (isGR && isGL) begin
           c_local_next <= v_global + global_delay;
  //        err = True;
        end
        else if (isLR && isLG) begin
           c_local_next <= v_local + 1;
  