An implementation of decrypting a quadrature optical encoder in System Verilog