https://www.techfleb.fr/posts/fpga-rotative-encoder/