anchor.diff:  
   typedef struct {
      Bit#(8) port_no;
  -   Bit#(64) local_cnt;
  -   Bit#(64) global_cnt;
  -   } S3 deriving (Bits, Eq);
  +   Bit#(64) data;
  +} BufData deriving (Bits, Eq);
   
   interface DtpIfc;
      interface PipeIn#(Bit#(128)) timestamp; // streaming time counter from NetTop.
  
positive.code:    FIFOF#(Bit#(128)) rxFifo    <- mkFIFOF();
     Reg#(Bit#(128)) timestamp_reg <- mkReg(0);
  
     Vector#(4, FIFOF#(Bit#(53))) fromHostFifo <- replicateM(mkSizedFIFOF(32));
     Vector#(4, FIFOF#(Bit#(53))) toHostFifo <- replicateM(mkSizedFIFOF(32));
     Vector#(4, Reg#(Bit#(128)))  toHostReg <- replicateM(mkReg(0));
  
     rule count;
        cycle_count <= cycle_count + 1;
     endrule
  
     rule receive_dtp_timestamp;
        let v <- toGet(rxFifo).get;
        timestamp_reg <= v;
     endrule
  
     interface dtp = (interface DtpIfc;
  
negative.code:       Bit#(64) delay = (host_cnt - cycle_count) >> 1;
     endmethod
     method Action log_write(Bit#(8) port_no, Bit#(64) host_timestamp);
        // Check valid port No.
        if (port_no < 4) begin
           lwrite_port <= port_no;
           lwrite_timestamp <= truncate(host_timestamp);
           lwrite_cf.enq(?);
        end
     endmethod
     method Action log_read_req(Bit#(8) port_no);
        if (port_no < 4) begin
           lread_port <= port_no;
           lread_cf.enq(?);
        end
     endmethod
     endinterface
  endmodule
  