anchor.diff:     Reg#(a) xstep <- mkReg(0);
      // inclusive limit
      Reg#(a) xlimit <- mkReg(0);
  +   Reg#(a) xdown <- mkReg(0);
      Reg#(Bool) first <- mkReg(False);
      Reg#(Bool) last <- mkReg(False);
      Reg#(Bool) idle <- mkReg(True);
  
positive.code:       xbase <= cfg.xbase;
        xstep <= cfg.xstep;
        xlimit <= cfg.xlimit;
  
        first <= True;
        last <= (cfg.xbase+cfg.xstep >= cfg.xlimit);
  
negative.code: 	 let next_x = x + xstep;
  	 countReg <= countReg + 1;
  	 x <= x + xstep;
  	 xdown <= xdown - xstep;
  	 first <= False;
  	 last <= (xdown <= xstep);//(next_x+xstep >= xlimit);
  	 idle <= last;
        endmethod
        method Bool notEmpty();
  