anchor.diff:              begin
               gencounter <= 8;
               as = AAlign;
  -            serdes_bitslip.send(1);
               serdes_start.enq(0);
               end
           astate <= as;
  
positive.code:     rule qfsmall;
          fifo_reset_sync.send(pack(qstate != QIdle));
          astate_idle.send(pack(astate == ADelay || astate == AManual));
      endrule
  
      //*************************** alignment operation FSM *****************
      rule afsminit_rule if (bvi_resets_reg.read() == 0);
          serdes_bitslip.send(0);
          ctrl_samplein_i <= 0;
          edge_init <= 0;
          data_init <= 0;
  
negative.code:     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;
      endrule
  