anchor.diff:        gb.enq(replicate(v));
         $display("sendMessage v=%h messageWords=%d", v, messageWordsReg);
   
  -      if (messageWordsReg == 1)
  -	 indState <= UpdateHead;
  +      if (messageWordsReg == 1) begin
  +	 if (paddingReg)
  +	    indState <= SendPadding;
  +	 else
  +	    indState <= UpdateHead;
  +      end
  +   endrule
  +   rule sendPadding if (indState == SendPadding);
  +      $display("sendPadding");
  +      gb.enq(replicate(32'hffff0001));
  +      indState <= UpdateHead;
      endrule
      rule updateHead if (indState == UpdateHead);
         $display("updateIndHead limit=%d head=%d", indLimitReg, indHeadReg);
  
positive.code: 	    else
  	       reqState <= Drain;
  	 end
  	 else if (wordCountReg <= messageWords)
  	    reqState <= UpdateTail;
  	 else if (messageWords == 1)
  	    reqState <= MessageHeaderRequested;
  
negative.code:       writeEngine.dataPipe.enq(pack(v));
     endrule
     rule sendHeader if (indState == SendHeader && interruptStatus);
        Bit#(16) messageBits = portal.messageSize(readyChannel);
        Bit#(16) roundup = messageBits[4:0] == 0 ? 0 : 1;
        Bit#(16) numWords = (messageBits >> 5) + roundup;
        Bit#(16) totalWords = numWords + 1;
        if (numWords[0] == 0)
  	 totalWords = numWords + 2;
        paddingReg <= numWords[0] == 0;
        Bit#(32) hdr = extend(readyChannel) << 16 | extend(totalWords);
        $display("sendHeader hdr=%h messageBits=%d numWords=%d totalWords=%d paddingReg=%d indHeadReg=%h", hdr, messageBits, numWords, totalWords, paddingReg, indHeadReg);
  
        indHeadReg <= indHeadReg + totalWords;
        messageWordsReg <= numWords;
  