For better understand myself, how to read an encoder with an FPGA, I share this video. It's Spanish spoken. I have provided English Subtitles hoping you enjoy it.

FPGA Alhambra II shop: https://alhambrabits.com/

and May the freeFPGAs Be With You.