anchor.diff:      FIFOF#(TLPTag) writeTag <- mkSizedFIFOF(16);
       FIFOF#(TLPTag) doneTag <- mkSizedFIFOF(16);
   
  -    function Integer tlpWordCount(TLPData#(16) tlp);
  +    function LUInt#(4) tlpWordCount(TLPData#(16) tlp);
          if (tlp.be == 16'h0000)
   	  return 0;
          else if (tlp.be == 16'h000f || tlp.be == 16'hf000)
  
positive.code:       Vector#(4, Bit#(32)) tlpvec = unpack(tlp.data);
  
        if (!tlp.sof) begin
  	 let count = tlpWordCount(tlp);
  	 // if sof is false, then count will be at least 1
  	 function Bit#(32) f(Integer i);
  	    begin
  	       if (i < count)
  		  return tlpvec[3-i];
  	       else
  		  return 32'hbad0beef;
  	    end
  	 endfunction
  	 vec = genWith(f);
  	 // The MIMO implicit guard only checks for space to enqueue 1 element
  	 // so we explicitly check for the number of elements required
  	 // otherwise elements in the queue will be overwritten.
  	 if (completionMimo.enqReadyN(fromInteger(count))
  	    && completionTagMimo.enqReadyN(fromInteger(count)))
  	    begin
  	       completionMimo.enq(fromInteger(count), vec);
  	       Vector#(4, TLPTag) tagvec = replicate(lastTag);
  	       completionTagMimo.enq(fromInteger(count), tagvec);
  	       handled = True;
  	    end
        end
  
negative.code: 	    handled = True;
        end
        //$display("tlpIn handled=%d tlp=%h\n", handled, tlp);
        if (handled) begin
  	 tlpDecodeFifo.deq();
  	 tlpWordCountFifo.deq();
        end
     endrule
  
      interface Client        tlp;
  