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.
A 3D printed panel with a gear wheel to test ways of reading quadrature encoders.