anchor.diff:          adder.request.put(tuple2(resp,temp));
       endrule
   
  -    rule storerule; // if (running);
  +    rule storerule if (running);
           let v <- toGet(lastFifo).get;
           match {.resp,.*} <- adder.response.get;
           temp <= resp;
           if (v) begin
  -            innerDone.enq(resp);
  -            running <= False;
  +            waitCount <= waitCount - 1;
  +            if (waitCount == 1) begin
  +                innerDone.enq(resp);
  +                running <= False;
  +            end
           end
       endrule
       interface sendPair = toPipeIn(dotFifo);
  
positive.code:     FloatAlu mul <- mkFloatMultiplier(defaultValue);
      Reg#(Float)    temp <- mkReg(0);
      Reg#(Bool)     running <- mkReg(False);
  
      rule dotrule;
          let v <- toGet(dotFifo).get;
  
negative.code:             wp <= wpx;
              // Calculate single 2D filter convolution
              for ( p <= 0; p < p_limit; p <= p + 1) action
                  dotp.incrementWait;
                  rEngine.readServers[0].request.put(MemengineCmd{sglId:param.objectId,
                      base:extend(bp), len:q_limit, burstLen:burstLenInBytes, tag: 0});
                  rEngine.readServers[1].request.put(MemengineCmd{sglId:param.objectId,
                      base:extend(wp), len:q_limit, burstLen:burstLenInBytes, tag: 0});
                  bp <= bp + param.conv_in_width;
                  wp <= wp + param.kernel_w;
              endaction
  