anchor.diff:  import StmtFSM::*;
   import BRAM::*;
   import MCSAlgorithm::*;
  +import StackReg::*;
   
   /* frame arguments */
   typedef struct {
  
positive.code:    rule hc1 (fr.pc == HCS1);
        $display("HCS1 aStart %d aLen %d bStart %d bLen %d", fr.args.aStart, fr.args.aLen, fr.args.bStart, fr.args.bLen);
        if (fr.args.bLen == 0)
  	doreturn();
       else if (fr.args.aLen == 1)
  	begin
  	   hc2fsm.start();
  	   fr.nextpc(HCS2);
  	end
       else
  	action
  	   let midi = fr.aLen >> 1;
  	   fr.vars.midi <= midi;
  	   chirschB0.setupA(fr.args.aStart, midi);
  	   chirschB0.setupB(fr.args.bStart, fr.args.bLen);
  	   chirschB1.setupA(fr.args.aStart+midi, fr.args.aLen - midi);
  	   chirschB1.setupB(fr.args.bStart, fr.args.bLen);
  	   chirschB0.start();
  	   chirschB1.start();
  	   fr.nextPC(HCS3);
  	endaction
     endrule
     
     // This FSM searches the results of the two calls to HirschB
     Stmt hirschC4Stmt =
     seq
        maxjvalue <= 0;
        for (jj <= 0; jj <= fr.args.bLen; jj <= jj + 1)
  	 seq
  	    l0.request.put(BRAMRequest{write: False, responseOnWrite: False, address: jj, datain: ?});
  	    l1.request.put(BRAMRequest{write: False, responseOnWrite: False, address: fr.args.bLen - jj, datain: ?});
  	    action
  	       let t1 <- lo.response.get();
  	       let t2 <- l1.response.get();
  	       if ((t1 + t2) > maxjvalue)
  		  action
  
negative.code:    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)
  