RTL for mipi serialize and deserialize