Advanced frame_counter behavior in FPGA