Valeo interview question

How to preform a motor decoder using simulink