anchor.diff:        end
   
         tlpOutFifo.enq(tlp);
  -      $display("writeHeaderTlp dwCount=%d", dwCount);
         writeDwCount <= dwCount;
         tlpDwCount <= truncate(min(fromInteger(valueOf(TlpDataWords)),unpack(dwCount)));
         lastTlp <= (dwCount <= fromInteger(valueOf(TlpDataWords)));
  
positive.code:    Wire#(Bool) writeHeaderTlpWire <- mkDWire(False);
     Wire#(Bool) writeDataMimoEnqWire <- mkDWire(False);
  
     Reg#(Bool) writeDataCntAboveThreshold <- mkReg(False);
     Reg#(Bool) writeDataMimoHasRoom <- mkReg(False);
     rule updateWriteDataMimoHasRoom;
        writeDataMimoHasRoom <= (writeDataCnt.read <= fromInteger(valueOf(WriteDataMimoSize) - valueOf(busWidthWords)));
     endrule
     rule noheader if (!tlpWriteHeaderFifo.notEmpty());
        writeDataCntAboveThreshold <= False;
     endrule
     rule updateWriteDataCntAboveThreshold if (writeInProgress || !writeDataCntAboveThreshold);
        writeDataCntAboveThreshold <= (writeDataCnt.read >= truncate(unpack(tlpWriteHeaderFifo.first.dwCount)));
     endrule
     (* descending_urgency = "writeHeaderTlp,updateWriteDataCntAboveThreshold" *)
     rule writeHeaderTlp if (!writeInProgress && writeDataCntAboveThreshold);
        // update for next cycle
        writeDataCntAboveThreshold <= (writeDataCnt.read >= truncate(unpack(tlpWriteHeaderFifo.first.dwCount)));
  
        writeHeaderTlpWire <= True;
        let info <- toGet(tlpWriteHeaderFifo).get();
  
negative.code: 	    if (burstLen == 0) begin
  	       burstLen <- toGet(writeBurstCountFifo).get();
  	    end
  	    if (burstLen == 1) begin
  	       writeReadyFifo.enq(True);
  	    end
  	    writeBurstCount <= extend(burstLen-1);
  
  	    Vector#(busWidthWords, Bit#(32)) v = unpack(wdata.data);
  	    $display("writeData.put %h tag %h v %h writeDataCnt", wdata.data, wdata.tag, v, writeDataCnt.read);
  	    writeDataMimo.enq(fromInteger(valueOf(busWidthWords)), v);
              writeDataCnt.increment(fromInteger(valueOf(busWidthWords)));
  	    writeDataMimoEnqWire <= True;
  