315M encode and discode module based on FSM