anchor.diff:  // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   // SOFTWARE.
   
  +import FIFO         :: *;
   import FIFOF        :: *;
   import GetPut       :: *;
   import Connectable  :: *;
  
positive.code: 
      FIFOF#(TLPData#(16)) tlpOutFifo <- mkFIFOF;
      FIFOF#(TLPData#(16)) tlpInFifo <- mkFIFOF;
      FIFOF#(TLPData#(16)) tlpWriteHeaderFifo <- mkFIFOF;
  
      Reg#(Bit#(7)) hitReg <- mkReg(0);
      Reg#(Bool) use4dwReg <- mkReg(True);
  
negative.code:     endfunction
  
     rule writeHeaderTlp if (!writeInProgress && writeDataMimo.deqReadyN(1));
        let tlp <- toGet(tlpWriteHeaderFifo).get();
        let dwCount <- toGet(writeDwCountFifo).get();
        let is3dw <- toGet(writeIs3dwFifo).get();
  
        TLPMemory4DWHeader hdr_4dw = unpack(tlp.data);
  
        TLPMemoryIO3DWHeader hdr_3dw = unpack(tlp.data);
        if (is3dw) begin
  	 if (hdr_3dw.format != MEM_WRITE_3DW_DATA)
  	    $display("MemSlaveEngine: expecting MEM_WRITE_3DW_DATA, got %d", hdr_3dw.format);
  	 Vector#(4, Bit#(32)) v = writeDataMimo.first();
  	 writeDataMimo.deq(1);
  	 hdr_3dw.data = byteSwap(v[0]);
  