anchor.diff:        let v = `DtpVersion; //Defined in Makefile as time of compilation.
         indication.dtp_read_version_resp(v);
      endmethod
  -   method Action dtp_reset(Bit#(32) len);
  +   method Action dtp_reset(Bit#(32) len) if (dtp_rst_cntr == 0);
         Bit#(28) limit = truncate(len) & 28'hFFFFFFF;
  -      if (limit == 0) limit = 32;
  +      if (limit < 32) begin
  +         limit = 32;
  +      end
         dtp_rst_cntr <= limit;
      endmethod
      method Action dtp_set_cnt(Bit#(8) port_no, Bit#(64) c);
  
positive.code:       endrule
     end
  
     rule assert_reset (dtp_rst_cntr != 0);
        dtp_rst_cntr <= dtp_rst_cntr - 1;
        dtpResetOut.assertReset;
     endrule
  
     rule switch_mode;
  
negative.code:       endrule
     end
  
     Integer chunk_a = 0;
     Integer chunk_b = 1;
     function Bit#(2) toState(Integer st);
        return (1<<st);
     endfunction
  
     Reg#(Bit#(2)) lwstate <- mkReg(toState(chunk_a));
     // dtp_logger_write_cnt
     rule log_from_host_cycle;
        if ((lwstate[chunk_a] == 1) && lwrite_data_cycle1.notEmpty) begin
           let v1 = lwrite_data_cycle1.first;
           if (fromHostFifo[v1.port_no].notFull) begin
              fromHostFifo[v1.port_no].enq({1'b0, truncate(v1.data)});
              lwrite_data_cycle1.deq;
              lwstate <= toState(chunk_b);
           end
        end
        else if((lwstate[chunk_b] == 1) && lwrite_data_cycle2.notEmpty) begin
           let v2 = lwrite_data_cycle2.first;
           if (fromHostFifo[v2.port_no].notFull) begin
              fromHostFifo[v2.port_no].enq({1'b1, truncate(v2.data)});
              lwrite_data_cycle2.deq;
              lwstate <= toState(chunk_a);
           end
        end
     endrule
  
     for (Integer i=0; i<4; i=i+1) begin
        rule save_host_data (toHostFifo[i].notEmpty);
           Bit#(53) v = toHostFifo[i].first;
           case (v[52]) matches
              0: begin
  