anchor.diff:  
       rule qfsmall;
           fifo_reset_sync.send(pack(qstate != QIdle));
  -        astate_idle.send(pack(astate == ADelay || (astate == AFound && autoalign == 1)));
  +        astate_reset.send(pack(astate == AReset));
           astate_bitslip.send(pack(astate == AAlign));
  +        astate_found.send(pack(astate == AFound));
       endrule
   
       //*************************** alignment operation FSM *****************
  
positive.code:     //*************************** serdes setting FSM *****************
      rule serdes_idle_rule if (bvi_reset_reg != 0 && serdes_running == 0);
          serdes_start.deq();
          sync_reset_inc_ce <= serdes_start.first;
          sync_bitslip <= astate_bitslip.read();
          serdes_running <= 1;
          dcounter <= 3;
  
negative.code:         astate <= as;
          gencounter <= gc;
      endrule
      rule afsmcompare_rule if (bvi_resets_reg.read() != 0 && astate == AShift);
          let as = astate;
          let gc = gencounter - 1;
          if (gencounter >= 'h8000)
  