I assume you are trying to implement a deserializer function. The clock is then embedded in the data stream.
I can give you some hints:
If you have an idea of te clock rate, then you can sample your data stream with a 2x higher clock at 45°, 90°, 135° and 180° phase difference. As such, you can extract your data.
If you don't have an idea about the clock rate, then you will need to implement a self learning function on top of the above algorithm and look for special characters (K characters).
Best regards,
L