anchor.diff:      Reg#(Bool)    writeInProgress <- mkReg(False);
       FIFOF#(TLPTag) writeTag <- mkSizedFIFOF(16);
       FIFOF#(TLPTag) doneTag <- mkSizedFIFOF(16);
  -
  -    function LUInt#(4) tlpWordCount(TLPData#(16) tlp);
  -       if (tlp.be == 16'h0000)
  -	  return 0;
  -       else if (tlp.be == 16'h000f || tlp.be == 16'hf000)
  -	  return 1;
  -       else if (tlp.be == 16'h00ff || tlp.be == 16'hff00)
  -	  return 2;
  -       else if (tlp.be == 16'h0fff || tlp.be == 16'hfff0)
  -	  return 3;
  -       else if (tlp.be == 16'hffff)
  -	  return 4;
  -       else
  -	  return 0;
  -    endfunction
   
      Wire#(Bool) writeHeaderTlpWire <- mkDWire(False);
      Probe#(Bool) writeHeaderAvailableProbe <- mkProbe;
  
positive.code: 	 if (completionMimo.enqReady()
  	    && completionTagMimo.enqReady())
  	    begin
  	       completionMimo.enq(count, vec);
  	       Vector#(4, TLPTag) tagvec = replicate(lastTag);
  	       completionTagMimo.enq(count, tagvec);
  
negative.code: 	       && completionMimo.enqReady()
  	       && completionTagMimo.enqReady()) begin
  	    vec[0] = hdr_3dw.data;
              wordCount = hdr_3dw.length - 1;
  	    completionMimo.enq(1, vec);
              TLPTag tag = hdr_completion.tag;
  	    lastTag <= tag;
  	    completionTagMimo.enq(1, replicate(tag));
  	    handled = True;
        end
        wordCountReg <= wordCount;
        //$display("tlpIn handled=%d tlp=%h\n", handled, tlp);
        if (handled) begin
  	 tlpDecodeFifo.deq();
        end
     endrule
  
  