anchor.diff:     DmaSumOfErrorSquared#(N, DmaSz) dmaSumOfErrorSquared <- mkDmaSumOfErrorSquared();
   
      FIFOF#(Bool) busyFifo <- mkFIFOF();
  -   rule mmfDone;
  -      $display("mmfDone");
  -      let d <- dmaMMF.finish();
  -      busyFifo.deq();
  -      mmInd.mmfDone();
  -   endrule
      rule sigmoidDone;
         $display("sigmoidDone");
         let d <- dmaSigmoid.finish();
  
positive.code: import Pipe::*;
  import Timer::*;
  import RbmTypes::*;
  
  function ObjectReadClient#(asz) getSourceReadClient(DmaVectorSource#(asz,a) s); return s.dmaClient; endfunction
  function ObjectWriteClient#(asz) getSinkWriteClient(DmaVectorSink#(asz,a) s); return s.dmaClient; endfunction
  
negative.code: 
     let n = valueOf(N);
  
     let dotprod <- mkSharedDotProdServer(0);
  
     FirstLastPipe#(Bit#(ObjectOffsetSize)) firstlastPipe <- mkFirstLastPipe();
     PipeOut#(Float) aPipe <- mkFunnel1(sources[0].vector.pipe);
     PipeOut#(Float) bPipe <- mkFunnel1(sources[1].vector.pipe);
     let joinPipe <- mkJoin(tuple2, aPipe, bPipe);
     let subPipe <- mkFloatSubPipe(joinPipe);
     rule fromsub;
        match {.first, .last} <- toGet(firstlastPipe.pipe).get();
        let diff <- toGet(subPipe).get();
        Token t = Token { v: diff, first: first, last: last };
        dotprod.aInput.put(t);
        dotprod.bInput.put(t);
     endrule
     
  
     for (Integer i = 0; i < 2; i = i + 1)
        rule finishSources;
  