anchor.diff:     method Action start(ObjectPointer pointerA, UInt#(addrwidth) numRowsA, UInt#(addrwidth) numColumnsA,
   		       ObjectPointer pointerB, UInt#(addrwidth) numRowsB, UInt#(addrwidth) numColumnsB,
   		       ObjectPointer pointerC) if (!running);
  -      XYRangeConfig#(UInt#(addrwidth)) xycfg = XYRangeConfig {xbase: 0, xlimit: numRowsA, xstep: 1,
  -							      ybase: 0, ylimit: numRowsB, ystep: fromInteger(k) };
  +      XYRangeConfig#(UInt#(addrwidth)) indexcfg  = XYRangeConfig {xbase: 0, xlimit: numRowsA, xstep: 1,
  +								  ybase: 0, ylimit: numRowsB, ystep: fromInteger(k) };
  +      XYRangeConfig#(UInt#(addrwidth)) offsetcfgA = XYRangeConfig {xbase: 0, xlimit: numRowsA*numColumnsA, xstep: numColumnsA,
  +								  ybase: 0, ylimit: numRowsB, ystep: fromInteger(k) };
  +      XYRangeConfig#(UInt#(addrwidth)) offsetcfgB = XYRangeConfig {xbase: 0, xlimit: numRowsA, xstep: 1,
  +								  ybase: 0, ylimit: numRowsB*numColumnsB, ystep: fromInteger(k)*numColumnsB };
  +      XYRangeConfig#(UInt#(addrwidth)) offsetcfgC = XYRangeConfig {xbase: 0, xlimit: numRowsA*numRowsB, xstep: numRowsB,
  +								  ybase: 0, ylimit: numRowsB, ystep: fromInteger(k) };
         descriptorA <= MatrixDescriptor { pointer: pointerA, base: 0, numRows: numRowsA, numColumns: numColumnsA};
         descriptorB <= MatrixDescriptor { pointer: pointerB, base: 0, numRows: numRowsB, numColumns: numColumnsB};
         descriptorC <= MatrixDescriptor { pointer: pointerC, base: 0, numRows: numRowsA, numColumns: numRowsB};
  
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:       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)) 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();
  	 
  	 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);
  	 
  	 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)));
  
  	 if (i == 0) begin
  	    startCFifo.enq(startC);
  	 end
  