-- eb2 2 scan_en_d <= not(reg(R_CONTROL1)(CTL_RAWOUT_EN)) and reg(R_CONTROL1)(CTL_DRV_SP0); scan_en_q(0) <= scan_en_d when rising_edge(clk); scan_en_q(1) <= scan_en_q(0) when rising_edge(clk); scan_en_q(2) <= scan_en_q(1) when rising_edge(clk); scan_start <= '1' when ((scan_en_q(1 downto 0) = "01") or (scan_en_q(2 downto 1) = "01")) else '0';