anchor.diff:      rule copyReadWriteRule (copyBusy);
          let data <- copy_read_chan.readData.get;
          $display("copyReadWrite addr %h", copyWriteAddr);
  -       copy_write_chan.writeReq.put(copyWriteAddr);
  -       copy_write_chan.writeData.put(data);
  +       copy_write_chan.writeReq.put(DMAAddressRequest{handle: copyWriteHandle, address: copyWriteAddr, burstLen: extend(1), tag: truncate(copyWriteAddr >> 3)});
  +       copy_write_chan.writeData.put(DMAData{data: data.data, tag: copyWriteAddr >> 3});
          copyWriteAddr <= copyWriteAddr + 8;
       endrule
       
  
positive.code:    FIFO#(Bit#(64)) f_out <- mkSizedFIFO(16);    // to buffer outgoing responses
     Reg#(Bit#(16)) copyReadCount <- mkReg(0);
     Reg#(Bit#(16)) copyWriteCount <- mkReg(0);
     Reg#(Bit#(40)) copyReadAddr <- mkReg(0);
     Reg#(Bit#(40)) copyWriteAddr <- mkReg(0);
     Reg#(Bit#(32)) copyTag <- mkReg(0);
     Reg#(Bool) copyBusy <- mkReg(False);
      
  
negative.code:       while(True)
  	 seq
  	    while (copyBusy) noAction;
  	    action
  	       copyTag <= f_in.first()[31:0];
  	       f_in.deq();  // word 0
  	    endaction
  	    action
  	       copyReadHandle <= f_in.first()[63:32]
  	       copyReadAddr <= f_in.first()[23:0];
  	       f_in.deq();  // word 1
  	    endaction
  	    action
  	       copyWriteHandle <= f_in.first()[63:32]
  	       copyWriteAddr <= f_in.first()[23:0];
  	       f_in.deq();  // word 2
  	    endaction
  	    action
  	       copyReadCount <= f_in.first()[15:0];
  	       copyWriteCount <= f_in.first()[15:0];
  	       f_in.deq();  // word 3
  	    endaction
  	    for (ii <= 4; ii < 8; ii <= ii+1)
  	       f_in.deq;  // discard words 4-7
  	    copyBusy <= True;
  	 endseq
     endseq;
        
      rule copyReadRule (copyBusy && (copyReadCount != 0));
         $display("copyRead %h, count %h", copyReadAddr, copyReadCount);
         copy_read_chan.readReq.put(DMAAddressRequest{handle: copyReadHandle, address: copyReadAddr, burstLen: extend(1), tag: truncate(copyReadAddr >> 3)});
         copyReadAddr <= copyReadAddr + 8;
         copyReadCount <= copyReadCount - 8;
      endrule
  