anchor.diff:     Reg#(Bit#(8)) aData <- mkReg(0);
      Reg#(Bit#(8)) bData <- mkReg(0);
      Reg#(Bit#(14)) outcounter <- mkReg(0);
  +   Reg#(Bit#(16)) maxjvalue <- mkReg(0);
   
   /*
    * HirschC(Astart, Alen, Bstart, Blen, output fifo)
  
positive.code:       // scan for it in B
        for (jj <= 0; jj < fr.args.bLen; jj <= jj + 1)
  	 seq
  	    strB.request.put(BRAMRequest{write: False, responseOnWrite: False, address: bstart + jj, datain: ?});
  	    action
  	       let tmp <- strB.response.get();
  	       bData <= tmp;
  	    endaction
  	    if (aData == bData)
  	       seq
  		  matL.request.put(BRAMRequest{write: True, responseOnWrite: False, address: outcounter, datain: aData});
  		  outcounter <= outcounter + 1;
  		  break;
  	       endseq
  	 endseq
        fr.nextpc(HCSComplete);
     endseq;
  
     FSM hC2fsm <- mkFSM(hirschC2Stmt);
  
negative.code: 	 endseq
        
        fr.docall(HCS1, HCS5, CArgs {aStart: fr.args.aStart, aLen: fr.vars.midi, bStart: fr.args.bStart, bLen: fr.vars.maxj}, fr.vars);
     endseq;
  
     FSM hc4fsm <- mkFSM(hirschC4Stmt);
     
     rule hc3 (fr.pc == HCS3 && chirschB0.fsm.done() && chirschB1.fsm.done());
        $display("HSC3");
        hc4fsm.start();
        fr.nextpc(HCS4);
     endrule
     
     rule hc5 (fr.pc == HCS5);
        $display("HSC35");
        fr.docall(HCS1, HCS6, CArgs{aStart: fr.args.aStart + fr.vars.midi, aLen: fr.args.aLen - fr.vars.midi, bStart: fr.args.bStart + fr.vars.maxj, bLen: fr.args.bLen - fr.vars.maxj}, fr.vars);
     endrule
     
     rule hc6 (fr.pc == HCS6);
        $display("HSCC");
        fr.doreturn();
     endrule
     
     method Action setupA(Bit#(7) start, Bit#(7) length);
        $display("HirschC setupA %d %d", start, length);
        aStartReg <= start;
        aLenReg <= length;
     endmethod
     
     method Action setupB(Bit#(7) start, Bit#(7) length);
        $display("HirschC setupB %d %d", start, length);
        bStartReg <= start;
        bLenReg <= length;
     endmethod
  