anchor.diff:        cycles <= cycles+1;
      endrule
   
  +   Vector#(K, Reg#(UInt#(addrwidth))) startBOffset <- replicateM(mkReg(0));
      for (Integer i = 0; i < k; i = i + 1) begin
         FIFO#(UInt#(addrwidth)) startAFifo <- mkFIFO();
         //FIFO#(UInt#(addrwidth)) startBFifo <- mkFIFO();
         FIFO#(UInt#(addrwidth)) startCFifo <- mkFIFO();
         FIFO#(UInt#(addrwidth))    colFifo <- mkFIFO();
         rule startDotProd1;
  -	 Tuple2#(UInt#(addrwidth),UInt#(addrwidth)) xy = indexpipes[i].first;
  -	 indexpipes[i].deq();
  +	 Tuple2#(UInt#(addrwidth),UInt#(addrwidth)) index <- toGet(indexpipes[i]).get();
  +	 match { .startAcheck, .unusedA } <- toGet(offsetpipesA[i]).get();
  +	 match { .unusedB, .startBcheck } <- toGet(offsetpipesB[i]).get();
  +	 match { .startCcheck, .unusedC } <- toGet(offsetpipesC[i]).get();
   	 
  -	 let row = tpl_1(xy);
  -	 let col = tpl_2(xy)+fromInteger(i);
  +	 UInt#(TLog#(K)) in = fromInteger(i);
  +	 int i_v = fromInteger(i);
  +
  +	 let row = tpl_1(index);
  +	 let col = tpl_2(index)+fromInteger(i);
   	 
   	 let startA = row*descriptorA.numColumns; // row major
   	 let startB = col*descriptorB.numColumns; // col major layout (pre-transposed)
   	 let startC = row*descriptorC.numColumns; // + col; // row major
  +	 if (startA != startAcheck)
  +	    $display("startAmismatch row=%d col=%d startA=%d startAcheck=%d", row, col, startA, startAcheck);
  +	 if (startB != (startBcheck + startBOffset[i]))
  +	    $display("startBmismatch row=%d col=%d startB=%d startBcheck=%d i=%d", row, col, startB, startBcheck, i_v);
  +	 if (startC != startCcheck)
  +	    $display("startCmismatch row=%d col=%d startC=%d startCcheck=%d", row, col, startC, startCcheck);
   	 
  -	 int i_v = fromInteger(i);
  -	 if (timing || verbose) $display($format(fshow(cycles)+fshow("    startDotProd xy=")+fshow(tuple2(row,col))
  +	 if (timing || verbose) $display($format(fshow(cycles)+fshow("    startDotProd index=")+fshow(tuple2(row,col))
   	    +fshow(" startA=")+fshow(startA)
   	    +fshow(" startB=")+fshow(startB)
   	    +fshow(" startC=")+fshow(startC+col)
   	    +fshow(" k=")+fshow(i_v)));
   
  -	 UInt#(TLog#(K)) in = fromInteger(i);
   	 if (i == 0) begin
   	    startCFifo.enq(startC);
   	 end
  
positive.code: 
        if (verbose) $display("mm pointerA=%d pointerB=%d pointerC=%d\n", pointerA, pointerB, pointerC);
        if (verbose) $display("mm.start ra=%d ca=%d rb=%d cb=%d dotprodCount=%d", numRowsA, numColumnsA, numRowsB, numColumnsB, dotprodCount);
        if (verbose) $display($format(fshow("mm.start ")+fshow(xycfg)));
        indexpipeifc.start(xycfg);
        for (Integer i = 0; i < k; i = i + 1) begin
  	 fxdotprods[i].numElts <= truncate(numColumnsA);
        end
     endmethod
     method ActionValue#(Bool) finish();
  
negative.code:    end
  
     rule dotProdValue;
        Tuple2#(UInt#(addrwidth),UInt#(addrwidth)) index = indexpipes[k].first;
        indexpipes[k].deq;
        Vector#(K,Float) vs;
        for (Integer i = 0; i < k; i = i + 1) begin
  	 let v = fxdotprods[i].pipe.first;
  	 fxdotprods[i].pipe.deq;
  	 let indexi = tuple2(tpl_1(index), tpl_2(index)+fromInteger(i));
  	 if (verbose) $display($format(fshow(cycles)+fshow("    dotprodvalue index=")+fshow(indexi)+fshow(" dotprod=")+fshow(v)));
  	 vs[i] = v;
        end
        dfifo.enq(fromInteger(k), vs);
  