anchor.diff:        writeDataFifo.enq(EtherData{data: d.data, mask: mask, sop: sop, eop: eop});
   
         if (verbose) $display("StoreAndForward::readdata %d: %h %h %h %h %h", cycle, readBurstCount, d.data, pack(mask), sop, eop);
  -
  -      if (readBurstCount > _bytesPerBeat)
  -         readBurstCount <= readBurstCount - _bytesPerBeat;
  -
  -      if (eop) begin
  -         outPacket <= False;
  -         freeReqFifo.enq(currPacketId);
  -      end
      endrule
   
      interface PktWriteClient writeClient;
  
positive.code:    interface Put readData = toPut(readDataFifo);
     endinterface);
  
     FIFOF#(PacketInstance) eventPktSendFifo <- mkSizedFIFOF(4);
     FIFO#(PktId) freeReqFifo <- mkSizedFIFO(4);
  
     Reg#(Bool)                 outPacket <- mkReg(False);
     Reg#(PktId)            currPacketId <- mkReg(0);
     Reg#(Bit#(EtherLen))   readBurstCount <- mkReg(0);
     Reg#(Bit#(EtherLen))   readBurstLen <- mkReg(0);
  
     Reg#(Bit#(32)) cycle <- mkReg(0);
     rule every1 if (verbose);
        cycle <= cycle + 1;
     endrule
  
     rule packetReadStart (!outPacket);
        let pkt <- toGet(eventPktSendFifo).get;
        let bytesPerBeatMinusOne = fromInteger(valueOf(bytesPerBeat))-1;
        // roundup to 16 byte boundary
  
negative.code: `endif
                                  });
        if (verbose) $display("StoreAndForward::packetReadStart %d: send a new packet with size %h %h", cycle, burstLen, pack(mask));
        currPacketIdFifo.enq(pkt.id);
        readBurstLenFifo.enq(pkt.size);
     endrule
  
     rule packetReadInProgress if (readBurstLenFifo.notEmpty);
        let d <- toGet(readDataFifo).get;
        let _bytesPerBeat= fromInteger(valueOf(bytesPerBeat));
  
        let readBurstLen = readBurstLenFifo.first;
        let currPacketId = currPacketIdFifo.first;
  
        let sop = False;
        let eop = False;
        if (!started) begin
           readBurstCount <= readBurstLen - _bytesPerBeat;
           started <= True;
           sop = True;
        end
        else if (readBurstCount <= _bytesPerBeat && started) begin
           readBurstLenFifo.deq;
           currPacketIdFifo.deq;
           readBurstCount <= maxBound;
           started <= False;
           eop = True;
           freeReqFifo.enq(currPacketId);
        end
        else if (readBurstCount > _bytesPerBeat && started) begin
           readBurstCount <= readBurstCount - _bytesPerBeat;
        end
  
        Bit#(bytesPerBeat) mask;
        if (readBurstCount <= _bytesPerBeat)
  