Need guideline for NRZI output related question

I need a guideline to start this verilog question. I have to write a verilog code that will accept serial data and clock and it will give output NRZI data stream.
Can u kindly explain me how to go about it.